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

# Upload a file



## OpenAPI

````yaml /api/openapi.json post /v1/uploads
openapi: 3.1.0
info:
  title: Omnichar API
  version: 0.1.0
  description: Characters, licenses, public license verification and signed webhooks.
servers:
  - url: https://api.omnichar.org
security:
  - bearer: []
paths:
  /v1/uploads:
    post:
      tags:
        - Uploads
      summary: Upload a file
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                kind:
                  type: string
                  enum:
                    - image
                    - video
                    - character
                    - audio
                contentType:
                  type: string
                  maxLength: 100
                bytes:
                  type: integer
                  exclusiveMinimum: 0
                  maximum: 1073741824
                name:
                  type: string
                  maxLength: 200
                thumbBytes:
                  type: integer
                  exclusiveMinimum: 0
                  maximum: 2097152
              required:
                - kind
                - contentType
                - bytes
      responses:
        '201':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  r2Key:
                    type: string
                    deprecated: true
                    description: 'Deprecated: use upload_key.'
                  uploadUrl:
                    type: string
                    format: uri
                  headers:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      type: string
                  expiresAt:
                    type: string
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                  thumb:
                    anyOf:
                      - type: object
                        properties:
                          r2Key:
                            type: string
                          uploadUrl:
                            type: string
                            format: uri
                          contentType:
                            type: string
                            enum:
                              - image/webp
                        required:
                          - r2Key
                          - uploadUrl
                          - contentType
                        additionalProperties: false
                      - type: 'null'
                  upload_key:
                    type: string
                required:
                  - r2Key
                  - uploadUrl
                  - headers
                  - expiresAt
                  - thumb
                  - upload_key
                additionalProperties: false
components:
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: 'A team key: sk_test_ for sandbox, sk_live_ for production.'

````

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