Skip to content
中文

Create video

POST/openai/v1/videos● Supported

Official OpenAI docs ↗

Request body

  • modelstringoptional◐ Partially supported

    Video model id, for example wan2.7-t2v; list candidates with listModels?type=video. Router support (partial): Select a registered video model explicitly, for example wan2.7-t2v (size=1280x720, seconds=4). Capability preflight errors are reported before creation.

    Select a registered video model explicitly, for example wan2.7-t2v (size=1280x720, seconds=4). Capability preflight errors are reported before creation.

  • promptstringrequired

    Text description of the video, at least 1 character. Router support (supported): Controls video content; missing or empty values return 400.

    Controls video content; missing or empty values return 400.

  • secondsstring | integeroptional

    When both are supplied, seconds overrides duration.

    Duration works on wan2.7-t2v; malformed values or values outside model capabilities return 400 during preflight.

  • durationintegeroptional

    Length of the video in whole seconds. seconds takes precedence when both are given.

  • sizestringoptional◐ Partially supported

    Output resolution as WIDTHxHEIGHT, for example 1280x720. Router support (partial): Subject to model capability preflight. Earlier wan2.7-t2v samples always produced 1280x720; accepted sizes are not guaranteed pixel-for-pixel.

    Subject to model capability preflight. Earlier wan2.7-t2v samples always produced 1280x720; accepted sizes are not guaranteed pixel-for-pixel.

  • input_referencestring | objectoptional

    Reference image for image-to-video: a URL or base64 data URL, an object with image_url, or an uploaded image file (multipart, at most 20 MiB).

    Expand sub-fields (1)
    • image_urlstring | objectrequired

      URL or base64 data URL of the reference image, as a string or an object with url.

  • input_referencesarrayoptional

    Several reference images; each entry is a URL or base64 data URL, or an object with image_url.

    Expand sub-fields (1)
    • image_urlstring | objectrequired

      URL or base64 data URL of the reference image, as a string or an object with url.

  • input_videosarrayoptional

    Platform extension (the OpenAI videos API has no input video): reference videos as HTTP(S) URLs, or objects with video_url.url. Only models that declare it take them (Doubao Seedance 2.5: up to 10 clips totalling 30 s; 2.0: up to 3 totalling 15 s; mp4 or mov, each 2 s or longer and at most 200 MB); any other model answers 400 input_videos is not supported by this model. They combine with input_references but not with frame_images or input_reference. In the prompt, name them @video1, @video2… and the pictures @image1, @image2… in request order. A clip showing a real human face is refused by the model.

    Expand sub-fields (1)
    • video_urlobjectrequired

      The reference video, as an object with url.

  • video_taskanyoptional

    Platform extension, only with input_videos: reference (default) makes a new video that follows the inputs; edit keeps the first video and changes what the prompt names, with the source's ratio and length (send no seconds or size; source 4 to 30 s).

    values referenceedit
  • frame_imagesarrayoptional

    Images that pin the first and last frame; at most 2 entries.

    Expand sub-fields (3)
    • typeanyoptional

      Always image_url. Discriminator of the type-tagged union this object belongs to.

    • frame_typeanyrequired

      Frame to constrain with the supplied image: first_frame or last_frame. Each frame type may occur at most once.

      values first_framelast_frame
    • image_urlobjectrequired

      The image to pin.

  • More parameters (6)
    • resolutionstringoptional

      Output resolution label such as 720p, for models that take a label instead of size.

    • aspect_ratiostringoptional

      Aspect ratio of the video such as 16:9.

    • generate_audiobooleanoptional

      Whether the video carries a generated audio track. Router support (supported): false produces no audio track on wan2.7-t2v; the default output includes audio.

      false produces no audio track on wan2.7-t2v; the default output includes audio.

    • seedintegeroptional

      Seed for reproducible generation, on models that support it.

    • callback_urlstringoptional

      HTTP or HTTPS callback URL, forwarded to models that support completion callbacks.

    • qualitystringoptional

      Provider-specific quality setting.

Returns

200 video

Generates video asynchronously: create a job, poll its status, then download the content. Billed per second of output; GET /model/v1/models exposes pricing.video_second in USD per second. Select a registered video model explicitly, for example wan2.7-t2v.

Errors follow the OpenAI format — see error codes

Request

curl
curl https://api.deepraxis.com/openai/v1/videos \
  -H "Authorization: Bearer $PRAXIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"wan2.7-t2v","prompt":"A cat stretching in the morning sun","seconds":"4","size":"1280x720"}'
Python
from openai import OpenAI

client = OpenAI(
    base_url="https://api.deepraxis.com/openai/v1",
    api_key="$PRAXIS_API_KEY",
)

video = client.videos.create(
    model="wan2.7-t2v",
    prompt="A cat stretching in the morning sun",
    seconds="4",
    size="1280x720",
)
TypeScript
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.deepraxis.com/openai/v1",
  apiKey: "$PRAXIS_API_KEY",
});

const video = await client.videos.create({
  model: "wan2.7-t2v",
  prompt: "A cat stretching in the morning sun",
  seconds: "4",
  size: "1280x720",
});

Response 200

{
  "id": "vjob_2f7b73157212463da76762b0",
  "object": "video",
  "model": "wan2.7-t2v",
  "status": "queued",
  "progress": 0,
  "created_at": 1791870977,
  "completed_at": null,
  "expires_at": null,
  "seconds": "4",
  "size": "1280x720",
  "prompt": "A cat stretching in the morning sun",
  "remixed_from_video_id": null,
  "error": null,
  "polling_url": "/model/v1/videos/vjob_2f7b73157212463da76762b0",
  "unsigned_urls": []
}

Response

HTTP 200

Success

application/json

Name Type Description
id string Id of the video job; pass it as video_id to retrieve, download or delete it.
object string Object type; always video.
model string Model that generates the video.
status string Lifecycle of the job. Poll until it is completed or failed.
progress integer Progress from 0 to 100. It is 0 until the job completes and 100 once it has.
created_at integer Unix time in seconds at which the job was created.
completed_at integer | null Unix time in seconds at which the job completed; null until then.
expires_at integer | null Unix time in seconds after which the output expires; null because outputs currently have no expiry.
seconds string Length of the video in seconds, as a string; for a completed job it is the delivered length.
size string Resolution of the video as WIDTHxHEIGHT; null when the provider did not report one.
prompt string | null Prompt the job was created with.
remixed_from_video_id null Always null; remix is not supported.
error object | null Why the job failed; null unless status is failed.
error.code string Machine-readable failure code.
error.message string Human-readable failure message.
polling_url string Relative URL to poll for the job state; same as retrieveVideo for this job.
unsigned_urls array<string> Relative URLs of the finished output; empty until the video is ready. Download them with the same API key.
usage object Cost of the job; present once a price applies.
usage.cost number Cost of the job in USD: billed seconds times the per-second price once completed, 0 while running. Billed seconds are the delivered seconds, except for a job with input_videos (see billed_seconds).
usage.billed_seconds integer Only on a completed job with input_videos: the seconds it is billed for. The model meters input plus output seconds at a lower rate, converted here to seconds of the delivered resolution, so it can exceed seconds.