Skip to content
AlibabaChecking

wan-2.5-preview/text-to-video

wan-2-5-preview-text-to-video

text to videoOutput: VideoInput: text + audio
Loading price…
Official list price · Not verified

Endpoint

All models share one asynchronous job API. This model is selected by its slug.

Submit
POST https://api.hermes-ai.net/api/v1/jobs

{
  "model": "wan-2-5-preview-text-to-video",
  "input": {
    "prompt": "A lighthouse on a rocky coast at sunrise, soft light",
    "duration": "5",
    "size": "1920*1080"
  }
}

Then poll GET /api/v1/jobs/{id} until the status is terminal.

Authentication

Send an API key with the jobs:create scope to submit and jobs:read to poll.

HeaderValueNotes
AuthorizationBearer <API key>Or send the key in x-api-key.
Content-Typeapplication/json
Idempotency-Key<unique string ≤128>Required. Reuse it only to retry the identical request.

Request body

FieldTypeRequiredNotes
modelstringrequiredModel slug from the catalog.
inputobjectrequiredFields from the model's input schema.
expectedPriceMicrosintegeroptionalPrice you showed the user. A mismatch returns 409 PRICE_CHANGED before any charge.

input fields

Unknown fields are rejected with INVALID_MODEL_INPUT.

FieldTypeRequiredDefaultAllowed values and constraints
prompt
stringrequired—

1–1500 chars

negativePrompt
stringoptional—

0–500 chars

audioUrl
stringoptional—

Audio file URL; the model will use this audio to generate a video. Duration: 3–30 seconds. File size: no more than 15 MB. Oversize handling: If the audio length exceeds the specified duration value (e.g., 5 seconds), the first 5 seconds will be automatically captured and the rest discarded. If the audio is shorter than the video duration, the portion beyond the audio length will be silent in the video. For example: if the audio is 3 seconds long and the video duration is set to 5 seconds, the output video will have sound for the first 3 seconds and be silent for the remaining 2 seconds.

HTTPS audio URL or media:<uuid>

duration
stringrequired"5"

One of: "5", "10"

size
stringrequired"1920*1080"

Specify the resolution of the generated video, in the format of width*height.

One of: "832*480", "480*832", "624*624", "1280*720", "720*1280", "960*960", "1088*832", "832*1088", "1920*1080", "1080*1920", "1440*1440", "1632*1248", "1248*1632"

promptExtend
booleanoptionaltrue

Whether to enable prompt intelligent rewriting.

seed
integeroptional—

Random seed

0–2147483647

Response

202 for a new task, 200 when an Idempotency-Key replay matches. GET /api/v1/jobs/{id} returns the same shape without replayed.

FieldTypeNotes
idstringHermes AI task ID. Use it to poll.
modelstringModel slug.
statusstringSee task statuses.
errorCodestring | nullSet when a task fails or needs review.
priceMicrosintegerQuote fixed at admission, USD micro-units.
currency"USD"
createdAt / updatedAtstringISO 8601 timestamps.
assets[]array{ id, type, url?, text? }. url is a same-origin /api/v1/results/<uuid> link.
replayedbooleanSubmit only. true when an idempotent retry matched.

Task statuses

StatusTerminalMeaning
queuednoAccepted and waiting for a worker.
submittingnoBeing sent to the model provider.
runningnoThe model is generating.
succeededyesFinished. Results are in assets.
failedyesFinished without a result. The hold is released.
reconciliation_requiredyesThe result is being verified. Keep the task ID and do not resubmit automatically.

Errors

Every error body is { code, error }. Handle by code.

HTTPCodeMeaning and action
401AUTH_REQUIREDMissing or invalid API key or session.
403INSUFFICIENT_SCOPEThe API key lacks the scope this endpoint needs.
403PERMISSION_DENIEDThis credential cannot perform the operation.
429API_KEY_RATE_LIMITEDThe API key's rate limit was reached. Honor Retry-After.
429API_KEY_USAGE_EXCEEDEDThe API key reached its usage limit. Create a new key.
400INVALID_REQUESTThe body is not a JSON object or a required value is missing.
400INVALID_IDEMPOTENCY_KEYIdempotency-Key must be 1–128 printable ASCII characters.
400INVALID_MODEL_INPUTinput does not match the model schema (unknown field, missing required field, or invalid value).
400 / 413INPUT_TOO_LARGEThe request body is larger than 256 KB. Upload media first and send a media reference.
404REQUEST_NOT_FOUNDNo chat request with this ID belongs to your account.
404MODEL_NOT_FOUNDNo model has this slug.
404JOB_NOT_FOUNDNo task with this ID belongs to your account.
409IDEMPOTENCY_CONFLICTThis Idempotency-Key was used with different input. Use a new key for a new request.
409PRICE_CHANGEDThe price differs from expectedPriceMicros. Fetch the price and confirm again.
409MODEL_PRICE_UNAVAILABLENo price is configured for this model yet, so it cannot run.
409PAYMENT_REVIEW_REQUIREDA refund left an uncovered balance. Contact support or cover the balance before submitting tasks.
409INSUFFICIENT_CREDITSAvailable credits do not cover the task price.
429RATE_LIMITEDToo many task submissions per minute. Retry later.
429CONCURRENCY_LIMITEDToo many unfinished tasks. Wait for one to finish.
503EXECUTION_UNAVAILABLEExecution is not configured for this model right now.
429UPSTREAM_RATE_LIMITEDThe model provider is rate limiting chat requests. Retry with backoff; nothing was charged.
502UPSTREAM_ERRORThe model provider failed the chat request. Nothing was charged; retry later.
503PLATFORM_BUDGET_EXCEEDEDThis model is temporarily unavailable. Try again later.
503EXECUTION_TEMPORARILY_UNAVAILABLEExecution is temporarily unavailable. Retry with the same Idempotency-Key.
503AUTH_UNAVAILABLEAuthentication is temporarily unavailable. Retry later.
503API_UNAVAILABLEThe API is temporarily unavailable. Retry later.

Full API guide · OpenAPI 3.1