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

# Text to Video

### Quick start

Describe the video you want in a text prompt. The model generates a video based on your description:

```bash theme={null}
curl --location 'https://geekai.co/api/v1/videos/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {YOUR_GEEKAI_API_KEY}' \
--data '{
    "model":"cogvideox-flash",
    "prompt":"A kitten and a puppy play in the grass",
    "async": false
}'
```

> [!NOTE]
>
> Stable Video currently supports image-to-video only, not text-to-video.

### Asynchronous tasks

`async` controls whether generation runs asynchronously. The default, `false`, makes the request wait for the finished video. Set it to `true` to receive a task ID and poll for the result:

```bash theme={null}
curl --location --request GET 'https://geekai.co/api/v1/videos/{task_id}' \
--header 'Authorization: Bearer {YOUR_GEEKAI_API_KEY}'
```

Poll until the status is `succeed` and the response includes the video URL. Video generation can take a while, so asynchronous requests are recommended.

For more parameters, see the [video generation API reference](https://docs.geekai.co/en/api/video/generations.md).


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