Generate standalone videos
Create standalone AI videos from a text prompt, a starting image, start and end frames, up to 9 reference images, or a synchronized audio track. For full-song music videos with storyboards and multi-shot editing, use the Music Video API.
The Video API follows the standard Task model:
authenticate with x-api-key, supply public HTTPS URLs for any reference media
(no large-file upload required), receive a taskId, and poll or receive a
completion webhook.
Modes and URL-only media inputs
Section titled “Modes and URL-only media inputs”The generation mode is inferred automatically from the media URLs you provide:
| Mode | Required media fields | Description |
|---|---|---|
t2v | None (prompt only) | Text-to-video generation. |
i2v | imageUrl (or firstFrameUrl) | Image-to-video starting from a first frame. |
l2v | lastFrameUrl | Video ending on a target final frame. |
fl2v | firstFrameUrl + lastFrameUrl | Video transitioning between start and end frames. |
ref2v | referenceImageUrls (1–9 URLs) | Multi-image reference generation for subjects, objects, or style. |
Input rules:
- All media fields (
imageUrl,firstFrameUrl,lastFrameUrl,referenceImageUrls,audioUrl) accept publicly reachablehttps://URLs without embedded credentials. imageUrlcannot be combined withfirstFrameUrl,lastFrameUrl, orreferenceImageUrls.referenceImageUrlscannot be combined withfirstFrameUrlorlastFrameUrl.- Optional
audioUrllocks lip movement and motion rhythm to the supplied audio track. Audio length must match the delivered output duration (for example, about5.17seconds for a5-second request). promptOptimizerdefaults totrue, rewriting free-text prompts into structured motion and camera descriptions on first submission. SetpromptOptimizer: falseto send your prompt verbatim.
Check capabilities and quote credits
Section titled “Check capabilities and quote credits”GET /api/v1/videos/capabilities
Section titled “GET /api/v1/videos/capabilities”Requires task:read. Returns supported modes, resolutions (480p, 768p,
1080p, 2k), aspect ratios (21:9 through 9:21), duration bounds (5–15
seconds), audio lock support, and the published per-second credit rate table.
curl https://api.omnapi.com/api/v1/videos/capabilities \ -H "x-api-key: $OMNAPI_KEY"POST /api/v1/videos/quote
Section titled “POST /api/v1/videos/quote”Requires task:create. Read-only credit quote with no balance deduction and no
external media download.
curl -X POST https://api.omnapi.com/api/v1/videos/quote \ -H "x-api-key: $OMNAPI_KEY" \ -H "Content-Type: application/json" \ -d '{ "resolution": "768p", "aspectRatio": "16:9", "duration": 5, "imageUrl": "https://media.example.com/start.jpg" }'Create a video task
Section titled “Create a video task”POST /api/v1/videos
Section titled “POST /api/v1/videos”Requires task:create and a unique Idempotency-Key header for each new
logical generation. Reuse the same Idempotency-Key and identical JSON body to
safely retry a timed-out request without double-charging credits.
export REQUEST_KEY="$(uuidgen)"curl -X POST https://api.omnapi.com/api/v1/videos \ -H "x-api-key: $OMNAPI_KEY" \ -H "Idempotency-Key: $REQUEST_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "A golden-hour lighthouse beside crashing ocean waves, slow cinematic push-in", "aspectRatio": "16:9", "resolution": "1080p", "duration": 5, "maxCredits": 60 }'curl -X POST https://api.omnapi.com/api/v1/videos \ -H "x-api-key: $OMNAPI_KEY" \ -H "Idempotency-Key: $REQUEST_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Gentle wind moves the hair as the camera slowly orbits right", "imageUrl": "https://media.example.com/portrait.jpg", "aspectRatio": "9:16", "resolution": "768p", "duration": 5 }'curl -X POST https://api.omnapi.com/api/v1/videos \ -H "x-api-key: $OMNAPI_KEY" \ -H "Idempotency-Key: $REQUEST_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Smooth camera dolly from the doorway into the sunlit studio", "firstFrameUrl": "https://media.example.com/frame-start.jpg", "lastFrameUrl": "https://media.example.com/frame-end.jpg", "aspectRatio": "16:9", "resolution": "768p", "duration": 5 }'curl -X POST https://api.omnapi.com/api/v1/videos \ -H "x-api-key: $OMNAPI_KEY" \ -H "Idempotency-Key: $REQUEST_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "The singer from image 1 performs on the stage from image 2 under warm spotlights", "referenceImageUrls": [ "https://media.example.com/singer.jpg", "https://media.example.com/stage.jpg" ], "audioUrl": "https://media.example.com/vocal-5s.wav", "aspectRatio": "16:9", "resolution": "768p", "duration": 5 }'Response
Section titled “Response”{ "taskId": "01995900-0000-7000-8000-000000000101", "model": "omn-video-1", "mode": "i2v", "status": "PENDING", "creditsRequired": 30, "pollUrl": "/api/v1/videos/01995900-0000-7000-8000-000000000101"}Poll results or cancel
Section titled “Poll results or cancel”GET /api/v1/videos/{id}
Section titled “GET /api/v1/videos/{id}”Requires task:read. Returns lifecycle status (PENDING, PROCESSING,
POLLING, COMPLETED, FAILED, CANCELLED), progress percentage, and the
delivered MP4 output once COMPLETED. You can also use the shared
GET /api/v1/tasks/{taskId} endpoint or SSE stream at
GET /api/v1/tasks/{taskId}/stream.
curl https://api.omnapi.com/api/v1/videos/01995900-0000-7000-8000-000000000101 \ -H "x-api-key: $OMNAPI_KEY"{ "taskId": "01995900-0000-7000-8000-000000000101", "model": "omn-video-1", "status": "COMPLETED", "progress": 100, "creditsUsed": 30, "output": { "url": "https://media.example.com/play/output.mp4", "downloadUrl": "https://media.example.com/download/output.mp4", "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "width": 1280, "height": 768, "duration": 5.17, "retainUntil": "2026-12-16T00:00:00.000Z" }, "error": null, "createdAt": "2026-12-01T10:00:00.000Z", "completedAt": "2026-12-01T10:00:42.000Z"}Download and archive output.downloadUrl before output.retainUntil if you
need long-term retention, and verify integrity with output.sha256.
POST /api/v1/videos/{id}/cancel
Section titled “POST /api/v1/videos/{id}/cancel”Requires task:cancel. Cancels a queued or active video generation task.
curl -X POST https://api.omnapi.com/api/v1/videos/01995900-0000-7000-8000-000000000101/cancel \ -H "x-api-key: $OMNAPI_KEY"Pricing and refunds
Section titled “Pricing and refunds”Credits are deducted atomically at task creation based on output resolution and
requested duration (creditsPerSecond × duration):
| Resolution | Credits / second | 5-second example | 8-second example |
|---|---|---|---|
480p | 4 | 20 credits | 32 credits |
768p | 6 | 30 credits | 48 credits |
1080p | 12 | 60 credits | 96 credits |
2k (1440p short edge) | 24 | 120 credits | 192 credits |
- Set
maxCreditsonPOST /api/v1/videosto guard against unexpected charges. - If server-side media validation fails, external media cannot be fetched, generation fails, or a cancellation is confirmed before completion, OmnAPI automatically refunds the full credit charge. See Credits and refunds.