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": "kling-v3-omni",
    "prompt": "Make the person in <<<image_1>>> wave at the camera",
    "image_urls": ["https://upload.apimart.ai/f/models/9998230426123070-e9d6af04-cb5e-4731-8ae7-abf144cb0d29-9998230586368386-29641169-f698-4ab9-9b6d-380899e6521e-9998230593110693-c1741a3a-.webp"],
    "mode": "std",
    "duration": 5,
    "aspect_ratio": "16:9"
  }'
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_xxxxxxxxxx"
    }
  ]
}
curl --request POST \
  --url https://api.apimart.ai/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "kling-v3-omni",
    "prompt": "Make the person in <<<image_1>>> wave at the camera",
    "image_urls": ["https://upload.apimart.ai/f/models/9998230426123070-e9d6af04-cb5e-4731-8ae7-abf144cb0d29-9998230586368386-29641169-f698-4ab9-9b6d-380899e6521e-9998230593110693-c1741a3a-.webp"],
    "mode": "std",
    "duration": 5,
    "aspect_ratio": "16:9"
  }'
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_xxxxxxxxxx"
    }
  ]
}

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 it to the request header:
Authorization: Bearer YOUR_API_KEY

Request Parameters

model
string
required
Video generation model nameSupported models:
  • kling-v3-omni - Kling v3 Omni (unified interface)
prompt
string
required
Text promptSupports referencing images from image_urls using <<<image_N>>> syntax, where N starts from 1.Example: "Make the person in <<<image_1>>> wave at the camera"
If images are provided but the prompt does not contain any <<<image_N>>> reference, the system will automatically prepend <<<image_1>>> to the prompt.
mode
string
default:"std"
Generation modeOptions:
  • std - Standard mode (720P)
  • pro - Professional mode (1080P)
Default: std
duration
integer
default:"5"
Video duration (seconds)Options: 5 or 10Default: 5
aspect_ratio
string
default:"16:9"
Video aspect ratioOptions:
  • 16:9 - Landscape
  • 9:16 - Portrait
  • 1:1 - Square
Default: 16:9
image_urls
array<url>
Image URL array for image referencingReference corresponding images in the prompt using <<<image_N>>> syntax (N starts from 1)Example: ["https://example.com/photo.jpg"]
  • Image URLs must be publicly accessible without hotlink protection
  • In image-to-video mode, aspect_ratio may be overridden by the actual image ratio
watermark
boolean
Whether to add watermark

Image Reference Syntax

The Omni model uses <<<image_N>>> syntax to reference images in prompts, providing a unified text-to-video/image-to-video experience:
SyntaxDescription
<<<image_1>>>References the 1st image in the image_urls array
<<<image_2>>>References the 2nd image in the image_urls array
Auto Reference: If image_urls is provided but the prompt does not contain any <<<image_N>>> reference, the system will automatically prepend <<<image_1>>> to the prompt.

Response

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

Use Cases

Case 1: Text-to-Video (Standard Mode)

{
  "model": "kling-v3-omni",
  "prompt": "A golden retriever running on the beach, sunset, cinematic",
  "mode": "std",
  "duration": 5,
  "aspect_ratio": "16:9"
}

Case 2: Image Reference (Single Image)

{
  "model": "kling-v3-omni",
  "prompt": "Make the person in <<<image_1>>> wave at the camera",
  "image_urls": ["https://upload.apimart.ai/f/models/9998230426123070-e9d6af04-cb5e-4731-8ae7-abf144cb0d29-9998230586368386-29641169-f698-4ab9-9b6d-380899e6521e-9998230593110693-c1741a3a-.webp"],
  "mode": "pro",
  "duration": 5
}

Case 3: Multiple Image References

{
  "model": "kling-v3-omni",
  "prompt": "The character in <<<image_1>>> walks toward the scene in <<<image_2>>>",
  "image_urls": [
    "https://example.com/character.jpg",
    "https://example.com/scene.jpg"
  ],
  "mode": "pro",
  "duration": 5
}

Case 4: Image Provided Without Explicit Reference (Auto-added)

{
  "model": "kling-v3-omni",
  "prompt": "The person slowly turns and smiles",
  "image_urls": ["https://upload.apimart.ai/f/models/9998230426123070-e9d6af04-cb5e-4731-8ae7-abf144cb0d29-9998230586368386-29641169-f698-4ab9-9b6d-380899e6521e-9998230593110693-c1741a3a-.webp"],
  "mode": "std",
  "duration": 5
}
The system will automatically prepend <<<image_1>>> to the prompt, equivalent to "<<<image_1>>>The person slowly turns and smiles".
Query Task ResultsVideo generation is an async task that returns a task_id upon submission. Use the Get Task Status endpoint to query generation progress and results.