Error Codes

Error Codes

This document describes the error codes returned in API responses.

Response Format

When a task fails, the response includes error information:

{
  "id": "prediction-uuid",
  "status": "failed",
  "code": 1401,
  "error": "Error description",
  ...
}
FieldDescription
codeError code. 0 indicates success.
errorError message. Empty on success.

Success

CodeDescription
0Success

Client Errors (1xxx)

CodeNameDescriptionSuggested Action
1200Content ModerationThe content contains sensitive information.Modify the input content and retry.
1400Missing ParameterA required parameter is missing.Check the API documentation for required parameters.
1401Invalid ParameterThe parameter value is invalid.Verify parameter format and value constraints.
1402Media Access FailedUnable to access the provided media URL.Ensure the URL is publicly accessible and valid.
1403Task Execution FailedThe task could not be completed.Check the error message and adjust input parameters.
1405Unknown ErrorThe failure did not match a more specific public error category.Check the error message, verify the input, and retry only when appropriate.
1406Retry ExhaustedThe service could not complete the task after exhausting its retry attempts.Retry later with bounded exponential backoff; contact support if the failure persists.
1407insufficient_creditsThe account does not have enough credits to run the request.Top up your account and retry.

Server Errors (5xxx)

CodeNameDescriptionSuggested Action
5000Internal ErrorAn internal error occurred.Please try again later.
5003Service UnavailableThe service is temporarily unavailable.Please try again later.
5004TimeoutThe request timed out. In sync mode, the prediction may still be processing and the response body can include its id.Poll GET /api/v3/predictions/{id}/result; otherwise reduce input size or complexity and retry.

Pricing Request Errors

Price queries and inference submissions can fail before a task is created. These errors use an API response envelope with code and message, rather than the task result format above. The HTTP status is 400; the application code is:

CodeNameDescription
4005Pricing FailedThe model price could not be calculated. Check pricing inputs; contact support if valid inputs still fail.
4006Media Duration UnavailableThe duration of the provided media could not be measured. Check media accessibility and format.
4007Image Dimensions UnavailableThe dimensions of the provided JPEG or PNG image could not be read. Check image accessibility and validity.

See Pricing API for an error response example and base-price preview handling.

Best Practices

  • 1xxx errors: Review and correct your request parameters.
  • 5xxx errors: Retry with exponential backoff.

Example

{
  "id": "abc123",
  "model": "model-name",
  "status": "failed",
  "code": 1402,
  "error": "Failed to download image from the provided URL.",
  "outputs": []
}
© 2026 WaveSpeedAI. All rights reserved.