Video
Sora 2 Official video
OpenAI Sora 2 Official — fixed durations 4/8/12/16/20s.
Category: Create · sora-2-official
How to use & limits
- Text-to-video with an optional reference image (image-to-video).
- Fixed durations: 4, 8, 12, 16 or 20 seconds.
- Aspect ratio: 16:9 or 9:16.
- image_urls accepts at most 1 reference image.
- prompt is required.
Capabilities
What this model supports, straight from the schema — no pricing, no infrastructure detail.
| Capability | Value |
|---|---|
billing_unit Billing unit | per_video |
text_to_video Text-to-video | Yes |
image_to_video Image-to-video | Yes |
allowed_durations Allowed durations | 4, 8, 12, 16, 20 |
Parameters
Fields accepted in params (or first-class, where applicable) for POST /generations.
| Name | Label | Type | Required | Default | Options | Min / Max | Description |
|---|---|---|---|---|---|---|---|
prompt | Prompt | textarea | Required | — | — | — | Video description (required). |
image_urls | Reference image (max 1) | multi_select | Optional | — | — | — – 1 | One optional reference image (max 1) for image-to-video. |
aspect_ratio | Aspect ratio | select | Optional | 16:9 | 16:9 · 9:16 | — | Aspect ratio: 16:9 or 9:16. |
duration | Duration | select | Optional | 8 | — | — | Fixed duration in seconds: 4, 8, 12, 16 or 20. |
Example request
curl -X POST https://caranguejo.art/api/v1/dev/generations \
-H "Authorization: Bearer $CK" \
-H "Content-Type: application/json" \
-d '{
"model": "sora-2-official",
"prompt": "An astronaut riding a horse across the surface of Mars, red dust in the wind, dramatic sunset, cinematic wide shot.",
"params": {
"duration": 8,
"aspect_ratio": "16:9"
}
}'
const res = await fetch("https://caranguejo.art/api/v1/dev/generations", {
method: "POST",
headers: {
"Authorization": "Bearer " + process.env.CK,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "sora-2-official",
"prompt": "An astronaut riding a horse across the surface of Mars, red dust in the wind, dramatic sunset, cinematic wide shot.",
"params": {
"duration": 8,
"aspect_ratio": "16:9"
}
}),
});
const { data } = await res.json();
Example response
{
"id": "9f0c1a7e-…",
"object": "generation",
"model": "sora-2-official",
"type": "video",
"status": "completed",
"output": {
"assets": [
{
"url": "https://media.caranguejo.art/outputs/example.mp4",
"type": "video"
}
]
}
}
The job's real cost is returned as credits_charged on the completed response — check GET /balance for the account balance.
Common errors for this job type:
insufficient_credits | Account balance can't cover the job cost. |
content_policy_violation | Prompt or media rejected by content policy. |
generation_timeout | The job exceeded the maximum processing time. |
rate_limited | Too many requests per minute. |
invalid_input | A required parameter is missing or outside the model's schema. |
generation_failed | Generic processing failure. |