ThumbAPI logoThumbAPI

Authentication

ThumbAPI uses API key authentication via the x-api-key header. Every request must include your key in this header.

How Do You Get an API Key?

  1. Sign up at thumbapi.dev. Your API key is created automatically.
  2. Find it in the dashboard under API Keys.
  3. Your key looks like yt_8f3c1a9e4b7d2056e1f8a3c9d4b7e205 — the prefix yt_ followed by 32 hex characters.

The free tier gives you 50 credits per month. No credit card required.

Public Test Key

Want to test the integration without creating an account or burning your credits? Use the public test key:

x-api-key: thumbapi_test

This key returns a static placeholder image so you can verify your connection (n8n, Make, Zapier, or your own code) before using a real key.

How Do You Use Your API Key?

Include the key in every API request:

x-api-key: yt_YOUR_API_KEY

Example Request

curl -X POST https://api.thumbapi.dev/v1/generate \
  -H "x-api-key: yt_8f3c1a9e4b7d2056e1f8a3c9d4b7e205" \
  -H "Content-Type: application/json" \
  -d '{"title": "Test", "format": "youtube"}'

Security Best Practices

Never hardcode your API key. Use environment variables:

# .env
THUMBAPI_KEY=yt_8f3c1a9e4b7d2056e1f8a3c9d4b7e205
// Node.js
const key = process.env.THUMBAPI_KEY;
# Python
import os
key = os.environ["THUMBAPI_KEY"]

Never expose your key in client-side code. ThumbAPI requests should only be made from your server or backend.

Rotate your key if you suspect it has been compromised. Generate a new key from the dashboard and update your environment variables.

What Do the Authentication Errors Mean?

StatusErrorCause
401Missing API keyNo x-api-key header sent
401Invalid API keyKey is wrong, expired, or revoked
403API access not enabledYour plan does not include API access

Next Steps