# Get a video job

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

`GET https://api.getlykia.com/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

```bash
curl https://api.getlykia.com/v1/videos/gen-1795463406-qOWSYdRnX7cEsv8q \
  -H "Authorization: Bearer $LYKIA_API_KEY"
```

Python

```python
import os

import requests

VIDEO_ID = "gen-1795463406-qOWSYdRnX7cEsv8q"

response = requests.get(
    f"https://api.getlykia.com/v1/videos/{VIDEO_ID}",
    headers={"Authorization": f"Bearer {os.environ['LYKIA_API_KEY']}"},
    timeout=30,
)
response.raise_for_status()
job = response.json()
print(job["status"], job["progress"])
if job["status"] == "completed":
    print(job["output"]["url"], "valid until", job["output"]["expires_at"])
```

TypeScript

```typescript
const VIDEO_ID = "gen-1795463406-qOWSYdRnX7cEsv8q";

const response = await fetch(`https://api.getlykia.com/v1/videos/${VIDEO_ID}`, {
  headers: { Authorization: `Bearer ${process.env.LYKIA_API_KEY}` },
});
if (!response.ok) throw new Error(`Lykia returned ${response.status}: ${await response.text()}`);

const job = (await response.json()) as { status: string; progress: number; output?: { url: string | null; expires_at?: string } };
console.log(job.status, job.progress);
if (job.status === "completed") console.log(job.output?.url, "valid until", job.output?.expires_at);
```

**Response (200)**

```json
{
    "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

- `id` (string) — The job id; also the id of its request record ([`GET /generation`](https://www.getlykia.com/en/docs/api-reference/generation)).
- `object` (string) — Always `video`.
- `status` (string) — `queued`, `in_progress`, `completed`, `failed` or `cancelled`.
- `progress` (integer) — 0 to 100, when the provider reports it.
- `model` (string) — The model; with a preset, the real model.
- `provider` (string) — The provider running the job.
- `created_at`, `completed_at` (integer | null) — Unix times.
- `expires_at` (integer | null) — When Lykia deletes the file (Unix time). The time is set by the platform.
- `duration_seconds` (number | null) — The video's length, once completed.
- `params` (object) — 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.
- `error` (object) — Only on `failed` and `cancelled` jobs: `message`, `code` (such as `timeout`), `reason` and, when the provider charged for its rejection, `billed_by_provider: true`.
- `usage` (object) — 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.
- `output` (object) — 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`](https://www.getlykia.com/en/docs/api-reference/videos-content), which streams the file instead.

A cancelled job:

```json
{
    "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.
