Skip to content

API reference

This reference lists every endpoint, parameter, value and limit for Ling Light AI models, grouped by generation type. For a step-by-step walkthrough, read the integration guide.

Basics

ItemValue
Base URLhttps://ling-light.com
AuthenticationAuthorization: Bearer <API_KEY>
Request formatContent-Type: application/json (UTF-8)
TimestampsUnix seconds
VideoAsynchronous: create, then poll
ImageSynchronous, or as an asynchronous task

Authentication

  • Use a model API key created under API keys in the console. It is not your console password, access token or asset access token.
  • A key can restrict models, quota, expiry and IP addresses; requests outside them are rejected.
  • Keep the key on your server. Never put it in web pages, app bundles, repositories, logs or screenshots, or send it to third-party hosts serving result files.

Media URLs

  • Public HTTPS URLs: the provider downloads them directly, so they must work without cookies or auth headers, hotlink protection or short-lived signatures, and must not be localhost, private-network, credentialed or fragment URLs.
  • Asset library references: send the whole string as asset://<asset ID> (1–64 letters or digits) and the gateway replaces it with a short-lived signed URL. The asset must belong to the key’s owner, otherwise 400 asset_reference_not_found. Works on /v1/videos, /v1/images/generations, /v1/images/edits and /v1/images/tasks.
  • Do not reuse the same URL within one request.

Idempotency and retries

EndpointIdempotency-KeyAfter a timeout or 5xx
POST /v1/videosOptional, ≤ 256 bytesRetry with the same key and body to get the original task; do not use a new key.
POST /v1/images/tasksRequired, ≤ 256 bytesRetry with the same key and body to get the original task_id.
POST /v1/images/generations · editsNot supportedThe image may already be billed; check usage logs before retrying.

Error format

Most errors use the first format; video creation returns the second when channel field validation fails. Read both the HTTP status and the message.

General errorjson
{
  "error": {
    "message": "The requested video resolution or duration is not available for this model",
    "type": "new_api_error",
    "code": "video_pricing_combination_unsupported"
  }
}
Video field errorjson
{
  "code": "invalid_request",
  "message": "first_frame and last_frame must be paired",
  "data": null
}

Billing

  • Video: per-second models charge seconds × the resolution rate; per-task models charge a fixed price per resolution regardless of duration. The charge is reserved at submission and refunded for failed tasks. See the model table on Create video for each billing mode and the model list for prices.
  • Image: per-image price × n.
  • Usage logs show the final charges.
Integration guide
The full flow from API key to downloaded result.
Models and prices
Prices per model and resolution.
Last updated