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

> ## Agent Instructions
> Peel builds APIs from a URL and a task. Use only the REST routes under https://api.peel.sh and the hosted MCP server at https://api.peel.sh/mcp. Authenticate with the X-API-Key header, or send the same key as Authorization: Bearer. Errors carry code, message, retryable, retry, docs_url and details; branch on code. The peel CLI and the open-source SDK are not published; do not run npm install peel, which is an unrelated package. The keyless routes need no key and no session: the GET /public/marketplace routes, POST /v1/marketplace/{marketplace_id}/endpoints/{endpoint_name}:call and https://api.peel.sh/mcp/keyless. Account routes take a key or a signed-in session and answer 401 without one. These take only a session from peel.sh and refuse a key: GET /v1/accounts, POST /v1/accounts/join, POST /v1/accounts/{account_id}/leave, POST /v1/team/invites, GET /v1/connected-apps, DELETE /v1/connected-apps/{client_id}, PUT /v1/logins, DELETE /v1/logins, GET /v1/logins/code and the /account/billing routes. Every route with its schemas is in https://docs.peel.sh/openapi.json. Use the exact route, field and error-code names shown in these pages, and read the API Reference tab for request and response schemas.

# Upload a file's raw bytes to a one-time upload URL



## OpenAPI

````yaml /openapi.json put /public/uploads/{token}
openapi: 3.1.0
info:
  title: Peel API
  version: 0.1.0
  description: >-
    Public Peel API for creating APIs from URLs, inspecting them, calling
    generated endpoints, revising builds, and exporting OpenAPI or MCP
    definitions.
servers:
  - url: https://api.peel.sh
security: []
tags:
  - name: APIs
    description: Create, list, inspect, revise, rebuild, and export APIs.
  - name: Account
    description: Credits and account usage surfaces used by REST and MCP clients.
  - name: Device Auth
    description: CLI browser-login device flow helpers.
  - name: Endpoint Execution
    description: Execute generated endpoints through a stable API resource.
  - name: OAuth
    description: OAuth discovery and token flows for hosted MCP clients.
  - name: MCP
    description: Hosted MCP transport and discovery surface.
  - name: Marketplace
    description: Discover, install, publish, and explicitly contribute APIs.
  - name: Execution Jobs
    description: Start, reconnect, answer and cancel owner-scoped host executions.
  - name: Runs
    description: >-
      Every call, batch item and execution you ran, with its outcome and its
      requests to the site.
  - name: Files
    description: Encrypted owner-scoped files for declared runtime uploads and downloads.
  - name: Logins
    description: >-
      Saved site logins Peel signs in with for endpoints that need a signed-in
      session.
  - name: Webhooks
    description: Signed Standard Webhooks events for builds and execution jobs.
  - name: Schedules
    description: Run a data endpoint on a schedule and hear when its answer changes.
paths:
  /public/uploads/{token}:
    put:
      tags:
        - Files
      summary: Upload a file's raw bytes to a one-time upload URL
      operationId: putRuntimeFileUpload
      parameters:
        - in: path
          name: token
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/octet-stream:
            schema:
              type: string
              format: binary
      responses:
        '201':
          description: The stored file's metadata.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuntimeFile'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '410':
          $ref: '#/components/responses/Gone'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security: []
components:
  schemas:
    RuntimeFile:
      type: object
      properties:
        file_id:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        name:
          type: string
          minLength: 1
          maxLength: 255
        mime_type:
          type: string
          minLength: 3
          maxLength: 150
        size:
          type: integer
          minimum: 0
          maximum: 26214400
        expires_at:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
      required:
        - file_id
        - name
        - mime_type
        - size
        - expires_at
      additionalProperties: false
    ErrorResponse:
      type: object
      required:
        - type
        - title
        - status
        - instance
        - code
        - message
        - retryable
        - retry
        - docs_url
        - details
      properties:
        type:
          type: string
          format: uri
          description: >-
            RFC 9457 problem type: https://docs.peel.sh/errors/ followed by the
            code.
        title:
          type: string
          description: >-
            Short summary of the problem type. The same for every error with
            this code.
        status:
          type: integer
          minimum: 400
          maximum: 599
          description: The HTTP status of this response.
        instance:
          type: string
          description: >-
            This occurrence: urn:peel:request: followed by the request id, which
            x-request-id also carries.
        code:
          type: string
          description: Stable snake_case error code.
        message:
          type: string
        retryable:
          type: boolean
          description: Whether the same request can succeed later.
        retry:
          type: string
          enum:
            - same_key
            - fix_request
          description: >-
            A request answered with this envelope did not commit a write.
            same_key: send the same request again, with the same
            Idempotency-Key. fix_request: change the request, key or plan first.
        docs_url:
          type: string
          format: uri
        details:
          type: object
          additionalProperties: true
      additionalProperties: false
  responses:
    NotFound:
      description: Requested API or endpoint was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Conflict:
      description: The requested lifecycle transition conflicts with current API state.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Gone:
      description: The upload URL has expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    PayloadTooLarge:
      description: Request or file exceeds its bounded size.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    TooManyRequests:
      description: >-
        A rate limit, the build queue, or a quota. Code quota_exceeded means
        runs, builds, the daily cap or the monthly build budget are used up;
        details.quota says which, with details.limit (details.limit_usd and
        details.used_usd for build_budget), details.used or details.remaining,
        and details.reset_at. Code builds_paused means Peel paused new builds
        for everyone until details.resumes_at. Retry-After gives seconds.
      headers:
        Retry-After:
          schema:
            type: integer
            minimum: 1
          description: Seconds to wait before retrying.
        RateLimit:
          schema:
            type: string
          description: >-
            The remaining quota and seconds to reset, such as
            `"dispatch-read";r=0;t=42`.
        RateLimit-Policy:
          schema:
            type: string
          description: >-
            The quota and window in seconds, such as
            `"dispatch-read";q=120;w=60`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ServiceUnavailable:
      description: >-
        The authenticated execution host or durable encrypted storage is
        unavailable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'

````

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