Skip to content

Get a video job

Read a video job's status, progress, cost and, once completed, a fresh one-hour link to the file.

Markdown
On this page
GET/v1/videos/{id}

Returns the job. Read it every few seconds until status is completed, failed or cancelled. Each read signs a new link to the file, so an expired output.url is fixed by reading the job again.

Example

Request
curl https://api.getlykia.com/v1/videos/gen-1795463406-qOWSYdRnX7cEsv8q \
  -H "Authorization: Bearer $LYKIA_API_KEY"
Response200
{
    "id": "gen-1795463406-qOWSYdRnX7cEsv8q",
    "object": "video",
    "status": "completed",
    "progress": 100,
    "model": "bytedance/seedance-1.0-pro",
    "provider": "bytedance",
    "created_at": 1795463406,
    "completed_at": 1795463439,
    "expires_at": 1796068239,
    "duration_seconds": 5,
    "params": {
        "duration": 5,
        "aspect_ratio": "16:9",
        "resolution": "720p",
        "image": false,
        "last_frame": false,
        "reference_images": 0
    },
    "usage": {
        "cost": 0.2574,
        "is_byok": false,
        "cost_details": {
            "upstream_cost": 0.2574,
            "platform_fee": 0,
            "is_byok": false
        }
    },
    "output": {
        "url": "https://files.example.com/media/gen-1795463406-qOWSYdRnX7cEsv8q/0.mp4?X-Amz-Expires=3600&X-Amz-Signature=5f0c9e…",
        "expires_at": "2026-11-23T20:50:41.145Z",
        "mime_type": "video/mp4",
        "bytes": 310368
    }
}

The job object

idstring

The job id; also the id of its request record (GET /generation).

objectstring

Always video.

statusstring

queued, in_progress, completed, failed or cancelled.

progressinteger

0 to 100, when the provider reports it.

modelstring

The model; with a preset, the real model.

providerstring

The provider running the job.

created_at

, completed_at (integer | null) — Unix times.

expires_atinteger | null

When Lykia deletes the file (Unix time). The time is set by the platform.

duration_secondsnumber | null

The video's length, once completed.

paramsobject

A summary of the request: duration, aspect_ratio, resolution, audio when given, and image, last_frame, reference_images as whether or how many were sent.

errorobject

Only on failed and cancelled jobs: message, code (such as timeout), reason and, when the provider charged for its rejection, billed_by_provider: true.

usageobject

Once the job has ended: cost in USD, is_byok and cost_details. A failed or cancelled job costs 0 unless the provider charged for it.

outputobject

Once completed: url (signed, valid for one hour), expires_at (when the link stops working), mime_type, bytes, and width and height when known. If Lykia's storage is not available, url is null and content gives the path of GET /videos/{id}/content, which streams the file instead.

A cancelled job:

200 OK
{
    "id": "gen-1795463449-mbcwAk5o21bdfuKi",
    "object": "video",
    "status": "cancelled",
    "progress": 0,
    "model": "bytedance/seedance-1.0-pro",
    "provider": "bytedance",
    "created_at": 1795463449,
    "completed_at": 1795463449,
    "expires_at": null,
    "duration_seconds": null,
    "params": {
        "duration": 5,
        "image": false,
        "last_frame": false,
        "reference_images": 0
    },
    "error": {
        "message": "The job was cancelled",
        "code": "cancelled",
        "reason": "invalid_request"
    },
    "usage": {
        "cost": 0,
        "is_byok": false,
        "cost_details": {
            "upstream_cost": 0,
            "platform_fee": 0,
            "is_byok": false
        }
    }
}

Errors

404 when the job does not exist or belongs to another project.