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

# File limits

> What can be uploaded, and how large.

Read this before building an uploader, so you can refuse a file in your own UI rather than
waiting for ours to reject it.

Sizes differ by kind, because WhatsApp's own limits differ by kind — an image is capped well
below a document.


## OpenAPI

````yaml developers/openapi.json GET /v1/files/limits
openapi: 3.1.0
info:
  title: Vocily API
  description: >-
    Public REST API for Vocily. Build and configure an agent, publish a version
    and put it live, place outbound calls, and read back calls, chats and what
    the agent remembered. Authenticate with a workspace API key as a Bearer
    token.


    Some things stay in the dashboard, by design: creating an API key, buying or
    connecting a phone number, setting an agent's webhook URL, connecting
    WhatsApp and its templates, building HTTP tools, and running batch
    campaigns.
  version: v1
servers:
  - url: https://api.vocily.ai
    description: Production
security: []
paths:
  /v1/files/limits:
    get:
      tags:
        - files
      summary: Get File Limits
      description: >-
        What can be uploaded, and how large.


        Sizes differ by kind: an image is capped well below a document, because
        that is how WhatsApp's own limits work. Read this before building an
        uploader, so you can refuse a file in your own interface rather than
        waiting for ours to.
      operationId: get_file_limits_v1_files_limits_get
      parameters: []
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicFileLimits'
              example:
                max_bytes: 26214400
                max_bytes_by_kind:
                  image: 5242880
                  video: 16777216
                  audio: 16777216
                  document: 26214400
                max_per_workspace: 500
                mime_types:
                  - application/pdf
                  - image/jpeg
                  - image/png
                  - video/mp4
                extensions:
                  - .jpeg
                  - .jpg
                  - .mp4
                  - .pdf
                  - .png
                kinds:
                  - audio
                  - document
                  - image
                  - video
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                detail: Invalid API key
                code: UNAUTHORIZED
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded — honor `Retry-After`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                code: rate_limited
      security:
        - bearerAuth: []
components:
  schemas:
    PublicFileLimits:
      properties:
        max_bytes:
          type: integer
          title: Max Bytes
          description: The largest upload accepted, in bytes, across every kind.
          examples:
            - 26214400
        max_bytes_by_kind:
          additionalProperties:
            type: integer
          type: object
          title: Max Bytes By Kind
          description: >-
            The size limit for each kind, in bytes. Images and video are capped
            lower than documents.
          examples:
            - audio: 16777216
              document: 26214400
              image: 5242880
              video: 16777216
        max_per_workspace:
          type: integer
          title: Max Per Workspace
          description: How many files one workspace may hold.
          examples:
            - 500
        mime_types:
          items:
            type: string
          type: array
          title: Mime Types
          description: >-
            Every file type that can be uploaded. A file whose contents are not
            one of these is refused.
        extensions:
          items:
            type: string
          type: array
          title: Extensions
          description: >-
            The extensions those types are normally saved with. Offer them to a
            file picker alongside `mime_types`: given only MIME types, some
            systems will not let a person select a file whose type they map
            differently.
        kinds:
          items:
            type: string
          type: array
          title: Kinds
          description: 'The kinds a file can be: `image`, `video`, `audio`, `document`.'
      type: object
      required:
        - max_bytes
        - max_bytes_by_kind
        - max_per_workspace
        - mime_types
        - extensions
        - kinds
      title: PublicFileLimits
    ApiError:
      type: object
      description: >-
        Error envelope. `code` is derived from the HTTP status, so branch on it
        for the CLASS of failure; the specific reason is `detail.code`. Every
        public refusal carries both.
      properties:
        detail:
          type: object
          description: >-
            The reason. `code` is the domain reason (e.g. `call_not_found`) and
            `message` is a sentence safe to log. On a `422` it also carries
            `errors[]`, one entry per rejected field — see
            `HTTPValidationError`.
          properties:
            code:
              type: string
              example: call_not_found
            message:
              type: string
              example: Call not found
          required:
            - code
            - message
        code:
          type: string
          description: Derived from the HTTP status, not the domain reason.
          example: NOT_FOUND
    HTTPValidationError:
      type: object
      title: HTTPValidationError
      description: >-
        A request the API could not read: a field of the wrong type, out of
        range, missing, or one we do not accept. Same envelope as every other
        error.
      properties:
        detail:
          type: object
          description: >-
            What was wrong, as `code`, a one-line `message`, and every offending
            field in `errors`.
          required:
            - code
            - message
            - errors
          properties:
            code:
              type: string
              enum:
                - validation_error
            message:
              type: string
              description: >-
                The first problem in one line, with a count of the rest — e.g.
                `model.temperature: Input should be less than or equal to 2 (and
                1 more)`.
            errors:
              type: array
              items:
                $ref: '#/components/schemas/ValidationError'
              description: >-
                One entry per offending field. **Every problem is reported at
                once**, not just the first, so a malformed body needs one round
                trip to fix rather than one per field.
        code:
          type: string
          enum:
            - VALIDATION_ERROR
          description: Derived from the HTTP status, as on every error.
    ValidationError:
      type: object
      title: ValidationError
      required:
        - field
        - message
        - type
      properties:
        field:
          type: string
          description: >-
            The offending field as a path from the root of your request —
            `voice.speed`, `variables[0].key`, or `query.limit` for a query
            parameter. **This is the field to read.**
        message:
          type: string
          description: What is wrong with it, in plain language.
        type:
          type: string
          description: >-
            A stable machine code for the kind of failure, e.g.
            `extra_forbidden` for a field we do not accept, `missing` for a
            required one, or `less_than_equal` for a number out of range. Switch
            on this rather than on `message`, which may be reworded.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your API key as a Bearer token, e.g. `Authorization: Bearer vk_…`.'

````

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