> ## 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

# Get the account

> Returns the balance, the plan limits and the features of the account that owns the calling key.
`balance.credits` is what you can spend now; `balance.held` is reserved by queued and processing tasks.

**Scope:** `account:read`.




## OpenAPI

````yaml /api-reference/openapi.yaml get /v1/account
openapi: 3.1.0
info:
  title: Five API
  version: 1.0.0
  summary: Generate AI videos from text, images, reference assets and clips.
  description: >
    The Five API turns a text prompt, an image, a set of reference assets or a
    video clip into a short video.


    Every generation is an asynchronous **task**: `POST
    /v1/{brand}/{version}/{task}` returns a `queued` task at

    once, and the result arrives by webhook or by polling `GET
    /v1/tasks/{task_id}`.


    * Base URL: `https://api.fiveapi.ai`

    * Authentication: `Authorization: Bearer <API key>` (or the `x-api-key`
    header)

    * JSON in and out, `snake_case` fields, UTF-8, ISO 8601 UTC timestamps

    * Every response carries `X-Request-Id`; error bodies repeat it as
    `error.request_id`
  contact:
    name: Five API support
    email: support@fiveapi.ai
    url: https://docs.fiveapi.ai
servers:
  - url: https://api.fiveapi.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Video Fast 1.0
    description: Fast, low-cost generation at 480p or 768p.
  - name: Wan 3.0 Spark
    description: Native 30-second video with richer detail and synchronized audio.
  - name: Wan 3.0 Prime Spark
    description: Wan 3.0 quality at full 30 seconds, noticeably faster.
  - name: Video Fast Extend 1.1
    description: Continue an existing clip with matched audio.
  - name: Tasks
    description: Read, list and cancel generation tasks.
  - name: Models
    description: The model catalogue and each model's input schema.
  - name: Account
    description: Balance, plan limits and daily usage.
paths:
  /v1/account:
    get:
      tags:
        - Account
      summary: Get the account
      description: >
        Returns the balance, the plan limits and the features of the account
        that owns the calling key.

        `balance.credits` is what you can spend now; `balance.held` is reserved
        by queued and processing tasks.


        **Scope:** `account:read`.
      operationId: getAccount
      responses:
        '200':
          description: The account.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
              examples:
                account:
                  $ref: '#/components/examples/AccountExample'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  headers:
    X-Request-Id:
      description: Id of this request (`req_...`). Quote it when you contact support.
      schema:
        type: string
        examples:
          - req_01M5KPY92Y148QP01G532MM3BH
    Retry-After:
      description: Seconds to wait before retrying.
      schema:
        type: integer
        examples:
          - 10
    X-RateLimit-Limit:
      description: >-
        Requests per minute allowed for your account (or the key's lower
        ceiling).
      schema:
        type: integer
        examples:
          - 300
    X-RateLimit-Remaining:
      description: Requests left in the current minute.
      schema:
        type: integer
        examples:
          - 287
    X-RateLimit-Reset:
      description: Unix time in seconds when the minute window resets.
      schema:
        type: integer
        format: int64
        examples:
          - 1792736640
  schemas:
    Account:
      type: object
      required:
        - id
        - object
        - name
        - balance
        - plan
        - features
      properties:
        id:
          type: string
          examples:
            - acct_01J9X7Z0K7Q8W3F2P1N6M5V4R3
        object:
          type: string
          const: account
        name:
          type: string
          examples:
            - Acme Studios
        balance:
          type: object
          required:
            - credits
            - held
          properties:
            credits:
              type: integer
              format: int64
              description: Spendable credits.
            held:
              type: integer
              format: int64
              description: Credits held by queued and processing tasks.
        plan:
          type: object
          required:
            - name
            - rps
            - rpm
            - max_concurrent_tasks
          properties:
            name:
              type: string
              examples:
                - standard
            rps:
              type: integer
              description: >-
                Sustained requests per second; a short burst above it is
                allowed.
            rpm:
              type: integer
              description: Requests per minute.
            max_concurrent_tasks:
              type: integer
              description: Queued plus processing tasks allowed at the same time.
            daily_credit_cap:
              type:
                - integer
                - 'null'
              format: int64
              description: Credits that may be held per UTC day, or `null` for no cap.
        features:
          type: object
          properties:
            file_uploads:
              type: boolean
              description: Always `false` in v1. Inputs are URLs.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - type
            - code
            - message
            - request_id
          properties:
            type:
              type: string
              enum:
                - invalid_request_error
                - authentication_error
                - billing_error
                - permission_error
                - not_found_error
                - conflict_error
                - rate_limit_error
                - api_error
              description: The error category.
            code:
              type: string
              description: >-
                Stable machine-readable code. Branch on this, never on
                `message`.
              examples:
                - insufficient_credits
            message:
              type: string
              description: Human-readable detail. It may change.
            param:
              type: string
              description: The request field at fault, when there is one.
            request_id:
              type: string
              description: Same as the `X-Request-Id` header.
            details:
              type: object
              additionalProperties: true
              description: >-
                Extra members for some codes, for example `required` and
                `available` on `insufficient_credits`.
  examples:
    AccountExample:
      summary: An active account on the standard plan
      value:
        id: acct_01J9X7Z0K7Q8W3F2P1N6M5V4R3
        object: account
        name: Acme Studios
        balance:
          credits: 9940
          held: 60
        plan:
          name: standard
          rps: 10
          rpm: 300
          max_concurrent_tasks: 20
          daily_credit_cap: null
        features:
          file_uploads: false
  responses:
    Unauthorized:
      description: >-
        The API key is missing, unknown, revoked or expired (`invalid_api_key`,
        `api_key_revoked`, `api_key_expired`).
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            invalid_api_key:
              summary: No key, or an unknown key
              value:
                error:
                  type: authentication_error
                  code: invalid_api_key
                  message: >-
                    missing API key: send Authorization: Bearer sk_live_… (or
                    x-api-key)
                  request_id: req_01M5KN14MXD6SJ01ZQ2FPS6Y8X
            api_key_revoked:
              summary: The key was revoked in the console
              value:
                error:
                  type: authentication_error
                  code: api_key_revoked
                  message: this API key has been revoked
                  request_id: req_01M5KN14PY5YH5QPA2QS7Y07Y4
    Forbidden:
      description: >
        The key lacks the scope (`insufficient_scope`), the caller's IP address
        is not on the key's allowlist

        (`ip_not_allowed`), or the account is suspended or not approved yet
        (`account_suspended`,

        `account_not_active`).
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            insufficient_scope:
              summary: The key lacks the scope
              value:
                error:
                  type: permission_error
                  code: insufficient_scope
                  message: this key does not have the video:write scope
                  request_id: req_01M5KN14S3T4U5V6W7X8Y9Z0A1
            ip_not_allowed:
              summary: The caller is not on the key's IP allowlist
              value:
                error:
                  type: permission_error
                  code: ip_not_allowed
                  message: requests from 203.0.113.9 are not allowed for this key
                  request_id: req_01M5KN14T4U5V6W7X8Y9Z0A1B2
            account_not_active:
              summary: The account is waiting for approval
              value:
                error:
                  type: permission_error
                  code: account_not_active
                  message: this account is not active yet (pending approval)
                  request_id: req_01M5KN14U5V6W7X8Y9Z0A1B2C3
    TooManyRequests:
      description: >
        A limit of your plan was reached: the request rate
        (`rate_limit_exceeded`), the number of queued and

        processing tasks (`concurrency_limit_exceeded`) or the daily credit cap
        (`daily_cap_exceeded`). Wait

        `Retry-After` seconds before retrying.
      headers:
        Retry-After:
          $ref: '#/components/headers/Retry-After'
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            rate_limit_exceeded:
              summary: Too many requests
              value:
                error:
                  type: rate_limit_error
                  code: rate_limit_exceeded
                  message: rate limit exceeded for this account (10 rps, 300 rpm)
                  request_id: req_01M5KN37C3D4E5F6G7H8J9K0L1
            concurrency_limit_exceeded:
              summary: Too many tasks in flight
              value:
                error:
                  type: rate_limit_error
                  code: concurrency_limit_exceeded
                  message: >-
                    the account already has 20 tasks queued or processing (plan
                    limit 20)
                  request_id: req_01M5KN37D4E5F6G7H8J9K0L1M2
            daily_cap_exceeded:
              summary: Daily credit cap reached
              value:
                error:
                  type: rate_limit_error
                  code: daily_cap_exceeded
                  message: this account's daily credit cap (5000) would be exceeded
                  request_id: req_01M5KN37E5F6G7H8J9K0L1M2N3
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Your API key from the [developer console](https://fiveapi.ai), sent as
        `Authorization: Bearer sk_live_...`.

        The `x-api-key: sk_live_...` header is accepted as an alternative.

````

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