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

# Mint a presigned PUT URL for a user file upload



## OpenAPI

````yaml /api-reference/mobilerun-va-chat.yaml post /agents/files/upload-url
openapi: 3.1.0
info:
  title: Mobilerun VA Chat
  version: v1
servers:
  - description: Droidrun Cloud API
    url: https://api.mobilerun.ai/v1
security:
  - bearerAuth: []
paths:
  /agents/files/upload-url:
    post:
      tags:
        - Files
      summary: Mint a presigned PUT URL for a user file upload
      operationId: filesUploadUrl
      parameters:
        - in: header
          name: Idempotency-Key
          required: false
          schema:
            minLength: 1
            type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                filename:
                  maxLength: 255
                  minLength: 1
                  type: string
                mimeType:
                  minLength: 1
                  type: string
                sizeBytes:
                  exclusiveMinimum: 0
                  type: integer
                zone:
                  enum:
                    - user
                    - skills
                  type: string
              required:
                - filename
                - mimeType
                - sizeBytes
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  expiresAt:
                    format: date-time
                    type: string
                  fileId:
                    format: uuid
                    type: string
                  putUrl:
                    format: uri
                    type: string
                required:
                  - fileId
                  - putUrl
                  - expiresAt
                type: object
          description: Presigned PUT URL and fileId
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '402':
          content:
            application/json:
              schema:
                properties:
                  addingBytes:
                    type: number
                  currentBytes:
                    type: number
                  error:
                    enum:
                      - quota_exceeded
                    type: string
                  maxPending:
                    type: number
                  message:
                    type: string
                  pendingCount:
                    type: number
                  quotaBytes:
                    type: number
                  reason:
                    enum:
                      - bytes
                      - pending_count
                    type: string
                required:
                  - error
                  - reason
                  - message
                  - currentBytes
                  - addingBytes
                  - pendingCount
                  - quotaBytes
                  - maxPending
                type: object
          description: Quota exceeded (bytes cap or per-user pending count)
        '409':
          content:
            application/json:
              schema:
                properties:
                  error:
                    enum:
                      - idempotency_conflict
                    type: string
                  message:
                    type: string
                required:
                  - error
                  - message
                type: object
          description: Idempotency-Key reused with different content
        '500':
          description: Internal Server Error
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.files.uploadURL({
              filename: 'x',
              mimeType: 'x',
              sizeBytes: 1,
            });

            console.log(response.expiresAt);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            response = client.files.upload_url(
                filename="x",
                mime_type="x",
                size_bytes=1,
            )
            print(response.expires_at)
components:
  securitySchemes:
    bearerAuth:
      bearerFormat: Opaque
      description: Bearer token via Authorization header
      scheme: bearer
      type: http

````