Skip to content
Log inGet an API key
Concepts

Rate limits

Limits protect you from runaway scripts and keep the service fair. They are per key, and generous for normal use.

Limits

Rate limits
BucketLimitApplies to
Creates120 per minute per keyPOST /v1/files, /complete, DELETE /v1/files/{id}, POST /v1/audio/denoise, /cancel
Reads1,200 per minute per keyGET on files, jobs, outputs, credits and /v1/me
Public120 per minute per IP addressGET /v1/models, GET /v1/status

Limits are token buckets: unused capacity refills continuously, so short bursts are fine. Live and test keys are counted separately. Need more? Email support@zilapi.com.

Headers

Rate-limit headers
HeaderMeaning
RateLimit-LimitThe bucket's size, for example 1200.
RateLimit-RemainingRequests left right now.
RateLimit-ResetSeconds until the bucket is full again.
Retry-AfterOn 429 (and 503): seconds to wait before retrying.

Handling 429

Over a limit you get 429 rate_limited with Retry-After. Wait that long, then retry; add a little jitter when many workers share a key. Upload quotas use 429 quota_exceeded (see Files).

Retry on 429 and 503 with Retry-After
# --retry honours Retry-After on 429 and 503
curl -s --retry 5 --retry-max-time 120 https://api.zilapi.com/v1/jobs/$JOB_ID -H "Authorization: Bearer $ZILAPI_KEY" -D headers.txt
grep -i '^ratelimit-' headers.txt   # RateLimit-Limit: 1200, RateLimit-Remaining: 1199, RateLimit-Reset: 1