Task Endpoints
Task endpoints are used to initiate processing jobs and check their status.
Video to Shorts
Convert a long video into multiple viral-ready short clips.
Endpoint: POST /tasks/video-to-shorts
Request
POST /v2/tasks/video-to-shorts
Authorization: Bearer <your-api-key>
Content-Type: application/json
{
"source_video_url": "https://example.com/video.mp4",
"language": "en",
"max_duration": 30,
"max_clip_count": 5
}
Request Parameters
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
source_video_url | string | Yes | - | URL of the video to be processed |
language | string | No | Auto-detected | Language of the source video (e.g., “en”, “es”) |
translate_to | string | No | - | Target language for translation |
name | string | No | ”Upload” | A name for the task |
target_clip_count | integer | No | 10 | Desired number of clips to generate |
max_clip_count | integer | No | 10 | Maximum number of clips to generate |
min_duration | integer | No | 1 | Minimum duration for clips in seconds (1-120) |
max_duration | integer | No | 180 | Maximum duration for clips in seconds (1-180) |
target_duration | integer | No | 60 | Target duration for clips in seconds (1-120) |
editing_options | object | No | - | See Editing Options |
dimensions | object | No | - | See Dimensions |
style_preset_id | string | No | - | Style preset identifier |
Editing Options
Parameter | Type | Default | Description |
---|---|---|---|
captions | boolean | true | Include captions in the shorts |
reframe | boolean | true | Reframe the video content |
emojis | boolean | true | Include emojis in the captions |
intro_title | boolean | true | Include a hook title at the beginning |
remove_silences | boolean | false | Remove silences from the video |
Dimensions
Parameter | Type | Default | Description |
---|---|---|---|
width | integer | 1080 | Width of the output video |
height | integer | 1920 | Height of the output video |
Limitations
- Maximum input video length: 5 hours
Response
Returns a Task Object with the following fields:
{
"id": "task_001",
"type": "video-to-shorts",
"status": "processing",
"created_at": "2023-10-01T12:00:00Z",
"output_type": "folder",
"output_id": "folder_001"
}
Video to Video
Edit a single video with AI-powered enhancements.
Endpoint: POST /tasks/video-to-video
Request
POST /v2/tasks/video-to-video
Authorization: Bearer <your-api-key>
Content-Type: application/json
{
"source_video_url": "https://example.com/video.mp4",
"language": "en",
"editing_options": {
"captions": true,
"reframe": true
}
}
Request Parameters
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
source_video_url | string | Yes | - | URL of the video to be processed |
language | string | No | Auto-detected | Language of the source video (e.g., “en”, “es”) |
translate_to | string | No | - | Target language for translation |
name | string | No | ”Upload” | A name for the task |
editing_options | object | Yes | - | See Editing Options |
dimensions | object | No | width: 1080, height: 1920 | See Dimensions |
style_preset_id | string | No | - | Style preset identifier |
Limitations
- Maximum input video length: 15 minutes
Response
Returns a Task Object with the following fields:
{
"id": "task_001",
"type": "video-to-video",
"status": "processing",
"created_at": "2023-10-01T12:00:00Z",
"output_type": "project",
"output_id": "project_001"
}
Get Task
Get the status of a processing task.
Endpoint: GET /tasks/{task_id}
Request
GET /v2/tasks/{task_id}
Authorization: Bearer <your-api-key>
Path Parameters
Parameter | Type | Description |
---|---|---|
task_id | string | ID of the task to retrieve |
Response
Returns a Task Object with the current status:
{
"id": "task_001",
"type": "video-to-shorts",
"status": "ready",
"created_at": "2023-10-01T12:00:00Z",
"output_type": "folder",
"output_id": "folder_001"
}
Possible Status Values
Status | Description |
---|---|
processing | Task is still being processed |
ready | Task has completed successfully |
error | Task has failed |