POST /v3/videos is a deterministic, provider-agnostic video endpoint. You pass a
model and a prompt; Opper runs the job and gives you a URL to poll. The same
two-step flow works across every video provider (Google Veo, xAI Grok-Imagine,
Alibaba Wan, Pruna, and more): only the contents of parameters differ per model.
Video generation is asynchronous: submitting returns immediately with an
id, and you poll for the result. A clip usually takes a few minutes,
sometimes longer.How it works
- Submit:
POST /v3/videoswithmodel+prompt→202 { id, status_url } - Poll:
GET {status_url}untilstatusiscompletedorfailed - Download: fetch the presigned
urlfrom the completed response (valid 1 hour), or sendstore: trueto keep the clip. The result is deleted 24 hours after the job finishes, see How long the result is kept
Run your first generation
1
Get an API key
Create a project-scoped runtime API key in the Opper dashboard.
2
Submit a generation
- curl
- Python
3
Poll until ready, then download
- curl
- Python
How long a job takes
A clip usually takes a few minutes. It can take longer when the provider is busy. If a job times out (error_type: "timeout"), you are not charged.
Poll every 10 seconds or so, or use a webhook.
How long the result is kept
A finished clip is a delivery, not a stored file:- The
urlin a completed response is a presigned link that works for 1 hour (expires_at).GET status_urlagain for a fresh link; each poll signs a new one. - The result itself is deleted 24 hours after the job finishes, or 1 hour after
on a project with zero data retention. After that the status URL answers
404.DELETE /v3/artifacts/{id}removes it sooner. - To keep the clip, download it, or send
store: true: Opper copies it to Files and the completed response carries afile_idthat stays until you delete it.
Models and parameters
model and prompt are required. A model id names its provider, such as
bytedance:ap/seedance-2.5 or kling:sg/kling-3.0-pro: the same model can be served
by several providers, each with its own inputs, defaults and price. A bare name
like seedance-2.5 answers 400 with the ids that serve it.
Length, resolution and shape are top-level fields, normalized for every model:
GET /v3/videos/models. Each
model’s params.video lists its accepted aspect_ratios, resolutions and
max_duration, plus a parameters list of the provider knobs it takes, and
pricing gives its per-second rates:
Audio
Many models render native sound. Whether a silent clip is cheaper depends on the model:
The default differs by provider, so set
parameters.generate_audio to true or
false explicitly on the models that take it. A model whose rate depends on it
shows an audio dimension on its pricing.rates, or a separate
price_per_second_audio; a model with neither bills the same with or without
sound.
Image, video and audio inputs
Each input is an http(s) URL, a data-URI, or afile_id. A model takes an input
only when it has the matching capability, and answers 400 otherwise:
A
file_id from a previous image generation or upload works as any of these inputs, with no re-upload. See Files for how files work, lifecycle, and storage quotas.Edit a clip (Seedance 2.5 on BytePlus)
Errors and retries
A request Opper can check up front, such as a length, ratio or input the model does not take, is refused at submit with a400 that names what the model
accepts. Anything that fails later shows on the status poll (and the
video.failed webhook) as status: "failed" with an error message and an
error_type. A failed job is not charged.
Treat an
error_type you do not recognize like provider_error.
Seedance’s copyright filter on generated sound sometimes refuses a harmless
prompt (OutputAudioSensitiveContentDetected). The same request often passes on
a second try, and a silent clip (generate_audio: false) skips the filter.
Rate limits (429)
A429 means a provider, or a concurrency limit on your organization, is at
capacity right now. It is not a fault in the request. The response carries a
Retry-After header with the seconds to wait: wait at least that long, then
retry, waiting longer each time. Never retry a 429 in a tight loop. When a
provider refuses a job’s create call with a 429 before doing any work, Opper
already retries it up to max_retries times (default 2) and bills only the
attempt that succeeds.
Sending many jobs at once
Providers run a fixed number of jobs at once per account and queue the rest, so a burst of jobs finishes in waves and later jobs take longer. For bursts:- Use a webhook instead of polling every job.
- Spread submits over time when you can, and expect queue time on top of the render time.
- Keep each job’s id with your own record, so a late
video.completedfinds its owner.
Inputs must stay reachable
The provider fetchesimage, video and audio inputs when it starts the
job, which can be many minutes after submit when it queues. A URL you pass must
still work then, so do not send a short-lived presigned link. Prefer a
file_id: Opper signs it for the provider for the life of the job.
Reference
- Generate a video:
POST /v3/videos - List video models:
GET /v3/videos/models