BeLive Token Hub
API ReferenceVideoKling

Kling O1

Kling O1 video generation API for text, image, and video inputs.

Kling O1 uses an asynchronous task API for text, image, element, and video inputs. Submit a task, receive its ID, then query the task for status and outputs.

Create a task

ItemValue
MethodPOST
URLhttps://api.tokenhub.belivestudios.com/omni-video/kling-o1
AuthenticationHeader Authorization: Bearer sk-your-belive-studios-key
Content-Typeapplication/json
curl https://api.tokenhub.belivestudios.com/omni-video/kling-o1 \
  -H "Authorization: Bearer sk-your-belive-studios-key" \
  -H "Content-Type: application/json" \
  -d '{
  "contents": [
    {
      "type": "prompt",
      "text": "Have the subject walk naturally through a city street while the camera follows smoothly"
    },
    {
      "type": "first_frame",
      "url": "https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-tob-release_note/image_25.png",
      "id": "image_1"
    },
    {
      "type": "refer_image",
      "url": "https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-tob-release_note/image_25.png",
      "id": "image_2"
    }
  ],
  "settings": {
    "resolution": "1080p",
    "duration": 5,
    "aspect_ratio": "16:9",
    "audio": "off"
  },
  "options": {
    "external_task_id": "video-task-o1",
    "watermark_info": {
      "enabled": false
    }
  }
}'

Request parameters

FieldTypeRequiredDefaultValuesDescription
contentsarrayYes--Collection of prompt, image, element, and video inputs.
contents[].typestringYes-prompt, first_frame, last_frame, refer_image, feature_video, base_video, elementInput type.
contents[].textstringRequired for prompt--Prompt text, up to 2,500 characters.
contents[].urlstringRequired for image/video types-URL (Base64 for images)Image or video content.
contents[].idstringNo (element requires it)--Per-task asset ID, referenced as @id; must be unique.
contents[].element_idstringRequired for element--System-generated element ID.
settingsobjectNo--Output settings.
settings.audiostringNoofforiginal, offKeep reference-video audio or disable audio.
settings.resolutionstringNo720p720p, 1080pOutput resolution.
settings.aspect_ratiostringConditional16:916:9, 9:16, 1:1Must be supplied when there is no first frame and no reference video.
settings.durationintegerNo53–10Duration in seconds. First-frame-only input without other references supports only 5 or 10 seconds.
optionsobjectNo--Callback, custom task ID, and watermark settings.
options.callback_urlstringNo--URL that receives task status callbacks.
options.external_task_idstringNo--Account-unique custom task ID, also usable for queries.
options.watermark_infoobjectNo--Watermark configuration.
options.watermark_info.enabledbooleanNofalsetrue, falseWhether to generate a watermarked result. Custom watermarks are not supported.

contents input types

typePurposeFields
promptPrompt inputtext
first_frameFirst-frame imageurl; optional id
last_frameLast-frame imageurl; optional id
refer_imageScene, style, or element reference imageurl; optional id
feature_videoFeature reference videourl; optional id
base_videoVideo to editurl; optional id
elementPreviously created elementelement_id, id

Input and combination rules

  • Images: JPG, JPEG, or PNG; up to 50 MB; both dimensions at least 300 px; aspect ratio 1:2.5 to 2.5:1.
  • Videos: MP4 or MOV; up to 200 MB; 3–10 seconds; 700–2160 px; 24–60 fps; at most one reference video.
  • first_frame, last_frame, and refer_image use images. First-frame-only or first-plus-last-frame is supported; last-frame-only is not. Do not add other reference images when both first and last frames are used.
  • feature_video supports a first-frame definition only. base_video cannot define a first or last frame.
  • element supports multi-image elements only, not video-character elements. Elements cannot be used with first/last-frame generation.
  • Image and element counts together must not exceed 7 without a reference video, or 4 with a reference video.
  • Use @id in the prompt to reference an image, element, or video. IDs must be unique and should not contain one another or create ambiguity with prompt text.

Create response

{
  "code": 0,
  "message": "string",
  "request_id": "string",
  "data": {
    "id": "893605946402811985",
    "status": "submitted",
    "create_time": 1781080778802,
    "update_time": 1781080794151,
    "external_id": "video-task-o1"
  }
}

status can be submitted, processing, succeeded, or failed.

FieldDescription
codeError code; 0 indicates success.
messageError or status message.
request_idSystem-generated request ID for tracing.
data.idSystem-generated task ID.
data.statusCurrent task status.
data.create_time, data.update_timeCreation and update times as Unix millisecond timestamps.
data.external_idCustom task ID, when supplied.

Query a task

GET https://api.tokenhub.belivestudios.com/tasks

Provide exactly one of task_ids or external_task_ids; multiple IDs can be comma-separated.

Query parameterTypeRequiredDescription
task_idsstringOne of the twoSystem task IDs, comma-separated for a batch.
external_task_idsstringOne of the twoCustom task IDs, comma-separated for a batch.
curl "https://api.tokenhub.belivestudios.com/tasks?task_ids=893605946402811985" \
  -H "Authorization: Bearer sk-your-belive-studios-key" \
  -H "Content-Type: application/json"

The response contains code, message, request_id, and data[]. Each task can include:

FieldDescription
id, status, messageTask ID, state, and status message; failures include the reason.
create_time, update_timeCreation and update times as Unix millisecond timestamps.
external_idCustom task ID, when supplied.
outputsGenerated outputs. URLs are generally removed after 30 days; save them promptly.
billingBilling details for the task.
{
  "code": 0,
  "message": "string",
  "request_id": "string",
  "data": [
    {
      "id": "893605946402811985",
      "status": "succeeded",
      "message": "string",
      "create_time": 1781080778802,
      "update_time": 1781080794151,
      "external_id": "video-task-o1",
      "outputs": [
        {
          "type": "video",
          "id": "string",
          "url": "string",
          "watermark_url": "string",
          "duration": "5"
        }
      ],
      "billing": [
        {
          "charge_type": "cash",
          "cash_type": "balance",
          "amount": "string",
          "currency": "CNY",
          "list_price": "string"
        }
      ]
    }
  ]
}

outputs[] fields depend on type:

  • video: id, url, watermark_url, duration.
  • image: url, watermark_url, group_id (for grouped images).
  • audio: id, mp3_url, wav_url, mp3_duration, wav_duration.
  • voice: id, name, url, owned_by, status.
  • element: id, name, description, element_type, references, owned_by, status, tags.

Element references[] can contain type, role, and url; voice references can also include id, name, and owned_by. Each tags[] entry has id, name, and description.

billing[] fieldDescription
charge_typecash for credit or unit for a resource package.
cash_typebalance or test_balance; present for charge_type=cash.
amountDeducted amount: discounted price for credit, or points for packages.
currencyCNY or USD; present for cash charges.
package_typevideo, image, or audio; present for unit charges.
list_priceCredit list price; present for cash charges.

Cursor query

POST https://api.tokenhub.belivestudios.com/tasks

This endpoint only queries asynchronous, non-real-time tasks. For the first request, use a time range and filters. For subsequent pages, pass the previous response's data.next_cursor as cursor; when cursor is supplied, start_time and end_time are ignored. The request body supports start_time, end_time, cursor, limit, and filters:

FieldTypeDefaultDescription
start_timestring30 days before end_timeUnix millisecond timestamp; must be earlier than end_time.
end_timestringCurrent timeUnix millisecond timestamp.
cursorstring-Previous data.next_cursor; when supplied, the time range is ignored.
limitinteger100Number of tasks, up to 500.
filtersarray-Query filter collection.
filters[].keystring-status or product_type.
filters[].valuesarray-Status: submitted, processing, succeeded, failed; product type: video, image, try_on.
curl https://api.tokenhub.belivestudios.com/tasks \
  -H "Authorization: Bearer sk-your-belive-studios-key" \
  -H "Content-Type: application/json" \
  -d '{
  "limit": 100,
  "filters": [
    {
      "key": "status",
      "values": [
        "succeeded"
      ]
    },
    {
      "key": "product_type",
      "values": [
        "video"
      ]
    }
  ]
}'

Results are in data.result, with data.count, data.next_cursor, and data.has_more. Each result uses the same task fields as the ID query.

To fetch the next page, pass the previous response's data.next_cursor as cursor:

{
  "cursor": "data.next_cursor from the previous response",
  "limit": 100,
  "filters": [
    {
      "key": "product_type",
      "values": ["video"]
    }
  ]
}

On this page