Rate limits
Limits protect you from runaway scripts and keep the service fair for everyone. Request limits are per key; file and job limits are per account and grow after your first top-up.
Limits
| Bucket | Limit | Applies to |
|---|---|---|
| Creates | 120 per minute per key | POST /v1/files, /v1/files/upload, /complete, DELETE /v1/files/{id}, POST /v1/audio/denoise, /separate, /enhance, /remove-fillers, POST /v1/image/remove-background, POST /v1/video/remove-background, POST /v1/jobs, /cancel, and webhook endpoint changes |
| Reads | 1,200 per minute per key | GET on files, jobs, outputs, credits, limits, webhook endpoints, deliveries and /v1/me |
| Public | 120 per minute per IP address | GET /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.
- Webhooks: one test ping every 10 seconds per account, and 50 endpoints created per 24 hours (
429 rate_limited). - URL inputs: each account downloads at most 2 URLs at a time; more wait their turn.
- Background removal: the 120 job creates per minute per API key apply to image jobs too. Up to 3 background removal jobs run at once per account; more are queued and run as slots free up, within the 24-hour job lifetime, so they do not fail because they waited. After your first top-up, up to 500 image jobs can be waiting or running at once, counted separately from your audio jobs (see account limits). See Background Removal.
- Video background removal: one video runs at a time per account; more are queued and start as the previous one finishes, within the 24-hour job lifetime. See Background Removal (Video).
Account limits
These limits are per account (all your keys together). They are lower until your first top-up, to stop abuse of free accounts, and lift automatically once you have bought credit. Free trial credit does not count as a top-up.
| Limit | Before your first top-up | After your first top-up | Over the limit |
|---|---|---|---|
| Live audio and video jobs at once (waiting for their file, queued or processing) | 10, audio, video and image jobs together | 50, audio and video jobs together | 429 too_many_active_jobs, Retry-After: 5 |
| Live image jobs at once (background removal) | Shared with audio: 10 in all | 500, counted separately from audio jobs | 429 too_many_active_jobs, Retry-After: 5 |
| Files checked per hour (uploads and URL inputs, including one-call jobs) | 20 | 10,000 | 429 quota_exceeded with Retry-After |
| Stored inputs | 1 GB | 20 GB | 429 quota_exceeded |
| Uploads in progress | 10 | 10 | 429 quota_exceeded |
| Test-key jobs at once / per 24 hours | 10 / 500 | 10 / 500 | 429 too_many_active_jobs / 429 test_job_quota_exceeded |
Each job is one input file, whatever its length (up to 6 hours). After your first top-up, image and audio jobs have separate limits, so a big image batch never blocks your audio jobs, and the other way round. Need higher limits? Email support@zilapi.com with your account id.
GET /v1/limits returns your account's current limits and usage for the key's mode, so your code can pace itself instead of waiting for a 429. It uses the read bucket and is never cached.
{
"object": "limits",
"mode": "live",
"paid": true,
"requests": { "create_per_minute": 120, "read_per_minute": 1200 },
"files": {
"per_hour": { "limit": 10000, "used": 37 },
"open_uploads": { "limit": 10, "used": 1 },
"stored_bytes": { "limit": 21474836480, "used": 734003200 },
"direct_upload_max_bytes": 52428800
},
"jobs": {
"active": { "limit": 50, "used": 4 },
"active_image": { "limit": 500, "used": 120 }
},
"trial": null
}jobs.active is the limit audio jobs are checked against and jobs.active_image the one for image jobs. Before your first top-up, and with test keys, both kinds share one limit, so the two show the same numbers. With a test key, mode is test, jobs.active.limit is 10 and jobs.per_day (limit 500) is added. trial shows your free trial credit (credit_micros, expires_at) when you have one.
Headers
| Header | Meaning |
|---|---|
| RateLimit-Limit | The bucket's size, for example 1200. |
| RateLimit-Remaining | Requests left right now. |
| RateLimit-Reset | Seconds until the bucket is full again. |
| Retry-After | On 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 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