LLitMediaAPI Docs

Quick Start

Authenticate with your API key and make your first API call in a few minutes.

Base URL

All API requests are made over HTTPS against:

BASE URL
https://litvideo-api.litmedia.ai

Every endpoint is served under the /v1/ prefix. Status endpoints use GET; creation endpoints use POST with a JSON body.

Common headers

HeaderValueRequiredDescription
AuthorizationstringRequiredYour API key, formatted as Bearer <API_KEY>.
Content-TypestringRequired for POSTAlways application/json.
LangstringOptionalLanguage for model descriptions and error messages. Defaults to EN.

Authentication

The Open API authenticates every request with a bearer token. Create an API key in the API Portal, then send it on each call:

HEADER
Authorization: Bearer lvsk-xxxxxxxxxxxxxxxx

Requests with a missing or invalid key are rejected before routing:

ERROR RESPONSE
{
  "code": 10001,
  "msg": "auth error",
  "data": null
}
!

Treat API keys like passwords. Keep them server-side and rotate them from the API Portal if a key leaks.

Your first request

There is no Models API. Pick a static model code from the Models page — e.g. "litai-5" for video — and send it directly to a generation endpoint:

CURL
curl -X POST "https://litvideo-api.litmedia.ai/v1/videos" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer lvsk-xxxxxxxxxxxxxxxx" \
  -d '{
    "model": "litai-5",
    "prompt": "A neon-lit city street at night, cinematic drone shot",
    "duration": 5,
    "quality": "720p",
    "ratio": "16:9"
  }'

A successful response returns the unique task_id used for polling (tsk_ + 32 random hex characters):

RESPONSE
{
  "code": 200,
  "msg": "success",
  "data": {
    "task_id": "tsk_9f2c8a17b34d6e05a1c2d3e4f5067890"
  }
}

Response envelope

Every endpoint returns the same JSON envelope:

FieldTypeDescription
codeint200 means success. Any other value is an error.
msgstring"success" on success, otherwise a human-readable error message.
dataobject | arrayPayload. Shape depends on the endpoint.
i

Some numeric fields are delivered as strings (e.g. "is_hot": "1"). Normalize with Number(x) before comparing.

Next steps

On this page