YiffyAPI
  • Images
  • Thumbnails
  • Shortener
  • Shared Responses
    • Error Codes
  • API Key
Powered by GitBook
On this page
  • Get Thumbnail Information
  • Create Thumbnail
  • Check Generation Progress

Was this helpful?

Thumbnails

PreviousImagesNextShortener

Last updated 11 months ago

Was this helpful?

An is required for this service. See for common error responses.

Get Thumbnail Information

GET https://thumbs.yiff.rest/:id

Path Parameters

Name
Type
Description

id*

String

The MD5 or ID of an e621 post.

{
  "success": false,
  "error": "Invalid Post ID",
  "code": 1062
}
{
  "success": false,
  "error": "Invalid MD5",
  "code": 1063
}
{
  "success": true,
  "gifURL": "https://thumbsyiff.media/{md5}.gif", // or null
  "pngURL": "https://thumbs.yiff.media/{md5}.png" // or null
}

Create Thumbnail

PUT https://thumbs.yifff.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.

If is enabled, a 503 Service Unavailable will be returned.

Path Parameters

Name
Type
Description

id*

String

The MD5 or ID of an e621 post.

type*

String

png

{
  "success": false,
  "error": "Invalid Post ID",
  "code": 1062
}
{
  "success": false,
  "error": "Invalid MD5",
  "code": 1063
}
{
  "success": false,
  "error": "Invalid Type",
  "code": 1064
}
{
  "success": true,
  "status": "done",
  "url": "https://.yiff.media/{md5}.{type}"
}
{
  "success": true,
  "status": "processing",
  "checkURL": "https://thumbs.yiff.rest/check/{gif}/{type}",
  "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
}
// this will never be returned on initial generation, only
// if you make a request for one that has already started
{
  "success": false,
  "status": "error",
  "code": 1060
}
// this will never be returned on initial generation, only
// if you make a request for one that has already started
{
  "success": false,
  "status": "timeout",
  "code": 1065
}
{
  "success": false,
  "error": "Service is currently in read-only mode.",
  "code": 2
}

Check Generation Progress

GET https://thumbs.yiff.rest/check/:md5/:type

Path Parameters

Name
Type
Description

id*

String

The MD5 of an e621 post. This MUST be an md5, you will be given this if you did not have it.

type*

String

png

{
  "success": false,
  "error": "Invalid MD5",
  "code": 1061
}
{
  "success": false,
  "error": "Invalid Type",
  "code": 1064
}
{
  "success": true,
  "status": "done",
  "url": "https://thumbs.yiff.media/{md5}.{type}"
}
{
  "success": true,
  "status": "processing",
  "checkURL": "https://thumbs.yiff.rest/check/{gif}/{type}",
  "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
}
{
  "success": false,
  "error": "Not Found",
  "code": 1066
}
{
  "success": false,
  "status": "timeout",
  "code": 1065
}
{
  "success": false,
  "status": "error",
  "code": 1060
}
{
  "success": false,
  "error": "Service is currently in read-only mode.",
  "code": 2
}

If is enabled, a 503 Service Unavailable will be returned.

API Key
Shared Responses
Read Only
Read Only