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

# Upload a File

> The file to use, after upload the file name will be returned and you can pass this name to generation endpoints



## OpenAPI

````yaml /api-1(21).json post /api-files/upload
openapi: 3.0.3
info:
  title: Radin AI API docs
  description: '### Welcome to Radin AI API docs'
  version: '1.0'
  contact:
    name: Support
    url: https://radinai.com/support
servers:
  - url: https://api2.radinai.com
    description: API base URL
security:
  - ApiKeyAuth: []
externalDocs:
  url: https://radinai.com/api-dashboard
  description: API Dashboard
paths:
  /api-files/upload:
    post:
      tags:
        - Files
      summary: Upload a File
      description: >-
        The file to use, after upload the file name will be returned and you can
        pass this name to generation endpoints
      operationId: postApi-filesUpload
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  default: File
                  type: string
                  format: binary
        required: true
      responses:
        '200':
          description: Response for status 200
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - image
                      width:
                        type: number
                      height:
                        type: number
                      name:
                        type: string
                      id:
                        type: string
                      coverName:
                        type: string
                    required:
                      - type
                      - width
                      - height
                      - name
                      - id
                      - coverName
                    additionalProperties: false
                    title: Image Upload Response
                  - type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - audio
                      name:
                        type: string
                      id:
                        type: string
                      duration:
                        type: number
                    required:
                      - type
                      - name
                      - id
                      - duration
                    additionalProperties: false
                    title: Audio Upload Response
                  - type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - video
                      name:
                        type: string
                      id:
                        type: string
                      duration:
                        type: number
                      width:
                        type: number
                      height:
                        type: number
                      coverName:
                        type: string
                    required:
                      - type
                      - name
                      - id
                      - duration
                      - width
                      - height
                      - coverName
                    additionalProperties: false
                    title: Video Upload Response
        '400':
          description: Response for status 400
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                properties:
                  message:
                    type: string
        '401':
          description: Response for status 401
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                properties:
                  message:
                    type: string
        '403':
          description: Response for status 403
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                properties:
                  message:
                    type: string
        '500':
          description: Response for status 500
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                properties:
                  message:
                    type: string
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key, obtained from https://radinai.com/manage-api-keys

````