EndpointsTasks

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

ParameterTypeRequiredDefaultDescription
source_video_urlstringYes-URL of the video to be processed
languagestringNoAuto-detectedLanguage of the source video (e.g., “en”, “es”)
translate_tostringNo-Target language for translation
namestringNo”Upload”A name for the task
target_clip_countintegerNo10Desired number of clips to generate
max_clip_countintegerNo10Maximum number of clips to generate
min_durationintegerNo1Minimum duration for clips in seconds (1-120)
max_durationintegerNo180Maximum duration for clips in seconds (1-180)
target_durationintegerNo60Target duration for clips in seconds (1-120)
editing_optionsobjectNo-See Editing Options
dimensionsobjectNo-See Dimensions
style_preset_idstringNo-Style preset identifier

Editing Options

ParameterTypeDefaultDescription
captionsbooleantrueInclude captions in the shorts
reframebooleantrueReframe the video content
emojisbooleantrueInclude emojis in the captions
intro_titlebooleantrueInclude a hook title at the beginning
remove_silencesbooleanfalseRemove silences from the video

Dimensions

ParameterTypeDefaultDescription
widthinteger1080Width of the output video
heightinteger1920Height 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

ParameterTypeRequiredDefaultDescription
source_video_urlstringYes-URL of the video to be processed
languagestringNoAuto-detectedLanguage of the source video (e.g., “en”, “es”)
translate_tostringNo-Target language for translation
namestringNo”Upload”A name for the task
editing_optionsobjectYes-See Editing Options
dimensionsobjectNowidth: 1080, height: 1920See Dimensions
style_preset_idstringNo-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

ParameterTypeDescription
task_idstringID 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

StatusDescription
processingTask is still being processed
readyTask has completed successfully
errorTask has failed