Skip to content

Create and download a Vidu result

Guide

Choose from the operation directory and obtain a quote before submitting paid work.

Quote and create share operation, input, and pricingContext. Create also accepts the create-only fields shown below:

FieldTypeRequiredMeaning
operationenumRequiredOne of the 27 values in Supported operations.
inputobjectRequiredThe selected Vidu Enterprise v2 request body, nested unchanged except for the restrictions below.
pricingContext.durationSecnumber, > 0, max 3,600ConditionalMedia duration used when pricing cannot be derived from a URL. Supply it for duration-priced lip-sync, motion, upscale, or edit calls when input.duration is absent.
pricingContext.providerCreditCapnumber, 1–100,000ConditionalVidu-credit authorization reserve required for replace-video, digital-human, template, and template-story.
maxCreditsnumber, >= 1Optional (create only)Reject creation before debit when the latest OmnAPI quote exceeds this amount.
configobjectOptional (create only)Standard priority, tags, metadata, and webhookUrl task config.

Copy the fields from the linked Vidu request-body reference into input, not beside it. Do not copy Vidu’s callback_url / callbackUrl; OmnAPI rejects those fields and uses config.webhookUrl instead. Do not send Vidu credentials. Where Vidu accepts either Base64 or a URL, OmnAPI accepts only a public http:// or https:// URL. For general-film-edit and general-film-compose, include Vidu’s parent id in input; OmnAPI moves it to the fixed Vidu URL path and does not forward it in the JSON body.

See the complete operation input index.

Set OMNAPI_KEY to your API key and replace the example image and webhook URLs. Save a fresh key once per new operation; reuse it with the original body after an uncertain response. Obtain a new quote if you change the requested inputs.

Terminal window
export REQUEST_KEY="$(uuidgen)"
Terminal window
curl -X POST https://api.omnapi.com/api/v1/vidu/tasks \
-H "x-api-key: $OMNAPI_KEY" \
-H "Idempotency-Key: $REQUEST_KEY" \
-H "Content-Type: application/json" \
-d '{
"operation": "image-to-video",
"input": {
"model": "viduq3-turbo",
"images": ["https://cdn.example.com/frame.jpg"],
"prompt": "A slow cinematic push-in",
"duration": 5,
"resolution": "720p"
},
"maxCredits": 110,
"config": {
"webhookUrl": "https://example.com/webhooks/omnapi",
"metadata": { "assetId": "asset_123" }
}
}'

Response example (excerpt):

{
"taskId": "task_01J...",
"status": "PENDING",
"creditsRequired": 110,
"viduCredits": 55,
"pricingMode": "rate-card",
"pollUrl": "/api/v1/vidu/tasks/task_01J..."
}

Reuse operation, input, and pricingContext from quote, then add maxCredits and config only to create. maxCredits rejects the create before deduction if the current quote is higher. Use a unique Idempotency-Key for each logical job so a network retry cannot create a second paid task.

Terminal window
curl https://api.omnapi.com/api/v1/vidu/tasks/task_01J... \
-H "x-api-key: $OMNAPI_KEY"
{
"taskId": "task_01J...",
"status": "COMPLETED",
"progress": 100,
"resources": [
{
"id": "res_01J...",
"index": 0,
"role": "output",
"type": "VIDEO",
"url": "https://..."
}
],
"outputUrlTtlHours": 1
}

outputUrlTtlHours is a conservative cross-operation window, not a promise that the URL expires exactly at that time. OmnAPI does not copy these assets; download them within one hour even when a standard Vidu creation URL would remain valid for up to 24 hours.

The status values are the standard OmnAPI task states: PENDING, PROCESSING, COMPLETED, FAILED, and CANCELLED.

POST /api/v1/vidu/tasks/{taskId}/cancel refunds a task immediately before submission. After submission, OmnAPI requests remote cancellation and refunds only after Vidu confirms it. A 409 means cancellation was not confirmed, so the task remains active and was not refunded; keep polling.

Do not put callback_url in input. Use config.webhookUrl so lifecycle events use the standard OmnAPI webhook contract, including signatures and retries.