Skip to main content
POST

Authorization

string
required
All interfaces require Bearer Token authenticationGet API Key:Visit API Key Management Page to get your API KeyAdd to request header:

Request Parameters

string
default:"sora-2-preview"
required
Video generation model nameSupported models:
  • sora-2-preview - Standard version
Example: "sora-2-preview"
string
required
Text description for video generationDescribe the video content you want to generate in detail, including scenes, actions, atmosphere, etc.Example: "A majestic waterfall cascading down rocky cliffs, creating a beautiful rainbow in the mist"
integer
default:"4"
Video duration (seconds)Only supports the following duration values:
  • 4 - 4 second video
  • 8 - 8 second video
  • 12 - 12 second video
Other duration values will return an error.Example: 8
string
default:"landscape"
Video aspect ratioSupported formats:
  • landscape or 16:9 - Landscape (16:9)
  • portrait or 9:16 - Portrait (9:16)
Does not support square (1:1) videos.Example: "landscape"
When image_urls is provided (image-to-video), the aspect_ratio parameter is ignored and does not need to be sent; the orientation is determined automatically from the reference image.
array<url>
Reference image URL array for image-to-videoImportant limitation: Only the first image is used as referenceWhen using reference images, the API will automatically detect the image aspect ratio and override the user-provided aspect_ratio parameter.Solutions:
  • To precisely control the output video aspect ratio, do not use reference images (pure text-to-video)
  • If you must use reference images, ensure the reference image itself has the target aspect ratio
Example: ["https://cdn.apimart.ai/doc/sora-2-preview.png"]Limitations:
  • Maximum file size: 10MB
  • Supported formats: .jpeg, .jpg, .png, .webp

Response

integer
Response status code, 200 on success
array
Response data array

Pricing

  • Billing method: Per video duration (seconds)
  • Specific pricing: Please refer to Pricing Page