> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vidgen.id/llms.txt
> Use this file to discover all available pages before exploring further.

# Vigen API

> Generate AI video and images with a single API key. One endpoint to create a job, one endpoint to fetch the result.

The Vigen API is the HTTP interface for the Vigen video and image generation engine. With one API key you can create jobs, send reference images or video, and fetch the finished result — without opening the dashboard.

> [card] [Quickstart](https://docs.vidgen.id/en/quickstart.md)
>
> Send your first request in 3 minutes.

> [card] [Authentication](https://docs.vidgen.id/en/authentication.md)
>
> How to use `Authorization: Bearer` and `x-api-key`.

> [card] [API reference](https://docs.vidgen.id/en/api-reference/overview.md)
>
> Every endpoint, parameter, and response shape.

> [card] [Usage limits](https://docs.vidgen.id/en/concepts/concurrency-limits.md)
>
> Concurrency, daily quotas, and job lifetime.

## How it works

The Vigen API is **asynchronous**. A `POST /api/v1/generate` request is answered immediately with `202 Accepted` containing `job.id`, and you then fetch the result with `GET /api/v1/jobs/{id}` until the status is `succeeded`.

**1. Send a prompt + model**

Pick a model from the catalog (for example `seedance-2-5-flash`), write your prompt, and set duration/ratio/resolution in `parameters`.

**2. The server queues the job**

Credits are deducted up front, the job enters the queue, and you receive `job.id` along with your queue position.

**3. Poll until it finishes**

Check the status every 5 seconds. While the status is `queued` you see `queuePosition`; when it is `succeeded` you get the media URL.

**4. Download the result**

Store the URL in your own storage. Result links have a limited lifetime, so do not rely on them as a permanent source.

## Get started in 3 steps

**1. Create an API key**

Sign in at [vigen.id → Account](https://vigen.id/account#api-keys), click **Create key**, and copy the value. Keys are formatted `vg_...` and are shown only once.

**2. Send your first request**

```bash create curl theme={null}
curl -X POST https://vigen.id/api/v1/generate \
  -H "Authorization: Bearer vg_GANTI_DENGAN_KEY_KAMU" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedance-2-5-flash",
    "prompt": "Kopi susu di meja kayu, cahaya pagi menembus jendela, kamera bergerak pelan ke kanan",
    "parameters": { "duration": "5", "ratio": "16:9", "resolution": "720p" }
  }'
```

**3. Fetch the result**

```bash poll curl theme={null}
curl https://vigen.id/api/v1/jobs/JOB_ID \
  -H "Authorization: Bearer vg_GANTI_DENGAN_KEY_KAMU"
```

## Browse the documentation

> [card] [Model catalog](https://docs.vidgen.id/en/concepts/models.md)
>
> Active models, their capabilities, and how to read them at runtime.

> [card] [Credits & pricing](https://docs.vidgen.id/en/concepts/credits.md)
>
> How billing is calculated and when the Unlimited package charges 0 credits.

> [card] [Reference media](https://docs.vidgen.id/en/concepts/reference-media.md)
>
> Size, duration, and resolution limits for reference files.

> [card] [Idempotency](https://docs.vidgen.id/en/concepts/idempotency.md)
>
> Avoid being billed twice when you retry.

> [card] [Node.js](https://docs.vidgen.id/en/guides/nodejs.md)
>
> A complete client with no extra dependencies.

> [card] [Python](https://docs.vidgen.id/en/guides/python.md)
>
> The `generate()` and `wait_for_job()` helpers.

> [!TIP]
>
> Need help? Send a support message through the Vigen dashboard, or read the [error codes](https://docs.vidgen.id/en/troubleshooting/errors.md) first.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.