Skip to main content
When a request fails, the API returns a JSON error object with a machine-readable code, a human-readable message, and the HTTP status code.

Error format

Error codes

Handling errors

  • 400: Check your request body, query parameters, or file uploads against the API reference.
  • 401: Verify your API key is correct and active.
  • 402: Your credit balance has hit zero or gone negative. Sign in to the dashboard and top up.
  • 403 FORBIDDEN: Your key is missing a required scope. See scopes.
  • 403 ACCOUNT_TERMINATED: Your account has been permanently terminated. This is not recoverable via the API.
  • 404: Confirm the job ID is correct and was created under your account.
  • 429: Back off and retry. Use exponential backoff with jitter.
  • 500/503: Retry after a short delay. If the error persists, contact support@omnifence.ai.
  • 503 SERVICE_UNAVAILABLE: When the response carries Retry-After, wait at least that many seconds, then retry with exponential backoff and jitter.
  • 503 SUBMISSION_STATUS_UNKNOWN: Do not resubmit immediately. The response body carries the job_id of the submission whose outcome is unknown. Poll GET /api/v1/job/{job_id}: a job that exists was accepted and is running; a JOB_NOT_FOUND means the submission was rejected and you can safely submit again. Resubmitting without polling can create a second job for the same content, and you pay for both.