POST
/
sora-2
/
generate
Generate Video
curl --request POST \
  --url https://api.unifically.com/sora-2/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "<string>",
  "duration": 123,
  "aspect_ratio": "<string>",
  "image_url": "<string>"
}
'
{
  "code": 200,
  "data": {
    "status": "pending",
    "task_id": "01k76z3k5yfq9rd4mkr2bz7716"
  }
}
Generate high-quality AI videos using OpenAI’s Sora 2 model.

Pricing

For current pricing, see the Pricing page.

Request

curl --location 'https://api.unifically.com/sora-2/generate' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Connection: keep-alive' \
--header 'Content-Type: application/json' \
--data '{
  "prompt": "dancing robot",
  "aspect_ratio": "16:9",
  "image_url": "https://example.com/image.jpg",
  "duration": 15
}'

Parameters

prompt
string
required
Detailed text description of the video to generate
duration
number
Video duration in secondsOptions: 10, 15, 25
aspect_ratio
string
Video aspect ratioOptions: "16:9", "9:16"
image_url
string
Publicly accessible URL of reference image for image-to-video generationExample: "https://example.com/reference.jpg"

Response

{
  "code": 200,
  "data": {
    "status": "pending",
    "task_id": "01k76z3k5yfq9rd4mkr2bz7716"
  }
}

Response Fields

code
integer
default:"200"
HTTP status code (200 for success)
data
object
Response data
status
string
Current task status: pending, processing, completed, failed
task_id
string
Unique identifier for this generation task
Use the task_id to check the status using the Get Task endpoint.