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",
    "url": "https://upload.apimart.ai/f/video/9998234807907072-ad4c2656-94a4-44d4-9eaa-5be2855a7798-video_task_01KBYT63R1TGZNT4EHAD495ZJ3.mp4",
    "timestamps": "1,3"
  }'
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01KBYT59JDHB4A3KDDR9N9JVWP"
    }
  ]
}
curl --request POST \
  --url https://api.apimart.ai/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "sora-2",
    "url": "https://upload.apimart.ai/f/video/9998234807907072-ad4c2656-94a4-44d4-9eaa-5be2855a7798-video_task_01KBYT63R1TGZNT4EHAD495ZJ3.mp4",
    "timestamps": "1,3"
  }'
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01KBYT59JDHB4A3KDDR9N9JVWP"
    }
  ]
}

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
Example: "sora-2" or "sora-2-pro"
timestamps
string
required
Character appearance timestamp rangeIn seconds, format: "start_second,end_second"⚠️ Limitations:
  • Minimum time range difference: 1 second
  • Maximum time range difference: 3 seconds
Example: "1,3" means the character appearing from second 1 to second 3 in the video
url
string
Video URL containing the character to create⚠️ Requirements:
  • Video must contain sound
  • Video must contain a character
💡 Note:
  • Either url or from_task must be provided (choose one)
Example: "https://upload.apimart.ai/f/video/9998234807907072-ad4c2656-94a4-44d4-9eaa-5be2855a7798-video_task_01KBYT63R1TGZNT4EHAD495ZJ3.mp4"
from_task
string
Previously generated video task IDCreate a character from an already generated video task💡 Note:
  • Either url or from_task must be provided (choose one)
  • Use this parameter to extract characters directly from previously generated video tasks
Example: "task_01KBYT59JDHB4A3KDDR9N9JVWP"

Response

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