> ## Documentation Index
> Fetch the complete documentation index at: https://testweb2-docs-openapi.test765.com/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 | — | prompt |
| `video-fast/v1.0/image-to-video` | image to video | 480p, 768p | 3–15 s | — | 1 image, at most 30 MB |
| `video-fast/v1.0/reference-to-video` | reference to video | 480p, 768p | 3–30 s | — | 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 |
| `video-fast/v1.1/video-extend` | video extend | 480p, 720p, 1080p | adds 3–30 s | `generate_audio` | 1 clip, at most 500 MB |

Prices per model, resolution and duration are listed in the [developer console](https://fiveapi.ai). See [Credits and pricing](https://testweb2-docs-openapi.test765.com/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://testweb2-docs-openapi.test765.com/api-reference/video-fast-1-0/text-to-video.md), [image to video](https://testweb2-docs-openapi.test765.com/api-reference/video-fast-1-0/image-to-video.md), [reference to video](https://testweb2-docs-openapi.test765.com/api-reference/video-fast-1-0/reference-to-video.md)
* **Resolutions:** 480p, 768p
* **Duration:** 3–15 seconds; reference to video 3–30 seconds
* **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://testweb2-docs-openapi.test765.com/api-reference/wan-3-0-spark/text-to-video.md), [image to video](https://testweb2-docs-openapi.test765.com/api-reference/wan-3-0-spark/image-to-video.md), [reference to video](https://testweb2-docs-openapi.test765.com/api-reference/wan-3-0-spark/reference-to-video.md)
* **Resolutions:** 480p, 720p, 1080p
* **Duration:** 2–30 seconds
* **Audio:** `generate_audio: true` on text and image to video
* **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://testweb2-docs-openapi.test765.com/api-reference/wan-3-0-prime-spark/text-to-video.md), [image to video](https://testweb2-docs-openapi.test765.com/api-reference/wan-3-0-prime-spark/image-to-video.md)
* **Resolutions, duration, audio, aspect ratios and image input:** 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://testweb2-docs-openapi.test765.com/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, longer videos or synchronized audio | 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 or Wan 3.0 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.

## 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://testweb2-docs-openapi.test765.com/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, and the final text is returned as `output.actual_prompt`. Use `none` to keep your prompt exactly as written.


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