Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 781 Bytes

File metadata and controls

31 lines (20 loc) · 781 Bytes

Python examples

Working Python examples for the ThumbAPI generate endpoint.

Setup

# Python 3.9+ recommended.
pip install requests

export THUMBAPI_KEY="your_api_key_here"

Get an API key at app.thumbapi.dev — free tier is 5 generations/month, no credit card required.

Examples

  • basic_generate.py — minimal POST request, save the WebP to disk.
  • batch.py — batch-generate from a CSV with retry and a thread pool.

Run

python basic_generate.py
python batch.py titles.csv

See also