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

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# Create a video generation task

> Starts an asynchronous video generation task and returns it with status queued. The gateway requires model; the remaining fields are the selected model's own request fields and are forwarded to it. A video usually takes one to three minutes: poll retrieveVideoGeneration with the returned id until status is completed, failed or cancelled. Only a 503 whose code is video_submission_pending, with a non-empty id, means the task and its charge authorization were kept: retrieve it with that id and do not submit a replacement. Any other 503 means the service or the provider was unavailable and no task is pending; retry later. With X-AISA-Cost-Mode: quote the route returns a cost_estimate instead and creates no task.

<!-- aisa-pricing:start -->
A request reference price is not currently available; use a request quote where supported. Account-specific pricing and final settlement may differ.
<!-- aisa-pricing:end -->

## Request contract

* **Method and path:** POST /v1/video/generations
* **Availability:** enabled
* **Request URL template:** `https://api.aisa.one/v1/video/generations`
* **X-AISA-Cost-Mode:** header; optional
* **Runtime facts:** b05bd10c1f65804d1365e16e8d0787c01638f0abdea53ee0e7f966e42df0f0b5

[Complete OpenAPI definition](https://aisa.one/docs/openapi/media-generation.json)

Effective request and pricing declaration (including authentication and referenced schemas):

```json theme={null}
{
  "operationId": "createVideoGeneration",
  "method": "POST",
  "path": "/v1/video/generations",
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "parameters": [
    {
      "description": "Return a free, read-only cost quote for this caller and payload instead of generating.",
      "in": "header",
      "name": "X-AISA-Cost-Mode",
      "schema": {
        "enum": [
          "quote"
        ],
        "type": "string"
      }
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "example": {
          "content": [
            {
              "text": "A small red boat on a calm lake at dawn",
              "type": "text"
            }
          ],
          "duration": 5,
          "generate_audio": true,
          "model": "dreamina-seedance-2-0-260128",
          "ratio": "16:9",
          "watermark": false
        },
        "schema": {
          "additionalProperties": true,
          "properties": {
            "content": {
              "description": "Prompt and reference media, for Seedance models.",
              "items": {
                "additionalProperties": true,
                "properties": {
                  "image_url": {
                    "properties": {
                      "url": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "role": {
                    "description": "For images: first_frame, last_frame or reference_image; for videos: reference_video.",
                    "type": "string"
                  },
                  "text": {
                    "type": "string"
                  },
                  "type": {
                    "description": "text, image_url or video_url.",
                    "type": "string"
                  },
                  "video_url": {
                    "properties": {
                      "url": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  }
                },
                "required": [
                  "type"
                ],
                "type": "object"
              },
              "type": "array"
            },
            "duration": {
              "description": "Output length in seconds; part of the price.",
              "minimum": 1,
              "type": "integer"
            },
            "generate_audio": {
              "type": "boolean"
            },
            "model": {
              "description": "A video model from GET /v1/models, for example dreamina-seedance-2-0-260128 or wan2.7-t2v.",
              "minLength": 1,
              "type": "string"
            },
            "prompt": {
              "description": "Text prompt, for models that take a plain prompt.",
              "type": "string"
            },
            "ratio": {
              "description": "Aspect ratio, for example 16:9, 9:16 or 1:1.",
              "type": "string"
            },
            "resolution": {
              "description": "For example 720p or 1080p; part of the price.",
              "type": "string"
            },
            "watermark": {
              "type": "boolean"
            }
          },
          "required": [
            "model"
          ],
          "type": "object"
        }
      }
    },
    "required": true
  },
  "x-aisa-status": "enabled",
  "x-aisa-pricing": {
    "description": "Charged at the selected model's catalog price, which can depend on the requested resolution and duration and is listed per second, per request or by tokens. The charge is held at submission and settled when the task ends. A quote for the caller and payload says whether its amount is exact or an estimate.",
    "estimate_source": "unavailable",
    "estimate_unavailable_reason": "model_dependent_price",
    "kind": "model_catalog"
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## Cost and request rules

A request reference price is not currently available; use a request quote where supported. Account-specific pricing and final settlement may differ.

Published reference values are not an account-specific quote or a settled charge. For endpoints supporting X-AISA-Cost-Mode: quote, obtain a free quote for your exact request before execution; reconcile the settled cost with response metadata and Usage Logs. USD amounts use 1,000,000 integer micro-USD per dollar.


## OpenAPI

````yaml openapi/media-generation.json POST /v1/video/generations
openapi: 3.1.0
info:
  description: >-
    Image and video generation on AIsa models. The model field selects the
    model; GET /v1/models lists the enabled image and video models and the
    routes each one serves.
  title: Media Generation
  version: '1'
  x-aisa-capabilities:
    idempotency: Idempotency-Key
    max_price: X-AISA-Max-Price-USD
    quote:
      header: X-AISA-Cost-Mode
      value: quote
  x-aisa-catalogs:
    media-generation:
      description: >-
        Image and video generation on AIsa models. The model field selects the
        model; GET /v1/models lists the enabled image and video models and the
        routes each one serves.
      title: Media Generation
      x-aisa-capabilities:
        idempotency: Idempotency-Key
        max_price: X-AISA-Max-Price-USD
        quote:
          header: X-AISA-Cost-Mode
          value: quote
      x-aisa-document:
        facts_hash: b05bd10c1f65804d1365e16e8d0787c01638f0abdea53ee0e7f966e42df0f0b5
        generator_version: '3'
        protocol_version: '1'
        schema_version: '1'
      x-aisa-plans:
        builder: 1
        display_plan: payg
        payg: 1
        similarweb_payg: 1
        team: 1
        version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-configured-paths:
    - /v1/images/generations
    - /v1/video/generations
    - /v1/video/generations/{task_id}
  x-aisa-document:
    composer_version: '26'
    document_hash: sha256:db7f1b10e4feec69fd541e25bc0aa70851eb7596fab4af0d9d2b0dc9e0f10238
    facts_hash: b05bd10c1f65804d1365e16e8d0787c01638f0abdea53ee0e7f966e42df0f0b5
    generator_version: '3'
    protocol_version: '1'
    response_pending: []
    schema_version: '1'
  x-aisa-plans:
    builder: 1
    display_plan: payg
    payg: 1
    similarweb_payg: 1
    team: 1
    version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-provider: media-generation
servers:
  - url: https://api.aisa.one
security:
  - bearerAuth: []
paths:
  /v1/video/generations:
    post:
      summary: Create a video generation task
      description: >-
        Starts an asynchronous video generation task and returns it with status
        queued. The gateway requires model; the remaining fields are the
        selected model's own request fields and are forwarded to it. A video
        usually takes one to three minutes: poll retrieveVideoGeneration with
        the returned id until status is completed, failed or cancelled. Only a
        503 whose code is video_submission_pending, with a non-empty id, means
        the task and its charge authorization were kept: retrieve it with that
        id and do not submit a replacement. Any other 503 means the service or
        the provider was unavailable and no task is pending; retry later. With
        X-AISA-Cost-Mode: quote the route returns a cost_estimate instead and
        creates no task.


        <!-- aisa-pricing:start -->

        A request reference price is not currently available; use a request
        quote where supported. Account-specific pricing and final settlement may
        differ.

        <!-- aisa-pricing:end -->
      operationId: createVideoGeneration
      parameters:
        - description: >-
            Return a free, read-only cost quote for this caller and payload
            instead of generating.
          in: header
          name: X-AISA-Cost-Mode
          schema:
            enum:
              - quote
            type: string
      requestBody:
        content:
          application/json:
            example:
              content:
                - text: A small red boat on a calm lake at dawn
                  type: text
              duration: 5
              generate_audio: true
              model: dreamina-seedance-2-0-260128
              ratio: '16:9'
              watermark: false
            schema:
              additionalProperties: true
              properties:
                content:
                  description: Prompt and reference media, for Seedance models.
                  items:
                    additionalProperties: true
                    properties:
                      image_url:
                        properties:
                          url:
                            type: string
                        type: object
                      role:
                        description: >-
                          For images: first_frame, last_frame or
                          reference_image; for videos: reference_video.
                        type: string
                      text:
                        type: string
                      type:
                        description: text, image_url or video_url.
                        type: string
                      video_url:
                        properties:
                          url:
                            type: string
                        type: object
                    required:
                      - type
                    type: object
                  type: array
                duration:
                  description: Output length in seconds; part of the price.
                  minimum: 1
                  type: integer
                generate_audio:
                  type: boolean
                model:
                  description: >-
                    A video model from GET /v1/models, for example
                    dreamina-seedance-2-0-260128 or wan2.7-t2v.
                  minLength: 1
                  type: string
                prompt:
                  description: Text prompt, for models that take a plain prompt.
                  type: string
                ratio:
                  description: Aspect ratio, for example 16:9, 9:16 or 1:1.
                  type: string
                resolution:
                  description: For example 720p or 1080p; part of the price.
                  type: string
                watermark:
                  type: boolean
              required:
                - model
              type: object
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  completed_at:
                    description: Unix seconds; present once the task has ended.
                    type: integer
                  created_at:
                    description: Unix seconds.
                    type: integer
                  error:
                    properties:
                      message:
                        type: string
                    type: object
                  id:
                    type: string
                  model:
                    type: string
                  object:
                    const: video.generation
                    type: string
                  progress:
                    description: For example 0% or 100%.
                    type: string
                  result:
                    description: >-
                      The model's output once completed, including the video URL
                      (video_url or url).
                  status:
                    enum:
                      - queued
                      - in_progress
                      - completed
                      - failed
                      - cancelled
                      - unknown
                    type: string
                required:
                  - id
                  - object
                  - status
                  - model
                  - created_at
                  - progress
                type: object
          description: The task was created.
        '503':
          content:
            application/json:
              schema:
                anyOf:
                  - additionalProperties: false
                    properties:
                      code:
                        const: video_submission_pending
                        type: string
                      error:
                        type: string
                      id:
                        description: The kept task; pass it to retrieveVideoGeneration.
                        minLength: 1
                        type: string
                    required:
                      - error
                      - code
                      - id
                    type: object
                  - type: object
          description: >-
            Either the service or the provider was unavailable and no task is
            pending (retry later), or the submission needs reconciliation. Only
            the second has code video_submission_pending and a non-empty id:
            that task and its charge authorization are kept; retrieve it with
            the id and do not submit a replacement.
        default:
          description: >-
            Validation, authentication, balance or provider error. Provider
            refusals, such as content checks, keep their 4xx status.
      x-codeSamples:
        - label: Reference example
          lang: text
          source: >-
            # Fixed reference example. Playground inputs do not update this
            sample.

            curl --request POST \
              --url https://api.aisa.one/v1/video/generations \
              --header 'Authorization: Bearer <token>' \
              --header 'Content-Type: application/json' \
              --data '{
              "model": "dreamina-seedance-2-0-260128",
              "content": [
                {
                  "type": "text",
                  "text": "A small red boat on a calm lake at dawn"
                }
              ],
              "ratio": "16:9",
              "duration": 5,
              "generate_audio": true,
              "watermark": false
            }'
components:
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

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