Open AI Image API

Errors and retries

Learn which errors are safe to retry and how to avoid duplicate video tasks.

Every API error uses the same JSON structure. Save the HTTP status and error message in your logs and include them when you contact support.

{
  "error": {
    "message": "Choose an available video model",
    "code": 400
  }
}
StatusMeaningRetry?
400The input, JSON, available credits, or concurrent task count is invalidNo. Fix the request or wait for active tasks
401The API key is missing, invalid, or revokedNo. Replace the key
403The account cannot access the APINo. Check account access
404The task does not exist or belongs to another accountNo
413The request body exceeds 2 MBNo. Reduce the request size
429Requests are too frequentYes, with backoff
500An internal error occurredYes, after a delay
503The selected model is temporarily unavailableYes, after a delay

Retry safely

For 429, 500, and 503, use exponential backoff with jitter and set a maximum retry count. You can safely poll GET /v1/tasks/{task_id}.