# Task Lifecycle

1. Validate the key with `GET /v1/credits`
2. Create a video task with `POST /v1/videos/generations`
3. Store the response `id`
4. Poll `GET /v1/tasks/{task_id}` every five seconds, or provide an HTTPS `callback_url`
5. Continue through `pending` and `processing`
6. On `completed`, read and persist every URL in `results`
7. On `failed`, inspect `error.code`, `error.message`, and `error.type`

The bundled script defaults to a ten-minute client timeout. A local timeout does not prove that the remote task failed, so keep the task ID and query it later instead of creating a duplicate task

EvoLink documentation says generated result URLs can expire. Download completed assets promptly
