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

# Wan 3.0 Prime Text to Video API

> Generate a video from a text prompt with the speed-optimized Wan 3.0 Prime model, with configurable resolution, duration, aspect ratio, and audio.

> [!NOTE]
>
> Wan 3.0 Prime is the high-speed version of [Wan 3.0](https://ailabtools.mintlify.site/docs/ai-model/video/wan/30/text-to-video.md), with the same capabilities and significantly faster end-to-end generation at higher credit rates.

## Billing Introduction

> [!NOTE]
>
> The credit rate is determined by the output video resolution. The total credit cost is based on the output video duration. See the [Billing Introduction](https://ailabtools.mintlify.site/docs/billing-introduction.md#3-0-prime-text-to-video) for current credit rates.

## File Storage Policy

<table><thead><tr><th>Data Type</th>
<th>Stored</th>
<th>Retention</th>
<th>Training</th>
<th>Deletion</th></tr></thead>
<tbody><tr><td>Uploaded Files</td>
<td>No</td>
<td>N/A</td>
<td>No</td>
<td>Immediate</td></tr></tbody></table>

> [!TIP]
>
> For more information, see the [File Storage Policy](https://ailabtools.mintlify.site/docs/file-storage-policy.md) and [Privacy Policy](https://www.ailabtools.com/privacy-policy).

## Query Task

> [!NOTE]
>
> This API creates an asynchronous task. Save the returned `task_id`, then use [Querying Async Task Results](https://ailabtools.mintlify.site/docs/ai-common/async-task-results/api.md) to retrieve its final result. Results remain available for 24 hours; wait at least 5 seconds between queries.

| Field | Type | Description |
| :- | :- | :- |
| `data` | `object` | |
| +`result_json` | `object` | |
| ++`result_urls` | `array` | Result video URLs. |
| +++`result_urls[]` | `string` | Result video URL. |

```json theme={null}
{
  "data": {
    "result_urls": [""]
  }
}
```

> [!WARNING]
>
> All result URLs are temporarily available and will expire after 24 hours.

## Submit Task


## OpenAPI

````yaml docs/ai-model/video/wan/30-prime/text-to-video-openapi.json POST /api/model/task/create
openapi: 3.2.1
info:
  title: AILabTools API
  termsOfService: https://www.ailabtools.com/term-of-use
  contact:
    name: AILabTools Support Team
    url: https://www.ailabtools.com/support
    email: support@ailabtools.com
  version: 1.0.0
servers:
  - url: https://www.ailabapi.com
security:
  - apiKeyAuth: []
paths:
  /api/model/task/create:
    post:
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - model
                - prompt
              properties:
                model:
                  type: string
                  enum:
                    - wan-30-prime/video
                  example: wan-30-prime/video
                  description: Model.
                prompt:
                  type: string
                  minLength: 1
                  maxLength: 20000
                  example: >-
                    A small sailboat glides across a calm lake at sunrise as the
                    camera moves slowly above the water.
                  description: Prompt.
                resolution:
                  type: string
                  enum:
                    - 480p
                    - 720p
                    - 1080p
                  default: 720p
                  description: Output video resolution.
                duration:
                  type: integer
                  minimum: 2
                  maximum: 30
                  default: 5
                  description: Output video duration in seconds.
                audio:
                  type: boolean
                  default: true
                  description: Whether to generate audio.
                aspect_ratio:
                  type: string
                  enum:
                    - adaptive
                    - '1:1'
                    - '3:4'
                    - '4:3'
                    - '9:16'
                    - '16:9'
                  default: adaptive
                  description: Output video aspect ratio.
                seed:
                  type: integer
                  format: int32
                  minimum: 0
                  maximum: 2147483647
                  description: >-
                    Random seed. Using the same parameters and seed helps
                    improve result reproducibility.
                nsfw_checker:
                  type: boolean
                  default: false
                  description: >-
                    Whether to enable additional NSFW content filtering for
                    model-generated results.
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/commonResponseData'
                  - $ref: '#/components/schemas/asyncTaskId'
              example:
                request_id: 01A1E397-AF68-53D9-8CFD-6831D8F108BD
                log_id: '100000000'
                error_detail:
                  code: ''
                  code_message: ''
                  message: ''
                task_id: 1794820417.b515cde0-d9c8-4ad2-206a-bcdu0613bbb1
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
components:
  schemas:
    commonResponseData:
      type: object
      required:
        - request_id
        - log_id
        - error_detail
      properties:
        request_id:
          type: string
          description: Request ID for debugging.
        log_id:
          type: string
          description: Log ID for debugging.
        error_detail:
          type: object
          required:
            - code
            - code_message
            - message
          properties:
            code:
              type: string
              description: >-
                Error Code. See [Error
                Codes](/docs/response-description#error-codes).
            code_message:
              type: string
              description: Error summary.
            message:
              type: string
              description: Error message.
    asyncTaskId:
      type: object
      required:
        - task_id
      properties:
        task_id:
          type: string
          description: >-
            Task ID for querying [Querying Async Task
            Results](/docs/ai-common/async-task-results/api).
  responses:
    4XX:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/commonResponseData'
          example:
            request_id: 01A1E397-AF68-53D9-8CFD-6831D8F108BD
            log_id: '100000000'
            error_detail:
              code: ERROR_PARAMETERS
              code_message: Invalid parameters.
              message: 'Invalid parameters. - image: Cannot be empty.'
    5XX:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/commonResponseData'
          example:
            request_id: 01A1E397-AF68-53D9-8CFD-6831D8F108BD
            log_id: '100000000'
            error_detail:
              code: ERROR_INTERNAL_SERVER_ERROR
              code_message: >-
                Internal server error. Please try again later. If not resolved
                promptly, contact the platform.
              message: >-
                Internal server error. Please try again later. If not resolved
                promptly, contact the platform.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: ailabapi-api-key
      description: API KEY for authentication. See [Get API KEY](/docs/get-api-key).

````

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