Public Beta — reserve early accessJoin Waitlist
ThumbAPI logoThumbAPI

POST /v1/generate

Generate a thumbnail from a title. This is the only endpoint you need.

POST https://api.thumbapi.dev/v1/generate

Headers

HeaderRequiredValue
AuthorizationYesBearer YOUR_API_KEY
Content-TypeYesapplication/json

Request Body

FieldTypeRequiredDescription
titlestringYesThe title to generate a thumbnail for
formatstringYesyoutube | instagram | x | blogpost
imageStylestringYesfaceless | with-image | with-logo
personImagestringNoBase64-encoded image. Required if imageStyle is with-image or with-logo

Format Dimensions

FormatWidthHeight
youtube1280720
blogpost1200630
instagram10801080
x1600900

Image Styles

  • faceless — text and graphic design, no people. Best for automated content.
  • with-image — includes a person's photo. Send the photo as personImage (base64).
  • with-logo — branded thumbnail with logo overlay. Send logo as personImage (base64).

Example Request

curl -X POST https://api.thumbapi.dev/v1/generate \
  -H "Authorization: Bearer tb_live_abc123" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "10 Tips to Grow Your YouTube Channel",
    "format": "youtube",
    "imageStyle": "faceless"
  }'

Response

{
  "image": "data:image/webp;base64,UklGRp4HAA...",
  "format": "youtube",
  "dimensions": {
    "width": 1280,
    "height": 720
  }
}

Response Fields

FieldTypeDescription
imagestringBase64-encoded WebP image with data URI prefix
formatstringThe format that was used
dimensionsobjectwidth and height in pixels

Error Responses

StatusCause
400Missing or invalid title, format, or imageStyle
401Missing or invalid API key
429Rate limit or generation limit exceeded
500Server error during generation

See Error Codes for full details.

Common Mistakes

  1. Missing personImage for with-image style — returns 400. If you choose with-image or with-logo, you must provide the base64 image.
  2. Invalid format value — must be exactly youtube, instagram, x, or blogpost. No aliases.
  3. Empty title — the title field must be a non-empty string.

Next Steps