Skip to main content
POST
/
v1
/
videos
/
generations
curl --request POST \
  --url https://api.foxapi.cc/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "sora-2",
  "prompt": "Ocean waves crashing on rocks at golden hour, cinematic",
  "aspect_ratio": "16:9",
  "duration": 8
}
'
{
  "created": 1757165031,
  "id": "task-unified-1757165031-uyujaw3d",
  "model": "<string>",
  "object": "video.generation.task",
  "progress": 0,
  "status": "pending",
  "task_info": {
    "can_cancel": true,
    "estimated_time": 45
  },
  "type": "video"
}

Documentation Index

Fetch the complete documentation index at: https://docs.foxapi.cc/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

All APIs require Bearer Token authentication

Add to request header:

Authorization: Bearer YOUR_API_KEY

Body

application/json
model
string
default:sora-2
required

sora-2: Standard version sora-2-pro: Pro version, automatically generates audio

Examples:

"sora-2"

"sora-2-pro"

prompt
string
required

Text prompt describing the video content you want to generate

Notes:

  • Supports both Chinese and English
  • When using character_ids, reference characters by name in the prompt
  • Maximum 5000 characters
Maximum string length: 5000
Example:

"A lone astronaut stands on Mars, cinematic lighting"

image_urls
string[] | null

Reference image URL list for image-to-video

Notes:

  • Only supports 1 first-frame image
  • Must be a publicly accessible image URL
Example:
["https://example.com/photo.jpg"]
aspect_ratio
string
default:16:9

Output video aspect ratio

Options:

  • 16:9 / 1280x720 — Landscape (default)
  • 9:16 / 720x1280 — Portrait
Example:

"16:9"

duration
integer
default:4

Output video duration (seconds)

Options: 4, 8, 12, 16, 20

Example:

4

resolution
enum<string>
default:720p

Output video resolution

Options:

  • 720p — Standard definition (default)
  • 1080p — High definition

Note: sora-2-pro has higher pricing at 1080p

Available options:
720p,
1080p
character_ids
string[] | null

Character ID list, maximum 2

Notes:

  • Generated by the sora-2-character model
  • Reference characters by name in the prompt

Do not pass this parameter unless necessary.

Example:
["char_abc"]
delete_video
boolean
default:true

Whether to delete the video after retrieval

Notes:

  • Default true (delete)
  • Set to false to preserve the video for subsequent sora-2-pro-remix

Do not pass this parameter unless necessary.

Example:

true

Response

Task created successfully

created
integer

Task creation timestamp

Example:

1757165031

id
string

Task ID

Example:

"task-unified-1757165031-uyujaw3d"

model
string

Actual model name used

object
enum<string>

Specific task type

Available options:
video.generation.task
progress
integer

Task progress percentage (0-100)

Required range: 0 <= x <= 100
Example:

0

status
enum<string>

Task status

Available options:
pending,
processing,
completed,
failed
Example:

"pending"

task_info
object

Async task information

type
enum<string>

Task output type

Available options:
video
Example:

"video"