API reference
Create an image
Generates an image from a prompt. The call is synchronous: Nano Banana usually takes 10 to 60 seconds, GPT Image 2.5 about 30 to 70 seconds. Set your client timeout to at least 180 seconds; 600 is safest.
POST
Create an image
Authorizations
Your td- key from Tokens
Body
application/json
Available options:
gpt-image-2.5-flare, gpt-image-2.5-sunburst, nano-banana-pro, nano-banana-2.1, nano-banana, nano-banana-2-lite What to draw
Example:
"amethyst perfume bottle on plum velvet, studio light"
Any pixel size, such as 1024x1024 or 2048x1152. The longest side sets the price tier: under 1800 (or auto) is 1K, 1800 and up is 2K, 3000 and up is 4K. 1k, 2k and 4k give a square image
Example:
"1024x1024"
GPT Image 2.5 only. Does not change the price
Available options:
low, medium, high, xhigh, max, auto Available options:
url, b64_json Images per request. Send 1 and run requests in parallel for more