Skip to main content

Video

POST https://gateway.primexos.com/v1/videos/generations

Text-to-video generation through the enabled video catalogue. Video is billed per second of output; supported durations and sizes depend on the selected model.

Generate a video​

curl https://gateway.primexos.com/v1/videos/generations \
-H "Authorization: Bearer prx-YOUR_KEY" \
-H "X-Primex-Operation-ID: unique-id-for-this-video-request" \
-H "Content-Type: application/json" \
-d '{
"model": "sora-2",
"prompt": "A drone shot over a neon city at night",
"seconds": 8,
"size": "720x1280"
}'

Keep one operation ID for this logical video request and reuse it if the outcome is uncertain; see Retries & idempotency. The Gateway currently accepts direct video requests without it. The planned shared-output mode will require it and return 409 for an already submitted operation rather than start a second paid supplier job.

Job lifecycle​

Video generation is asynchronous. The gateway manages the job with Azure and returns the finished video when it's ready. Billing is metered from the actual seconds of output produced. As with every endpoint, a failed generation costs nothing (see Billing).

ParameterDescription
promptText description of the scene.
secondsRequested clip length supported by the selected model.
sizeRequested output dimensions supported by the selected model.
imageOptional PNG/JPEG/WebP reference as a data URL or public HTTPS URL. Its dimensions must match size.
file_idFinalized same-account VIDEO_REFERENCE or IMAGE_REFERENCE from the Files API, instead of image.
remix_video_idA source video job ID recorded for your account. A remix inherits its size and duration; omit image, file_id, size, and seconds.

The current route accepts clip lengths of 4, 8, or 12 seconds, with a four-second default. It defaults to 1280x720; the provider also validates model-specific sizes. Reference images are not automatically resized. The finished response includes a video URL; Primex-hosted video supports byte-range playback.

Remix results and billing​

A remix uses an owned source video and a new prompt. A completed job means the provider produced a video; it does not guarantee that every requested visual change appears. Inspect the result before requesting another remix. Completed remixes are billed by output duration, including when the result does not match your visual intent. Another remix starts a separate paid job.

Use the live catalogue for availability, supported options, and current pricing.