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

# POST /upload/v1beta/files

> Available at the instance root or under a provider/namespace prefix. Shared paths select the wire dialect from client headers; without dialect evidence, the first listed route wins.



## OpenAPI

````yaml /generated/openapi.json post /upload/v1beta/files
openapi: 3.1.0
info:
  description: >-
    Forwarding, management, portal and OAuth APIs generated from Rust types.
    Input and output schemas preserve their respective Serde contracts.
    Streaming events and WebSocket messages are documented alongside HTTP
    payloads.
  title: GPROXY HTTP API
  version: 4.2.1
servers: []
security:
  - bearer: []
  - anthropicKey: []
  - googleKey: []
  - queryKey: []
paths:
  /upload/v1beta/files:
    post:
      tags:
        - Forwarding
      summary: POST /upload/v1beta/files
      description: >-
        Available at the instance root or under a provider/namespace prefix.
        Shared paths select the wire dialect from client headers; without
        dialect evidence, the first listed route wins.
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Input_UploadFileMetadata'
          application/octet-stream:
            schema:
              format: binary
              type: string
          multipart/related:
            schema:
              $ref: '#/components/schemas/Input_UploadFileForm3'
        required: true
      responses:
        2XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Output_UploadFileResponseBody'
          description: Successful protocol response
        default:
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/Output_Envelope'
                  - properties:
                      error:
                        $ref: '#/components/schemas/Output_ErrorDetail'
                    required:
                      - error
                    type: object
                  - allOf:
                      - $ref: '#/components/schemas/Output_ErrorEvent'
                      - properties:
                          type:
                            const: error
                        required:
                          - type
                        type: object
                  - properties:
                      error:
                        $ref: '#/components/schemas/Output_GenerateContentError'
                    required:
                      - error
                    type: object
            text/plain:
              schema:
                type: string
          description: Gateway or upstream error
components:
  schemas:
    Input_UploadFileMetadata:
      additionalProperties: true
      properties:
        file:
          anyOf:
            - $ref: '#/components/schemas/Input_File'
            - type: 'null'
      type: object
    Input_UploadFileForm3:
      properties:
        file:
          $ref: '#/components/schemas/Input_BinaryPart'
        metadata:
          $ref: '#/components/schemas/Input_UploadFileMetadata'
      required:
        - file
        - metadata
      type: object
    Output_UploadFileResponseBody:
      additionalProperties: true
      properties:
        file:
          anyOf:
            - $ref: '#/components/schemas/Output_File'
            - type: 'null'
      type: object
    Output_Envelope:
      properties:
        error:
          $ref: '#/components/schemas/Output_EnvelopeBody'
      required:
        - error
      type: object
    Output_ErrorDetail:
      properties:
        code:
          type:
            - string
            - 'null'
        message:
          type: string
        param:
          type:
            - string
            - 'null'
        type:
          type:
            - string
            - 'null'
      required:
        - message
      type: object
    Output_ErrorEvent:
      additionalProperties: true
      properties:
        error:
          $ref: '#/components/schemas/Output_StreamError'
        request_id:
          type:
            - string
            - 'null'
      required:
        - error
      type: object
    Output_GenerateContentError:
      additionalProperties: true
      properties:
        code:
          format: int64
          type: integer
        details:
          items: true
          type:
            - array
            - 'null'
        message:
          type: string
        status:
          type:
            - string
            - 'null'
      required:
        - code
        - message
      type: object
    Input_File:
      additionalProperties: true
      properties:
        createTime:
          type:
            - string
            - 'null'
        displayName:
          type:
            - string
            - 'null'
        downloadUri:
          type:
            - string
            - 'null'
        error:
          anyOf:
            - $ref: '#/components/schemas/Input_Status'
            - type: 'null'
        expirationTime:
          type:
            - string
            - 'null'
        mimeType:
          type:
            - string
            - 'null'
        name:
          type:
            - string
            - 'null'
        sha256Hash:
          type:
            - string
            - 'null'
        sizeBytes:
          anyOf:
            - $ref: '#/components/schemas/Input_FileSize'
            - type: 'null'
        source:
          anyOf:
            - $ref: '#/components/schemas/Input_FileSource2'
            - type: 'null'
        state:
          anyOf:
            - $ref: '#/components/schemas/Input_FileState'
            - type: 'null'
        updateTime:
          type:
            - string
            - 'null'
        uri:
          type:
            - string
            - 'null'
        videoMetadata:
          anyOf:
            - $ref: '#/components/schemas/Input_VideoFileMetadata'
            - type: 'null'
      type: object
    Input_BinaryPart:
      format: binary
      type: string
    Output_File:
      additionalProperties: true
      properties:
        createTime:
          type:
            - string
            - 'null'
        displayName:
          type:
            - string
            - 'null'
        downloadUri:
          type:
            - string
            - 'null'
        error:
          anyOf:
            - $ref: '#/components/schemas/Output_Status'
            - type: 'null'
        expirationTime:
          type:
            - string
            - 'null'
        mimeType:
          type:
            - string
            - 'null'
        name:
          type:
            - string
            - 'null'
        sha256Hash:
          type:
            - string
            - 'null'
        sizeBytes:
          anyOf:
            - $ref: '#/components/schemas/Output_FileSize'
            - type: 'null'
        source:
          anyOf:
            - $ref: '#/components/schemas/Output_FileSource'
            - type: 'null'
        state:
          anyOf:
            - $ref: '#/components/schemas/Output_FileState'
            - type: 'null'
        updateTime:
          type:
            - string
            - 'null'
        uri:
          type:
            - string
            - 'null'
        videoMetadata:
          anyOf:
            - $ref: '#/components/schemas/Output_VideoFileMetadata'
            - type: 'null'
      type: object
    Output_EnvelopeBody:
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
      type: object
    Output_StreamError:
      additionalProperties: true
      properties:
        message:
          type: string
        type:
          $ref: '#/components/schemas/Output_StreamErrorType'
      required:
        - type
        - message
      type: object
    Input_Status:
      additionalProperties: true
      properties:
        code:
          format: int32
          type:
            - integer
            - 'null'
        details:
          items:
            $ref: '#/components/schemas/Input_StatusDetail'
          type:
            - array
            - 'null'
        message:
          type:
            - string
            - 'null'
      type: object
    Input_FileSize:
      anyOf:
        - type: string
        - format: int64
          type: integer
      description: >-
        ProtoJSON int64 values encode as strings; parsers also accept JSON
        integers.
    Input_FileSource2:
      enum:
        - SOURCE_UNSPECIFIED
        - UPLOADED
        - GENERATED
        - REGISTERED
      type: string
    Input_FileState:
      enum:
        - STATE_UNSPECIFIED
        - PROCESSING
        - ACTIVE
        - FAILED
      type: string
    Input_VideoFileMetadata:
      additionalProperties: true
      properties:
        videoDuration:
          type:
            - string
            - 'null'
      type: object
    Output_Status:
      additionalProperties: true
      properties:
        code:
          format: int32
          type:
            - integer
            - 'null'
        details:
          items:
            $ref: '#/components/schemas/Output_StatusDetail'
          type:
            - array
            - 'null'
        message:
          type:
            - string
            - 'null'
      type: object
    Output_FileSize:
      anyOf:
        - type: string
        - format: int64
          type: integer
      description: >-
        ProtoJSON int64 values encode as strings; parsers also accept JSON
        integers.
    Output_FileSource:
      enum:
        - SOURCE_UNSPECIFIED
        - UPLOADED
        - GENERATED
        - REGISTERED
      type: string
    Output_FileState:
      enum:
        - STATE_UNSPECIFIED
        - PROCESSING
        - ACTIVE
        - FAILED
      type: string
    Output_VideoFileMetadata:
      additionalProperties: true
      properties:
        videoDuration:
          type:
            - string
            - 'null'
      type: object
    Output_StreamErrorType:
      enum:
        - api_error
        - authentication_error
        - billing_error
        - invalid_request_error
        - not_found_error
        - overloaded_error
        - permission_error
        - rate_limit_error
        - timeout_error
        - conflict_error
        - request_too_large
      type: string
    Input_StatusDetail:
      additionalProperties: true
      description: >-
        google.rpc.Status.details is a list of protobuf Any objects. Discovery

        explicitly permits arbitrary payload properties; @type identifies their
        schema.
      properties:
        '@type':
          type: string
      required:
        - '@type'
      type: object
    Output_StatusDetail:
      additionalProperties: true
      description: >-
        google.rpc.Status.details is a list of protobuf Any objects. Discovery

        explicitly permits arbitrary payload properties; @type identifies their
        schema.
      properties:
        '@type':
          type: string
      required:
        - '@type'
      type: object
  securitySchemes:
    bearer:
      scheme: bearer
      type: http
    anthropicKey:
      in: header
      name: x-api-key
      type: apiKey
    googleKey:
      in: header
      name: x-goog-api-key
      type: apiKey
    queryKey:
      in: query
      name: key
      type: apiKey

````

## Related topics

- [Routing & Endpoints](https://gproxy.leenhawk.com/reference/routing-table.md)
- [POST /v1beta/files](https://gproxy.leenhawk.com/api-reference/forwarding/post-v1betafiles.md)
- [POST /v1beta/models/{model}:countTokens](https://gproxy.leenhawk.com/api-reference/forwarding/post-v1betamodels-:counttokens.md)
- [POST /v1beta/models/{model}:embedContent](https://gproxy.leenhawk.com/api-reference/forwarding/post-v1betamodels-:embedcontent.md)
- [POST /v1beta/models/{model}:generateContent](https://gproxy.leenhawk.com/api-reference/forwarding/post-v1betamodels-:generatecontent.md)


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