Skip to main content
POST
https://api.apimart.ai
/
v1
/
videos
/
generations
curl --request POST \
  --url https://api.apimart.ai/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "sora-2",
    "prompt": "A waterfall cascading down forming a rainbow",
    "duration": 10,
    "aspect_ratio": "16:9",
    "image_urls": ["https://cdn.apimart.ai/doc/9998238782946594-f62f70ce-348c-4b13-bb5f-15f17bee676b-image_task_01K88BEGZHVJWJ3ZV6HY99SWQR_0.png"]
  }'
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01K8SGYNNNVBQTXNR4MM964S7K"
    }
  ]
}
curl --request POST \
  --url https://api.apimart.ai/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "sora-2",
    "prompt": "A waterfall cascading down forming a rainbow",
    "duration": 10,
    "aspect_ratio": "16:9",
    "image_urls": ["https://cdn.apimart.ai/doc/9998238782946594-f62f70ce-348c-4b13-bb5f-15f17bee676b-image_task_01K88BEGZHVJWJ3ZV6HY99SWQR_0.png"]
  }'
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01K8SGYNNNVBQTXNR4MM964S7K"
    }
  ]
}

Authorizations

Authorization
string
required
All API endpoints require Bearer Token authenticationGet your API Key:Visit the API Key Management Page to get your API KeyAdd it to the request header:
Authorization: Bearer YOUR_API_KEY

Body

model
string
default:"sora-2"
required
Video generation model nameSupported models:
  • sora-2 - Standard version
  • sora-2-pro - Professional version, supports longer duration
Example: "sora-2" or "sora-2-pro"
prompt
string
required
Text description for video generation💡 @Character Reference Feature:You can use @username format in the prompt to reference previously created characters and include them in the generated video.
  • The character’s username can be obtained via the Query Character API
  • Supports referencing multiple characters at once
Example: "A cat and a dog driving a car together @duksvfkf.cruisingki @zdqwahgj.baronbarki"
duration
integer
Video duration in seconds
  • sora-2: Supports 10 or 15 seconds
  • sora-2-pro: Supports 15 seconds (HD) or 25 seconds
Example: 10
aspect_ratio
string
Video aspect_ratioSupported formats:
  • 16:9 (Landscape)
  • 9:16 (Portrait)
image_urls
array
Array of reference image URLs for image-to-video generation💡 Quick fill (Try it area):
  1. Click ”+ Add an item” to add an image URL
  2. Enter the complete image URL address
watermark
boolean
default:"false"
Whether to add a watermark to the generated video
  • false: No watermark
  • true: Add Sora official watermark to the video
Default: false
thumbnail
boolean
Whether to generate a video thumbnail
  • true: Generate a video thumbnail for preview and display
If you don’t need a thumbnail, you can omit this parameter
private
boolean
default:"false"
Whether to enable privacy mode
  • true: Video will not be published and cannot be remixed (re-edited)
  • false: Video can be published and remixed
Default: false
style
string
Video styleSupported values:
  • thanksgiving - Thanksgiving style
  • comic - Comic style
  • news - News style
  • selfie - Selfie style
  • nostalgic - Nostalgic/Retro style
  • anime - Anime style
Example: "anime"
storyboard
boolean
Whether to use storyboard for finer control over video generation details
  • true: Enable storyboard feature
  • false: Do not use storyboard
Example: true
character_url
string
Reference video URL for character extractionUsed to reuse characters from a reference video in the generated videoExample: "https://filesystem.site/cdn/20251030/javYrU4etHVFDqg8by7mViTWHlMOZy.mp4"⚠️ Note: When using this parameter, the generated video duration will be reduced by 1 second
character_timestamps
string
Character appearance timestampsSpecifies the time range in the reference video where the character appears, only supports 2-second segmentsFormat: "start_second,end_second"Example: "1,3" means the character from second 1 to second 3 in the reference video⚠️ Note: When using this parameter, the generated video duration will be reduced by 1 second

Response

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