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

# Get Upload Url

> Get a presigned URL for uploading a file.

The file will be uploaded directly to storage, bypassing the Controller.
After upload completes, call POST /experiments/{id}/samples with the file_path.



## OpenAPI

````yaml /openapi.json post /v1/experiments/{experiment_id}/upload-url
openapi: 3.1.0
info:
  description: Customer-owned evaluation lifecycle API.
  title: HeyBee Public API
  version: 1.0.0
servers:
  - description: Production
    url: https://api.heybee.app
security: []
paths:
  /v1/experiments/{experiment_id}/upload-url:
    post:
      tags:
        - Samples
      summary: Get Upload Url
      description: >-
        Get a presigned URL for uploading a file.


        The file will be uploaded directly to storage, bypassing the Controller.

        After upload completes, call POST /experiments/{id}/samples with the
        file_path.
      operationId: get_upload_url_v1_experiments__experiment_id__upload_url_post
      parameters:
        - in: path
          name: experiment_id
          required: true
          schema:
            format: uuid
            title: Experiment Id
            type: string
        - in: header
          name: authorization
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - in: header
          name: X-API-Key
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UploadURLRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadURLResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - BearerAuth: []
        - ApiKeyAuth: []
components:
  schemas:
    UploadURLRequest:
      description: Request for a presigned upload URL.
      properties:
        content_hash:
          description: Client-side content hash for deduplication and verification
          maxLength: 128
          minLength: 1
          title: Content Hash
          type: string
        content_type:
          description: MIME type of the file
          example: audio/mpeg
          title: Content Type
          type: string
        filename:
          description: Original filename
          maxLength: 255
          minLength: 1
          title: Filename
          type: string
        idempotency_key:
          description: Stable key used to replay upload signing safely
          maxLength: 255
          minLength: 1
          title: Idempotency Key
          type: string
        size_bytes:
          description: Declared byte size, required before upload signing
          minimum: 0
          title: Size Bytes
          type: integer
      required:
        - filename
        - content_type
        - size_bytes
        - content_hash
        - idempotency_key
      title: UploadURLRequest
      type: object
    UploadURLResponse:
      description: Response with presigned upload URL.
      properties:
        bucket:
          anyOf:
            - type: string
            - type: 'null'
          description: Storage bucket used in TUS metadata
          title: Bucket
        expires_in:
          description: Seconds until the upload URL expires
          title: Expires In
          type: integer
        file_path:
          description: >-
            Path where the file will be stored (use this when creating the
            sample)
          title: File Path
          type: string
        resumable_url:
          anyOf:
            - type: string
            - type: 'null'
          description: TUS endpoint for resumable uploads
          title: Resumable Url
        upload_token:
          anyOf:
            - type: string
            - type: 'null'
          description: Signed token supplied as x-signature to the TUS endpoint
          title: Upload Token
        upload_url:
          description: Presigned URL for uploading the file
          title: Upload Url
          type: string
      required:
        - upload_url
        - file_path
        - expires_in
      title: UploadURLResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: Supabase JWT
      scheme: bearer
      type: http
    ApiKeyAuth:
      in: header
      name: X-API-Key
      type: apiKey

````