curl --request POST \
--url https://api.shuyou.ai/v1/predictions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "sora-2",
"input": {
"prompt": "A cinematic shot of a majestic lion in the savannah at golden hour",
"aspect_ratio": "16:9",
"resolution": "720P",
"duration": 4
}
}
'{
"data": {
"task_id": "2c4d50261173430290971a2395a3b607",
"task_status": "processing"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>"
}
}OpenAI
OpenAI Sora 2
Create asynchronous video tasks with sora-2 via POST /v1/predictions.
POST
/
v1
/
predictions
curl --request POST \
--url https://api.shuyou.ai/v1/predictions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "sora-2",
"input": {
"prompt": "A cinematic shot of a majestic lion in the savannah at golden hour",
"aspect_ratio": "16:9",
"resolution": "720P",
"duration": 4
}
}
'{
"data": {
"task_id": "2c4d50261173430290971a2395a3b607",
"task_status": "processing"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>"
}
}Overview
OpenAI Sora 2 (sora-2) supports:
- Text-to-video —
prompt(up to 32,000 characters) - Reference-guided generation — optional
first_frame_url
Input parameters
| Field | Required | Default | Notes |
|---|---|---|---|
prompt | Yes | — | Max 32,000 characters |
aspect_ratio | No | 16:9 | 16:9 or 9:16 |
resolution | No | 720P | 720P only |
duration | No | 4 | 4, 8, or 12 seconds |
first_frame_url | No | — | Optional reference URL to guide generation |
Authorizations
Authorization: Bearer YOUR_API_KEY
Body
application/json
Response
Async task created
Show child attributes
Show child attributes