POST
https://octopusx.ai
/
v1
/
videos
Sora Video Generation
curl --request POST \
  --url https://octopusx.ai/v1/videos \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "prompt": "<string>",
  "size": "<string>",
  "seconds": {},
  "input_reference": [
    "<string>"
  ],
  "metadata": {},
  "character_url": "<string>",
  "character_timestamps": "<string>"
}
'
{
  "id": "video_abc123",
  "object": "video",
  "model": "sora-2",
  "status": "queued",
  "progress": 0,
  "created_at": 1735689600,
  "size": "720x1280"
}

Sora Video Generation

OpenAI-format entry point. If you need to use the unified video POST /v1/video/create, please see Create Video. Sora currently uses POST /v1/videos to submit tasks, with JSON submission as the primary method.
  • The route entry point is POST /v1/videos.
  • JSON submission is currently used.
  • Reference images are first placed into input_reference, and the gateway continues processing according to upstream requirements.
  • In router/video-router.go, /v1/videos is still received uniformly by controller.RelayTask.

Current Models

  • sora-2

Method and Path

POST /v1/videos

Request Example

curl -X POST https://octopusx.ai/v1/videos \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sora-2",
    "prompt": "Cat nodding its head to music, heavy rain",
    "size": "720x1280",
    "seconds": "10",
    "input_reference": "data:image/png;base64,BASE64_IMAGE",
    "metadata": {
      "output_config": {
        "aspect_ratio": "9:16",
        "audio_generation": "Disabled",
        "resolution": "720P"
      }
    }
  }'

Response Example

{
  "id": "video_abc123",
  "object": "video",
  "model": "sora-2",
  "status": "queued",
  "progress": 0,
  "created_at": 1735689600,
  "size": "720x1280"
}

Authentication

Authorization: Bearer YOUR_API_KEY

Body

model
string
required
Model name. Currently only sora-2 is included.
prompt
string
required
Prompt.
size
string
Size string. Common values are currently 720x1280 and 1280x720; in the gateway, sora-2 currently also explicitly validates only these two sizes.
seconds
string | integer
Target duration in seconds. Currently submitted via seconds; the gateway supports both strings and integers.
input_reference
string | array<string>
Reference image input. In current JSON requests, URL, base64, and data URI can be used; multipart file uploads are also supported by the gateway.
metadata
object
Extended configuration. A common pattern is metadata.output_config, which can contain fields such as aspect_ratio, audio_generation, and resolution.
character_url
string
The video link required for Sora character creation. This field exists in the generic DTO, but from the current route design, it is more suitable for use with /sora/v1/characters rather than as a mainline field for POST /v1/videos.
character_timestamps
string
Time range for the character clip, in a format such as 1,3. This is likewise more suitable for the character creation flow.

Current Rules

ItemRule
Default sizeWhen not explicitly provided, the landscape or portrait size is inferred from aspect_ratio
sora-2 size validationThe gateway currently explicitly accepts only 720x1280 and 1280x720
Reference image formatUnder JSON, URL, base64, and data URI can be used; multipart is also still supported by the gateway