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

# Quickstart

> Create a video generation task and retrieve its result.

This guide submits a text-to-video task and polls it until the generated video is ready.

<Warning>
  Creating a generation task is billable. Confirm the selected model and controls before sending the request.
</Warning>

<Steps>
  <Step title="Create an API key">
    Open [API Keys](https://gengen.farm/dashboard?section=apiKeys\&createKey=1) in the GENGEN Dashboard and create a key.

    Store the full key when it is shown. GENGEN does not display the secret again.
  </Step>

  <Step title="Submit a task">
    Replace the placeholder key and send the request:

    ```bash theme={"dark"}
    curl --request POST \
      --url https://gengen.farm/api/gengen/v1/contents/generations/tasks \
      --header 'Authorization: Bearer gengen_live_xxxxxxxxxxxxxxxx' \
      --header 'Content-Type: application/json' \
      --data '{
        "model": "dreamina-seedance-2-0-260128",
        "mode": "text_to_video",
        "prompt": "A kitten yawns at the camera in warm morning light.",
        "controls": {
          "duration": 5,
          "resolution": "720p",
          "ratio": "16:9",
          "generateAudio": true,
          "watermark": false
        }
      }'
    ```

    A successful submission returns a public task ID:

    ```json theme={"dark"}
    {
      "id": "seedance20:cgt-20260419-abcdef1234567890",
      "model": "dreamina-seedance-2-0-260128",
      "status": "pending",
      "outputs": {
        "videos": [],
        "images": []
      }
    }
    ```
  </Step>

  <Step title="Retrieve the result">
    URL-encode the task ID when placing it in the path. For example, encode `:` as `%3A`.

    ```bash theme={"dark"}
    curl --request GET \
      --url https://gengen.farm/api/gengen/v1/contents/generations/tasks/seedance20%3Acgt-20260419-abcdef1234567890 \
      --header 'Authorization: Bearer gengen_live_xxxxxxxxxxxxxxxx'
    ```

    Continue polling while the task is pending, queued, running, or processing. When `status` is `succeeded`, read the video URL from `outputs.videos`.
  </Step>
</Steps>

```json theme={"dark"}
{
  "id": "seedance20:cgt-20260419-abcdef1234567890",
  "model": "dreamina-seedance-2-0-260128",
  "status": "succeeded",
  "outputs": {
    "videos": [
      "https://example.com/generated-video.mp4"
    ],
    "images": []
  },
  "createdAt": "2026-04-19T08:00:00.000Z",
  "updatedAt": "2026-04-19T08:01:30.000Z"
}
```

<Tip>
  Provider output URLs can expire. Copy successful outputs to storage that you control.
</Tip>

## Next steps

* Learn how [generation modes and media inputs](/guides/video-generation) work.
* Review the [create task endpoint](/api-reference/byteplus/video-generation/create-task).
* Open the [API Explorer](https://gengen.farm/api-explorer/demos/video-generation) for a guided workflow.
