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
| Item | Value |
|---|---|
| Base URL | https://ling-light.com |
| Authentication | Authorization: Bearer <API_KEY> |
| Request format | Content-Type: application/json (UTF-8) |
| Timestamps | Unix seconds |
| Video | Asynchronous: create, then poll |
| Image | Synchronous, 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
| Endpoint | Idempotency-Key | After a timeout or 5xx |
|---|---|---|
| POST /v1/videos | Optional, ≤ 256 bytes | Retry with the same key and body to get the original task; do not use a new key. |
| POST /v1/images/tasks | Required, ≤ 256 bytes | Retry with the same key and body to get the original task_id. |
| POST /v1/images/generations · edits | Not supported | The 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.
{
"error": {
"message": "The requested video resolution or duration is not available for this model",
"type": "new_api_error",
"code": "video_pricing_combination_unsupported"
}
}{
"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.
Related
Integration guide
The full flow from API key to downloaded result.
Models and prices
Prices per model and resolution.