Rate limits
Each API key is limited to 120 requests per minute (sliding window). Requests above that return429 Too Many Requests with code TOO_MANY_REQUESTS — back off and retry after the window resets.
If your integration sustains higher volume than that or batches generations in spikes, contact us so we can raise the ceiling for your key.
Credits
Every image generation consumes credits from your workspace’s monthly allotment.| Image size | Cost |
|---|---|
2K | 1 credit |
4K | 2 credits |
variantCount: 3 at 4K is 6 credits. Check your current balance in your account dashboard or via GET /credits. When you run out, generation requests return HTTP 402 until you top up or your plan refreshes — the error response includes a deep link to the pricing page in data.action_url.
If you belong to a team, every workspace has its own balance. Pass workspaceId to GET /credits to read the balance on a specific workspace — your personal one (the default) or any team workspace you can access. Use GET /workspaces to look up every workspace ID you can see.
What does 402 mean?
A 402 response can mean one of two things — branch on code, not on the HTTP status:
INSUFFICIENT_CREDITS— the workspace’s balance is zero. Top up or wait for the plan to refresh.PAYMENT_REQUIRED— the subscription is paused (typically a failed or pending payment).
data.action_url that lets the caller purchase credits, make a payment to resume their subscription or upgrade their plan.
Top-ups
Need more credits without changing plans? Buy a one-off top-up of 20–200 credits. Top-up credits never expire.Plan tiers
| Plan | Monthly credits |
|---|---|
| Plus | 50 |
| Pro | 100 |
| Max | 200 |
| Scale | 300–2,000 |