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

> ## Agent Instructions
> Five API is a video generation REST API. Base URL: https://api.fiveapi.ai. Authenticate with the header Authorization: Bearer <API key>; read the key from the FIVEAPI_API_KEY environment variable and never hard-code it.
> Every generation is an asynchronous task: POST /v1/{brand}/{version}/{task} returns a queued task, then poll GET /v1/tasks/{task_id} or receive a signed webhook, and download output.video.url before expires_at (7 days).
> The OpenAPI spec is at https://docs.fiveapi.ai/api-reference/openapi.yaml. An installable agent skill: npx skills add https://docs.fiveapi.ai

# Models

> The video models of Five API: what each one does, its resolutions, durations and inputs, and how to choose.

A model id has three parts, `{brand}/{version}/{task}`, and it is also the path of the endpoint that creates a task on that model:

```text theme={null}
wan/v3.0-spark/image-to-video   →   POST https://api.fiveapi.ai/v1/wan/v3.0-spark/image-to-video
```

## Catalogue

| Model id | Task | Resolutions | Duration | Audio | Input |
| - | - | - | - | - | - |
| `video-fast/v1.0/text-to-video` | text to video | 480p, 768p | 3–15 s | always on | prompt |
| `video-fast/v1.0/image-to-video` | image to video | 480p, 768p | 3–15 s | always on | 1 image, at most 30 MB |
| `video-fast/v1.0/reference-to-video` | reference to video | 480p, 768p | 3–30 s | always on | up to 9 images, 3 videos, 3 audio files |
| `wan/v3.0-spark/text-to-video` | text to video | 480p, 720p, 1080p | 2–30 s | `generate_audio` | prompt |
| `wan/v3.0-spark/image-to-video` | image to video | 480p, 720p, 1080p | 2–30 s | `generate_audio` | 1 image, at most 20 MB |
| `wan/v3.0-spark/reference-to-video` | reference to video | 480p, 720p, 1080p | 2–30 s | — | up to 10 images, 5 videos, 5 audio files |
| `wan/v3.0-prime-spark/text-to-video` | text to video | 480p, 720p, 1080p | 2–30 s | `generate_audio` | prompt |
| `wan/v3.0-prime-spark/image-to-video` | image to video | 480p, 720p, 1080p | 2–30 s | `generate_audio` | 1 image, at most 20 MB |
| `wan/v3.0-prime-spark/reference-to-video` | reference to video | 480p, 720p, 1080p | 2–30 s | — | up to 10 images, 5 videos, 5 audio files |
| `video-fast/v1.1/video-extend` | video extend | 480p, 720p, 1080p | adds 3–30 s | `generate_audio` | 1 clip, at most 500 MB |

**Audio:** Video Fast 1.0 generates audio with every video, there is no switch. `generate_audio` marks the endpoints where audio is optional and off by default; `—` means the task has no audio option.

Prices per model, resolution and duration are listed in the [developer console](https://fiveapi.ai). See [Credits and pricing](https://docs.fiveapi.ai/pricing.md) for how credits work.

## Model families

### Video Fast 1.0

Fast, low-cost generation. A good default for previews, social clips and high-volume use.

* **Tasks:** [text to video](https://docs.fiveapi.ai/api-reference/video-fast-1-0/text-to-video.md), [image to video](https://docs.fiveapi.ai/api-reference/video-fast-1-0/image-to-video.md), [reference to video](https://docs.fiveapi.ai/api-reference/video-fast-1-0/reference-to-video.md)
* **Resolutions:** 480p, 768p
* **Duration:** 3–15 seconds; reference to video 3–30 seconds
* **Audio:** always on. Every Video Fast video comes with generated audio; there is no `generate_audio` field
* **Aspect ratios:** `9:16` (default for text to video), `16:9`, `1:1`, `3:4`, `4:3`; image to video defaults to `adaptive`, which keeps the shape of your image
* **Image input:** JPG, PNG or WebP, shorter side at least 300 px, aspect ratio between 0.4 and 2.5, at most 30 MB

### Wan 3.0 Spark

Native videos up to 30 seconds with richer detail, and synchronized audio on request.

* **Tasks:** [text to video](https://docs.fiveapi.ai/api-reference/wan-3-0-spark/text-to-video.md), [image to video](https://docs.fiveapi.ai/api-reference/wan-3-0-spark/image-to-video.md), [reference to video](https://docs.fiveapi.ai/api-reference/wan-3-0-spark/reference-to-video.md)
* **Resolutions:** 480p, 720p, 1080p
* **Duration:** 2–30 seconds
* **Audio:** optional, `generate_audio: true` on text and image to video (off by default)
* **Aspect ratios:** `16:9` (default for text to video), `9:16`, `1:1`, `3:4`, `4:3`; image to video defaults to `adaptive`
* **Image input:** JPG, PNG or WebP, 360–2,000 px per side, at most 20 MB

### Wan 3.0 Prime Spark

The same Wan 3.0 quality at the full 30 seconds, noticeably faster. Choose it when turnaround time matters.

* **Tasks:** [text to video](https://docs.fiveapi.ai/api-reference/wan-3-0-prime-spark/text-to-video.md), [image to video](https://docs.fiveapi.ai/api-reference/wan-3-0-prime-spark/image-to-video.md), [reference to video](https://docs.fiveapi.ai/api-reference/wan-3-0-prime-spark/reference-to-video.md)
* **Resolutions, duration, audio, aspect ratios, image input and reference assets:** as Wan 3.0 Spark

### Video Fast Extend 1.1

Continues an existing clip smoothly, with matched audio when `generate_audio` is true.

* **Task:** [video extend](https://docs.fiveapi.ai/api-reference/video-fast-extend-1-1/video-extend.md)
* **Resolutions:** 480p, 720p, 1080p
* **Duration:** adds 3–30 seconds; the clip plus the added seconds may not exceed 30 seconds
* **Clip input:** MP4 or MOV, 360–2,000 px per side, 2–30 seconds long, at most 500 MB, with an optional `start_time` / `end_time` window

## Choose a model

| If you need | Use |
| - | - |
| The lowest cost per video, or many short clips | Video Fast 1.0 |
| 1080p, or videos longer than 15 seconds | Wan 3.0 Spark |
| Wan 3.0 quality with a faster turnaround | Wan 3.0 Prime Spark |
| A consistent character, product or style from your own assets | reference to video on Video Fast 1.0, Wan 3.0 Spark or Wan 3.0 Prime Spark |
| A longer version of a video you already have | Video Fast Extend 1.1 |

Start with short, low-resolution tasks while you tune your prompts, then raise the resolution and duration for the final render.

## Seed

Every model takes `seed`, an integer from 0 to 2147483647. Omit it and the model picks a random seed (the seed used is not returned, so keep the one you send).

A seed reproduces a result only together with the exact prompt the model saw:

* **`prompt_expansion: none`** — the same seed with the same request reproduces the video: exactly on Video Fast 1.0, and reproducibly but not guaranteed identically on Wan 3.0 Spark / Prime Spark (the model is probabilistic).
* **`basic` or `advanced` (the default)** — the prompt is rewritten by a language model on every request, so the model sees different text each time and the same seed gives a different video.

Turning expansion off puts the whole result on your prompt: short or vague prompts give noticeably weaker videos, so write a detailed, cinematic prompt yourself (see [Write better prompts](https://docs.fiveapi.ai/guides/text-to-video.md#write-better-prompts)), or keep expansion on and accept that runs vary.

There is no `negative_prompt`: none of the models takes one, and a request that sends it answers `400 invalid_parameter`.

## Read the catalogue from the API

`GET /v1/models` lists the enabled models. Each model carries `input_schema`, the JSON Schema of its request body, which is the authoritative list of fields and allowed values, and `x-max-input-bytes`, the largest accepted input file.

```bash theme={null}
curl https://api.fiveapi.ai/v1/models/wan/v3.0-spark/image-to-video \
  -H "Authorization: Bearer $FIVEAPI_API_KEY"
```

```json theme={null}
{
  "id": "wan/v3.0-spark/image-to-video",
  "object": "model",
  "name": "Wan 3.0 Spark — image to video",
  "task": "image-to-video",
  "status": "enabled",
  "input_schema": {
    "type": "object",
    "required": ["image_url", "duration", "resolution"],
    "properties": {
      "image_url": { "type": "string", "format": "uri" },
      "duration": { "type": "integer", "minimum": 2, "maximum": 30 },
      "resolution": { "type": "string", "enum": ["480p", "720p", "1080p"] },
      "aspect_ratio": { "type": "string", "enum": ["adaptive", "9:16", "16:9", "1:1", "3:4", "4:3"], "default": "adaptive" },
      "generate_audio": { "type": "boolean", "default": false },
      "...": "..."
    },
    "x-max-input-bytes": 20971520
  }
}
```

New models are added without a version change: read `GET /v1/models` instead of hard-coding the list when you build a model picker.

## Common request fields

Every create endpoint accepts these optional fields in addition to its own:

| Field | Description |
| - | - |
| `webhook_url` | Public HTTPS URL that receives this task's events. Overrides the default endpoint of your account. See [Webhooks](https://docs.fiveapi.ai/concepts/webhooks.md). |
| `metadata` | Your own JSON object, up to 4,096 bytes. Returned unchanged on the task and in every webhook. |

Text, image and extend endpoints also accept `prompt_expansion` (`none`, `basic` or the default `advanced`): with `basic` or `advanced` the prompt is rewritten into a more detailed description before generation (the rewritten text is not returned). Use `none` to keep your prompt exactly as written.


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