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

# Video generation

> Generate video tasks with polling.

Use `/v1/videos/generations` for video creation.

```bash theme={null}
curl https://apiany.ai/v1/videos/generations \
  -H "Authorization: Bearer $APIANY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedance-2.0",
    "prompt": "A cinematic product launch shot for an AI API platform",
    "duration": "10s",
    "resolution": "720p",
    "ratio": "16:9"
  }'
```

APIAny schedules processing immediately after the task record is committed.
The `202` response does not wait for video generation to finish, so poll the
returned task until it reaches a terminal state. The periodic task worker
remains a recovery mechanism for pending tasks.

## Prompt safety

Prompts that clearly combine a minor with exposure or emphasis of sensitive
body areas, or with explicit sexual or nudity content, return HTTP `400` with
code `content_policy`. Validation runs before task creation and credit
reservation, so no credits are charged. Revise the prompt to use an adult
subject (18+), remove sensitive-body close-ups, and keep the subject fully
clothed. Ordinary child-safe family, classroom, sports, and art scenes are not
blocked by this targeted rule.

## Sync variant

`/v1/videos/generations/sync` waits for the task result in the same HTTP request. Long-running jobs should use async creation and task polling.
