Skip to main content

Limits

Spending​

Your balance is the hard limit: while it is at or below $0, every request to a paid model is refused with 402 insufficient_credits before it runs (models whose ID ends in :free still work). Above $0, a request reserves the most it could cost before it runs, and is refused with 402 request_exceeds_balance if that does not fit in what is left (Errors). When it finishes, it is charged its actual cost. Each key can carry its own credit limit, optionally resetting daily, weekly or monthly, and an expiration; a key that has used its limit gets 402 key_budget_exceeded while the account may still have credits. See Create an API key.

Video jobs and deep research hold their estimated cost against your balance when they start and settle to the actual cost when they finish; a failed job releases the hold.

Rate limits​

Rate limits are per key, as requests per minute and tokens per minute, and are set by us for your account. Responses carry the key's limits, so a client can pace itself:

HeaderMeaning
x-oceantoken-key-rpm-limitRequests allowed per minute on this key
x-oceantoken-key-tpm-limitTokens allowed per minute on this key
x-oceantoken-key-spend / x-oceantoken-key-budgetWhat this key has spent, and its credit limit

Exceeding either rate returns 429 rate_limited with a Retry-After header giving the seconds until the minute window resets. A header whose limit is not set on the key is left out.

Separately, each model's channels have their own capacity. When one is busy the gateway moves the request to another channel of the same model, if it has one (Retries and failover). When every channel of a model is busy you get 429 provider_overloaded; that is the moment to retry with backoff or switch models. If your application needs sustained throughput beyond what your key allows, contact us and we will raise it.

Media jobs at the same time​

Video, image and 3D jobs have their own limit: how many of your account's jobs run at the same time. It is 1 while you have only free credit, 5 at Tier 1, 10 at Tier 2 and 20 at Tier 3; for an organization it can be set by agreement. A video or 3D job beyond the limit waits in a queue and starts by itself; an image call waits up to 20 seconds and then answers 429 concurrency_limited. See Jobs running at the same time.

Request size​

The gateway sets no fixed limit on the size of a request, but models have their own, and a large request is slower to send. Keep each request, JSON or multipart, under 10 MB where you can. For images and audio, send a URL or upload the file where the endpoint allows it rather than embedding a large base64 payload.

Timeouts​

A synchronous request is held open for at most 240 seconds, measured from the start of the request to the last byte of the response. Past that the connection is closed and the client sees 504 timeout. Long text generations should use "stream": true; a stream stays open as long as tokens keep flowing. Video generation is a job you poll, so it is never affected.

Retention​

WhatKept for
Image and video download URLs in API responses24 hours. Download the file promptly; the URL is not a permanent address.
A stored Idempotency-Key response24 hours
Request content: the prompts and responses of your requests365 days after the request, then deleted automatically. You can ask for it to be deleted sooner by writing to support@oceantoken.ai
Files you upload, and images, audio and video generated for you30 days after upload or generation, then deleted automatically. A saved conversation keeps its text, but images and files in it older than 30 days no longer display.
Usage and billing records: each request's model, token counts, cost and timeWhile your account is open, and afterwards for as long as legally or commercially reasonably required. Deleting request content does not delete them; your balance and invoices are built from them
Saved chat conversations in the console365 days after they were last updated, then deleted automatically. You can delete one yourself at any time

The console has no setting to change these periods or where requests are processed. These periods are the ones the privacy policy states; it is the full statement of what is stored, who processes it and where, and how to have your records deleted when you close your account.

Model access​

An account can be limited to a set of models. GET /v1/models lists what your key can call; anything outside it returns 403 model_not_allowed. The console's Models page shows the same set.