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

# Create an upload URL

> Get a presigned URL to upload a file of up to 5 GB straight to storage. `PUT` the raw bytes to `upload_url` within an hour, then use `id` as `file_id`.



## OpenAPI

````yaml POST /v1/files/upload-url
openapi: 3.1.0
info:
  title: AirCaps API
  version: 1.0.0
  description: >-
    Speech-to-text for English. A5S Async v1 (REST) and A5S v2 Streaming
    (WebSocket).
servers:
  - url: https://api.aircaps.com
security:
  - bearerAuth: []
tags:
  - name: Transcripts
  - name: Files
  - name: Account
paths:
  /v1/files/upload-url:
    post:
      tags:
        - Files
      summary: Create an upload URL
      description: >-
        Get a presigned URL to upload a file of up to 5 GB straight to storage.
        `PUT` the raw bytes to `upload_url` within an hour, then use `id` as
        `file_id`.
      operationId: createUploadUrl
      responses:
        '201':
          description: Upload URL created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadUrl'
              example:
                id: file_01k6z3m4q8w7e5r2t1y0u9i8o7
                object: file
                upload_url: https://storage.example/...
                method: PUT
                upload_expires_at: '2026-10-06T19:01:02Z'
                expires_at: '2026-10-07T18:01:02Z'
                max_size_bytes: 5368709120
        '401':
          description: 'Missing or invalid API key. Codes: `unauthorized`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  type: authentication_error
                  code: unauthorized
                  message: invalid API key
                  param: null
                  request_id: req_01k6z3m4q8w7e5r2t1y0u9i8o7
        '403':
          description: >-
            The account may not do this. Codes: `account_suspended`,
            `account_disabled`, `usage_limit_reached`, `model_access_denied`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  type: permission_error
                  code: model_access_denied
                  message: >-
                    This account does not have access to A5S Async v1. To get
                    access, talk to sales at
                    https://research.aircaps.com/contact.
                  param: null
                  request_id: req_01k6z3m4q8w7e5r2t1y0u9i8o7
        '429':
          description: 'Rate or queue limit reached. Codes: `rate_limited`, `queue_full`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  type: rate_limit_error
                  code: rate_limited
                  message: too many requests; retry after the Retry-After interval
                  param: null
                  request_id: req_01k6z3m4q8w7e5r2t1y0u9i8o7
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
        '500':
          description: >-
            Server error. Safe to retry (use the same Idempotency-Key). Codes:
            `internal_error`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  type: api_error
                  code: internal_error
                  message: internal error
                  param: null
                  request_id: req_01k6z3m4q8w7e5r2t1y0u9i8o7
components:
  schemas:
    UploadUrl:
      type: object
      required:
        - id
        - object
        - upload_url
        - method
        - upload_expires_at
        - expires_at
        - max_size_bytes
      properties:
        id:
          type: string
          example: file_01k6z3m4q8w7e5r2t1y0u9i8o7
          description: Use as `file_id` after the upload.
        object:
          type: string
          enum:
            - file
        upload_url:
          type: string
          description: 'Presigned URL: `PUT` the raw file bytes here.'
        method:
          type: string
          enum:
            - PUT
        upload_expires_at:
          type: string
          format: date-time
          description: Upload before this (one hour).
        expires_at:
          type: string
          format: date-time
          description: The file is deleted after this (24 hours).
        max_size_bytes:
          type: integer
          example: 5368709120
    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
                - permission_error
                - rate_limit_error
                - api_error
            code:
              type: string
              description: Machine-readable code; see [Errors](/errors).
            message:
              type: string
            param:
              type:
                - string
                - 'null'
              description: The request field at fault, if any.
            request_id:
              type: string
              description: >-
                Also in the `x-request-id` header. Include it when contacting
                support.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your API key: `Authorization: Bearer aircaps_sk_...`'

````

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