Skip to main content
POST
/
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": 5,
    "aspect_ratio": "16:9",
    "image_urls": ["https://example.com/image.png"]
  }'
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01K8SGYNNNVBQTXNR4MM964S7K"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.apimart.ai/llms.txt

Use this file to discover all available pages before exploring further.

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": 5,
    "aspect_ratio": "16:9",
    "image_urls": ["https://example.com/image.png"]
  }'
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01K8SGYNNNVBQTXNR4MM964S7K"
    }
  ]
}

Authorization

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

Request Parameters

model
string
default:"sora-2"
required
Video generation model nameExample: "sora-2"
prompt
string
required
Text description for video generation
duration
integer
Video duration in secondsExample: 5
aspect_ratio
string
Video aspect ratioSupported formats:
  • 16:9 (Landscape)
  • 9:16 (Portrait)
image_urls
array<url>
Array of reference image URLs for image-to-video generationSupports publicly accessible image URLs (http:// or https://)Example: ["https://example.com/image.jpg"]Limitations:
  • Maximum file size: 10MB
  • Supported formats: .jpeg, .jpg, .png, .webp

Response

created
integer
Task creation timestamp
id
string
Unique task identifier
model
string
The actual model name used
object
string
Object type, fixed as video.generation.task
progress
integer
Task completion progress percentage (0-100)
status
string
Task statusPossible values:
  • pending - Waiting for processing
  • processing - In progress
  • completed - Completed
  • failed - Failed
task_info
object
Task details
type
string
Output type, fixed as video
usage
object
Billing information