Error Codes

POSThttps://api.newportai.com/api/getAsyncResult

DreamAPI uses a unified error code system across all async endpoints. When a submitted task fails during processing, the error is returned in the data.task.errorCode field of the API response, with a human-readable description in data.task.reason.

Request Headers

Content-Type string Required

Enum: application/json

Authorization string Required

Bearer authentication token. Example: Bearer {{APIKey}}.

Request Body

taskId string Required

The unique task identifier returned by the initial asynchronous API request.

Response

code int

Operation code, 0 indicates success, non-0 indicates failure

message string

Operation prompt message

data object

Request content

task object

Task-related information

taskId string

task id

status int

Task status code. 1 = task submitted; 2 = task in progress; 3 = task successful; 4 = task failed

errorCode int

Error code indicating the reason for failure. Only present when status=4.

reason string

Provides the reason for a task's failure.

taskType string

task type

executionTime int

completion execution time

expire int

taskid expiration time

Error Code Categories

Module Prefix (Machine Prefix) Category (Category) Description (Business Description)
[-1] Parameter Errors Input validation and parameter format errors
[-2] Task Errors Task execution, queuing, and system processing errors
[-3] Balance Errors Account credit balance related errors
[-5] Upstream Business Errors Errors passed through from upstream AI service providers

Note: The internal error codes -1000 and -3000 are displayed to users as 10192 and 10195 respectively. These display values are kept permanently for backward compatibility with existing users and will not be changed.

Errors

-1xxx: Parameter Errors

These errors occur during request validation on the DreamAPI platform. They indicate that the submitted request contains invalid or missing parameters.

10192Parameter Illegal — One or more request parameters are invalid.
-1001Task not found — The specified task does not exist or has expired.
-1002Audio id not exist — The provided audio resource identifier does not exist.
-1003The audio id version is not common — The audio version is not compatible with the requested operation.
-1004Not in compliance with regulations — The request content violates platform usage policies.
-1005The request id repeat — A duplicate request was detected (same request ID used more than once).
-1006The width or height must be multiples of 16 — Image dimensions do not meet the requirement of being divisible by 16.
-1007Num must not exceed 10 — The number of images to generate exceeds the maximum limit of 10.
-1008The model version illegal — The specified model version is not supported or invalid.
-1009The duration property illegal — The duration parameter is out of the allowed range or format.
-1010The resolution property illegal — The requested resolution is not supported.

-2xxx: Task Errors

These errors occur during task processing on the DreamAPI platform or its infrastructure. They indicate system-level failures such as queue overflows, execution failures, or resource download problems.

-2000Task handle busy — The task handler is temporarily overloaded. Retry the request later.
-2001Task enqueue failed — Failed to add the task to the processing queue.
-2002Task queue full — The task processing queue has reached capacity. Retry later.
-2003Ability not exist — The requested capability or feature is not available on this platform.
-2004Task submit error — An error occurred while submitting the task to the processing pipeline.
-2005Task query error — An error occurred while querying the task status.
-2006Task execute error — An internal error occurred during task execution.
-2007TTS clone callback status err — The voice clone callback returned an unexpected status.
-2008The file download failed — The platform was unable to download the file from the provided URL. Verify the URL is publicly accessible.
-2009Voice clone failed — The voice cloning process failed during processing.
-2010Algorithm execution failed — The AI algorithm returned an error during execution.
-2011TTS content generate failed — Failed to generate text-to-speech audio content.

10195: Insufficient Balance

Returned when the account's credit balance is below the cost required to execute the task.

10195Insufficient balance — Your account does not have enough credits to process this request. Recharge your account and try again.

-5xxx: Upstream API Business Errors

These error codes represent business exceptions returned by the upstream API. They mostly indicate parameter validation failures or content moderation rejections. The error is reported in the data.task.errorCode field when a task fails due to upstream business constraints.

-5001Invalid parameter from upstream service — The upstream AI service rejected the request due to invalid parameters.
-5010Input image contains sensitive content — The input image was flagged by the upstream content moderation system.
-5011Input image contains privacy-sensitive content — The input image contains identifiable real person information that triggered privacy protection.
-5012Input text contains sensitive content — The input text prompt was flagged by the upstream content moderation system.
-5013Output video contains sensitive content — The generated output video was flagged by the upstream content moderation system.
-5014Output image contains sensitive content — The generated output image was flagged by the upstream content moderation system.
-5015Input image contains no face — Input image contains no face
-5016Input video duration exceeds limit — Input video duration exceeds limit
-5017Input video pixels exceed limit — Input video pixels exceed limit
-5018No valid speech in audio — No valid speech in audio
Request
cURL
curl -X POST 'https://api.newportai.com/api/getAsyncResult' \
  -H "Authorization: Bearer {{key}}" \
  -H 'Content-Type: application/json' \
  -d '{
  "taskId": "API-427e44604566453387204a6088036d37"
}'
-5012
-5012
{
  "code": 0,
  "message": "success",
  "data": {
    "task": {
      "taskId": "API-427e44604566453387204a6088036d37",
      "status": 4,
      "errorCode": -5012,
      "reason": "Input text contains sensitive content",
      "taskType": "seedream",
      "expire": 1780492862700
    }
  }
}