HomeDocsSora 2 API
Video APIs

Sora 2 API

Generate cinematic 1080p sequences with director-level camera control, scripted scene blocks, and signed delivery links. · Updated 2025-03-18

Overview

Sora 2 renders up to sixty-second videos at 1080p using a multimodal spatio-temporal transformer. It accepts structured scene directives, camera motion presets, and lighting cues, making it ideal for product launches, cinematic teasers, and internal creative tooling.

Key capabilities

  • Scene-level prompts with shot lists, per-shot duration, and transition controls.
  • 12 camera motion presets including orbit, dolly, handheld, and follow.
  • Background rendering, preview GIF generation, and signed delivery URLs.
  • Webhook and polling support for long-running tasks.

Authentication

Send every request with an API key generated in the Transend console:

Authorization: Bearer <TRANSEND_API_KEY>

Rotate keys regularly and scope them to a workspace that grants access to video models.

Create a Generation

curl -X POST "https://api.transendai.net/v1/videos/sora2/generation" \
  -H "Authorization: Bearer $TRANSEND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Aerial neon Tokyo establishing shot transitioning to close-up umbrellas in the rain.",
    "duration_seconds": 45,
    "camera": { "motion": "orbit", "speed": 0.6 },
    "lighting": { "temperature": 4200, "style": "rainy-night" },
    "webhook_url": "https://api.example.com/hooks/sora"
  }'

Required fields

FieldTypeDescription
promptstringNarrative description of the full sequence.
duration_secondsnumberTotal timeline length (15–60 seconds).
camera.motionstringCamera preset (orbit, dolly-in, handheld, etc.).

Optional fields

FieldTypeDescription
camera.speednumberMotion multiplier (0.1–1.0).
lightingobjectColor temperature, intensity, style.
storyboardarrayStructured shot list overriding the top-level prompt.
webhook_urlstringURL notified on status change.

Task Lifecycle

Video renders complete asynchronously. Track progress using the task endpoint:

curl "https://api.transendai.net/v1/tasks/task_abc123" \
  -H "Authorization: Bearer $TRANSEND_API_KEY"

Response (truncated):

{
  "task_id": "task_abc123",
  "status": "running",
  "progress": 42,
  "result": null,
  "trace_id": "vid_sora_9f0a"
}

Statuses: queued, running, succeeded, failed. When status becomes succeeded, the payload includes:

"result": {
  "preview_gif": "https://edge.transendai.net/previews/task_abc123.gif",
  "video_url": "https://edge.transendai.net/secure/task_abc123.mp4?signature=...",
  "duration_seconds": 45
}

Signed URLs expire after 24 hours; extend them with the asset retention API.

Camera and Scene Presets

MotionDescription
orbitCircular path around the focal subject.
dolly-inSmooth forward push toward the subject.
followLocks onto a moving subject, keeping it centered.
handheldAdds subtle shake and parallax.

Include a storyboard array to chain multiple shots:

"storyboard": [
  { "id": "scene-1", "prompt": "Wide aerial of neon Tokyo", "duration_seconds": 18 },
  { "id": "scene-2", "prompt": "Close-up of umbrellas catching raindrops", "duration_seconds": 12, "camera": { "motion": "handheld" } }
]

Error Codes

CodeMeaningResolution
400Invalid duration or malformed storyboard.Ensure each scene duration totals ≤ 60 seconds and prompts are strings.
401Missing/invalid API key.Rotate your key and retry with the Bearer header.
429Concurrency limit reached.Implement exponential backoff or request higher quota.
500Internal rendering failure.Capture trace_id and contact support with scene parameters.

Best Practices

  • Start with shorter sequences to validate creative direction, then scale up to 60-second timelines.
  • Provide audio or timing references through webhook_metadata to integrate downstream systems.
  • Use watermarked preview GIFs in approval flows to avoid distributing large assets prematurely.
  • Monitor per-shot costs with the /meters API or the billing dashboard.

Related APIs