Skip to main content

Cold starts

After about 5 idle minutes the model scales down, and the next request starts it again. The gateway holds that request for up to 75 seconds while the model starts, then answers it as usual; a streamed request receives nothing until the model is ready. If the model needs longer (a cold start can take 1 to 9 minutes), the request gets 503 model_starting. Retry every retry-after seconds for up to 10 minutes; the OpenAI SDKs’ default retries give up sooner. Most starts finish within the -second hold, so the first answer just takes longer. Keep your client timeout above that; the SDK settings below already are. When the hold runs out, the response has a retry-after header of seconds and this body:
The Playground waits and retries for you, and says that the model is starting.

Retry model_starting in your code

Which errors to retry

If the model service fails before it sends anything, for example when its GPU is replaced, the gateway retries the call once after a second or two. It never retries once part of the answer has been sent, and a retried request is billed once. Errors at 429, 502, 503 and 504 are worth retrying; the others need a change to the request, the key or the balance first. Failed requests don’t use credits, so retrying them costs nothing.

SDK settings

OpenAI’s SDKs retry 429 and 5xx responses on their own, twice by default with short backoff. That covers brief overloads but gives up on a cold start long before the model is ready, so wrap calls like the example above. Set the client timeout above the gateway’s -second model deadline, for example seconds, or stream. Otherwise the SDK can time out and retry a long answer that was still being written. Every response has an x-request-id header. Include it when you contact support.
Last modified on December 5, 2026