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

# Stage File

> Issue a presigned upload token so the browser can upload a file directly to Vercel Blob, then call `POST /api/sandboxes/files` with the resulting blob URL to commit it to the sandbox repo. Use `upload()` from `@vercel/blob/client` rather than calling this route by hand. Max file size 100MB.



## OpenAPI

````yaml api-reference/openapi/content.json POST /api/sandboxes/staged-file
openapi: 3.1.0
info:
  title: Recoup API - Content
  description: >-
    API documentation for the Recoup platform - an AI agent platform for the
    music industry
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.recoupable.dev
security: []
paths:
  /api/sandboxes/staged-file:
    post:
      description: >-
        Issue a presigned upload token so the browser can upload a file directly
        to Vercel Blob, then call `POST /api/sandboxes/files` with the resulting
        blob URL to commit it to the sandbox repo. Use `upload()` from
        `@vercel/blob/client` rather than calling this route by hand. Max file
        size 100MB.
      requestBody:
        description: '`HandleUploadBody` envelope from `@vercel/blob/client`.'
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
      responses:
        '200':
          description: >-
            Handshake response from `@vercel/blob/client` — return verbatim to
            the library.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '401':
          description: Missing or invalid auth on the handshake POST.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SandboxErrorResponse'
        '500':
          description: Invalid body or upstream Vercel Blob failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SandboxErrorResponse'
components:
  schemas:
    SandboxErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message describing what went wrong
          example: Failed to create sandbox

````