API
Tyzli API
Every image model on Tyzli from your own code, a Telegram bot or an online shop. Same credits, same prices, no separate contracts with Google or OpenAI.
Your keys
Create an account to get a key.
Quick start
Authenticate with Authorization: Bearer tz_…. Up to 60 requests a minute per key. Credits are charged when a job starts and returned automatically if it fails.
Create an image and wait for it
curl https://tyzli.com/api/v1/images \
-H "Authorization: Bearer $TYZLI_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"nano-banana-2","prompt":"A red paper boat on a calm lake at sunrise","aspect_ratio":"16:9","n":1,"wait":60}'Response
{
"id": "cm...", "object": "job", "status": "succeeded", "kind": "image",
"model": "nano-banana-2", "credits": 15, "error": null,
"output": [{ "id": "cm...", "url": "https://tyzli.com/api/v1/files/cm...", "mime": "image/png", "width": 1344, "height": 768 }]
}Or start it and poll
curl https://tyzli.com/api/v1/jobs/<id> -H "Authorization: Bearer $TYZLI_KEY"
curl https://tyzli.com/api/v1/files/<file id> -H "Authorization: Bearer $TYZLI_KEY" -o image.pngBalance and models
curl https://tyzli.com/api/v1/account -H "Authorization: Bearer $TYZLI_KEY"Parameters
| model | Model id from /api/v1/account. Default nano-banana-2. |
| prompt | 2-4000 characters. The same content rules as the website apply. |
| aspect_ratio | 1:1, 4:5, 3:4, 2:3, 9:16, 4:3, 3:2, 16:9, 21:9 |
| n | 1-4 images per job |
| wait | 0-90 seconds to wait for the result in the same request |
Errors
JSON {"error":{"code","message"}} with codes invalid_key (401), insufficient_credits (402), content_blocked (400), too_many_running and rate_limited (429).
Automations: n8n, Zapier, Make
Any tool that can send an HTTP request works with Tyzli. A common recipe: a new product photo lands in a Google Drive folder, Tyzli makes the white-background packshot, the result goes back to Drive or straight to your shop.
n8n
- Trigger: Google Drive “File created” (or Schedule, Webhook, Shopify).
- HTTP Request: POST https://tyzli.com/api/v1/images, Header Auth with your key, JSON body below, Timeout 100 s.
- HTTP Request: GET the file from
output[0].urlwith the same header, Response format “File”. - Google Drive “Upload” or Shopify “Update product image”.
{
"model": "nano-banana-2",
"prompt": "Professional e-commerce packshot of {{ $json.name }} on a pure white background, soft studio light",
"aspect_ratio": "1:1",
"wait": 90
}Zapier
Add a Webhooks by Zapier → Custom Request step: method POST, URL https://tyzli.com/api/v1/images, header Authorization: Bearer tz_…, data as above with "wait": 90. The next step can use output 0 url.
Make
Use the HTTP → Make a request module with the same URL, header and JSON body, “Parse response” on, timeout 100 seconds.
Tip: with wait set, one request returns the finished image, so no polling step is needed.