Thumbnails
An API Key is required for this service. See Shared Responses for common error responses.
Get Thumbnail Information
GEThttps://thumbs.yiff.rest/{id}
Path Parameters
| Name | Type | Description |
|---|---|---|
| id * | String | The MD5 or ID of an e621 post. |
200 OK: Success
{ "success": true, "post_id": 5220880, "gif": null, // will usually be null, gifs can no longer be generated "png": "https://thumbs.yiff.media/922a7bfc2a0a19cb789cbb62c80ccba9.png" // also nullable }
400 Bad Request: Deleted Post
{ "success": false, "code": 1068, "error": "Post is deleted" }
404 Not Found: Invalid ID
{ "success": false, "code": 1062, "error": "Invalid Post: Not found (ID)" }
404 Not Found: Invalid MD5
{ "success": false, "code": 1062, "error": "Invalid Post: Not found (MD5)" }
Create Thumbnail
PUThttps://thumbs.yiff.rest/{id}/{type}
A 202 Accepted will be returned in most circumstances. This is a non committal answer. You must fetch `checkURL` at the specified `checkAt` time. (you will be given a new check time if it's still processing)
If generation has already been started by someone else, a 202 Accepted will still be returned.
If a thumbnail has already been created, a 200 OK will be returned.
Path Parameters
| Name | Type | Description |
|---|---|---|
| id * | String | The MD5 or ID of an e621 post. |
| type * | String | png |
200 OK: Generation Complete
{ "success": true, "status": "done", "post_id": 5220880, "url": "https://thumbs.yiff.media/922a7bfc2a0a19cb789cbb62c80ccba9.png" }
202 Accepted: Generation In Progress
{ "success": true, "status": "processing", "post_id": 5220880, "checkURL": "https://thumbs.yiff.rest/check/922a7bfc2a0a19cb789cbb62c80ccba9/png", "checkAt": 0, // (unix millis) the time at which you should fetch the above url "time": 0, // the milliseconds after which you should check the above url (see checkAt) "startedAt": 0 // (unix millis) the time at which processing started }
400 Bad Request: Deleted Post
{ "success": false, "code": 1068, "error": "Post is deleted" }
400 Bad Request: GIF Disabled
{ "success": false, "code": 1067, "error": "The gif type has been disabled." }
404 Not Found: Invalid Type
{ "success": false, "code": 1062, "error": "Invalid Type: invalid" }
404 Not Found: Invalid ID
{ "success": false, "code": 1062, "error": "Invalid Post: Not found (ID)" }
404 Not Found: Invalid MD5
{ "success": false, "code": 1062, "error": "Invalid Post: Not found (MD5)" }
500 Internal Server Error: Generation Timeout
{ "success": false, "code": 1065, "error": "Generation timed out.", "expiresAt": 0 // (unix millis) when the failed generation expires (retrying is possible after expiry), also nullable }
500 Internal Server Error: Generation Error
{ "success": false, "code": 1060, "error": "Generation encountered an error.", "expiresAt": 0 // (unix millis) when the failed generation expires (retrying is possible after expiry), also nullable }
Check Generation Progress
GEThttps://thumbs.yiff.rest/check/{id}/{type}
Path Parameters
| Name | Type | Description |
|---|---|---|
| id * | String | The MD5 or ID of an e621 post. |
| type * | String | png |
200 OK: Generation In Progress
{ "success": true, "status": "processing", "post_id": 5220880, "checkURL": "https://thumbs.yiff.rest/check/922a7bfc2a0a19cb789cbb62c80ccba9/png", "checkAt": 0, // (unix millis) the time at which you should fetch the above url "time": 0, // the milliseconds after which you should check the above url (see checkAt) "startedAt": 0 // (unix millis) the time at which processing started }
201 Created: Generation Complete
{ "success": true, "status": "done", "post_id": 5220880, "url": "https://thumbs.yiff.media/922a7bfc2a0a19cb789cbb62c80ccba9.png" }
400 Bad Request: Deleted Post
{ "success": false, "code": 1068, "error": "Post is deleted" }
400 Bad Request: GIF Disabled
{ "success": false, "code": 1067, "error": "The gif type has been disabled." }
404 Not Found: Invalid Type
{ "success": false, "code": 1062, "error": "Invalid Type: invalid" }
404 Not Found: Invalid ID
{ "success": false, "code": 1062, "error": "Invalid Post: Not found (ID)" }
404 Not Found: Invalid MD5
{ "success": false, "code": 1062, "error": "Invalid Post: Not found (MD5)" }
404 Not Found: Check Not Found
{ "success": false, "code": 1066, "error": "Not Found" }
500 Internal Server Error: Generation Timeout
{ "success": false, "code": 1065, "error": "Generation timed out.", "expiresAt": 0 // (unix millis) when the failed generation expires (retrying is possible after expiry), also nullable }
500 Internal Server Error: Generation Error
{ "success": false, "code": 1060, "error": "Generation encountered an error.", "expiresAt": 0 // (unix millis) when the failed generation expires (retrying is possible after expiry), also nullable }
