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

# Start a file upload



## OpenAPI

````yaml /openapi.yaml post /v1/files
openapi: 3.1.0
info:
  title: VTurb API
  version: v1
  description: |
    Public REST API for VTurb. Dev-first and agents-first: every documented
    response is recorded from the API's real behavior.
  contact:
    name: VTurb API
    url: https://vturb.com
servers:
  - url: https://api.vturb.com
security:
  - bearerAuth: []
paths:
  /v1/files:
    post:
      tags:
        - Files
      summary: Start a file upload
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Display name for the file.
                  maxLength: 255
                  example: My thumbnail
                filename:
                  type: string
                  description: Original filename of the upload.
                  maxLength: 255
                  example: mythumbnail.jpg
                content_type:
                  type: string
                  description: MIME type of the file.
                  enum:
                    - image/png
                    - image/jpeg
                    - image/gif
                    - image/webp
                    - text/vtt
                  example: image/jpeg
                size:
                  type: integer
                  description: Size of the file in bytes (max 20MB).
                  format: int64
                  minimum: 1
                  maximum: 20971520
                  example: 184856
                checksum:
                  type: string
                  description: >-
                    Optional SHA-256 checksum of the file (64 hex characters).
                    When given, the presign locks it so S3 rejects any upload
                    whose bytes don't match.
                  example: >-
                    e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
                folder_id:
                  type: string
                  description: Optional folder to place the file in.
                  example: 6890000000000000000000a1
              required:
                - name
                - filename
                - content_type
                - size
            example:
              name: My thumbnail
              filename: mythumbnail.jpg
              content_type: image/jpeg
              size: 184856
              checksum: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
              folder_id: 6890000000000000000000a1
      responses:
        '201':
          description: checksum is optional; omit it to skip the upload integrity check.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  status:
                    type: string
                    enum:
                      - awaiting_upload
                      - active
                  upload:
                    type: object
                    properties:
                      url:
                        type: string
                      expires_at:
                        type: string
                    required:
                      - url
                      - expires_at
                  complete_url:
                    type: string
                required:
                  - id
                  - status
                  - upload
                  - complete_url
              example:
                id: 0190a0b0-0000-7000-8000-000000000001
                status: awaiting_upload
                upload:
                  url: >-
                    https://s3.amazonaws.com/vturb-uploads/org_123/x/original.jpg?x-amz-checksum-sha256=qqq%3D&X-Amz-Signature=abc
                  expires_at: '2026-08-13T12:15:00Z'
                complete_url: >-
                  /v1/files/0190a0b0-0000-7000-8000-000000000001/upload/completion
        '401':
          description: Missing API credential.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                  code:
                    type: string
                  message:
                    type: string
                  request_id:
                    type: string
                required:
                  - type
                  - code
                  - message
                  - request_id
              example:
                type: https://docs.vturb.com/errors/unauthorized
                code: unauthorized
                message: >-
                  Missing or invalid API credential. Send a vt_ token in the
                  Authorization header.
                request_id: 00000000-0000-0000-0000-000000000000
        '403':
          description: The credential's role cannot write files.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                  code:
                    type: string
                  message:
                    type: string
                  request_id:
                    type: string
                required:
                  - type
                  - code
                  - message
                  - request_id
              example:
                type: https://docs.vturb.com/errors/forbidden
                code: forbidden
                message: The credential is missing the scope this action requires.
                request_id: 00000000-0000-0000-0000-000000000000
        '422':
          description: Validation failed — every rejected field is named at once.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                  code:
                    type: string
                  message:
                    type: string
                  request_id:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                      required:
                        - field
                        - message
                required:
                  - type
                  - code
                  - message
                  - request_id
                  - errors
              example:
                type: https://docs.vturb.com/errors/unprocessable_content
                code: unprocessable_content
                message: The request is invalid. See errors for the fields that failed.
                request_id: 00000000-0000-0000-0000-000000000000
                errors:
                  - field: checksum
                    message: must be a 64-char hex SHA-256
                  - field: size
                    message: is not a number
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Paste your VTurb API token (vt_...). Sent as `Authorization: Bearer
        <token>`.

````