> ## Documentation Index
> Fetch the complete documentation index at: https://sl-6d1f19fe-mintlify-ff95e355.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate a presigned upload URL



## OpenAPI

````yaml https://api.streamloop.app/v1/openapi.json post /uploads/{id}/upload-url
openapi: 3.1.0
info:
  contact:
    name: Streamloop
    url: https://streamloop.app
  description: >-
    The Streamloop REST API. Authenticate with either an `X-API-Key` header (a
    Streamloop API key, prefix `sl_` — simplest for programmatic clients) or an
    OAuth 2.1 bearer access token (obtain one via https://auth.streamloop.app).
    Collections are cursor-paginated (`limit` + `cursor`, returning `{ data,
    page }`). Errors are RFC 7807 problem documents.
  summary: >-
    Programmatic access to Streamloop — create and control 24/7 loop streams,
    manage media, destinations, playlists, and billing.
  title: Streamloop API
  version: 1.0.0
servers:
  - description: Production
    url: https://api.streamloop.app/v1
security:
  - oauth2: []
  - bearerAuth: []
  - apiKey: []
tags:
  - description: The authenticated user's account.
    name: account
  - description: Credits, usage analytics, invoices, and top-ups.
    name: billing
  - description: Crypto deposit options for topping up credits.
    name: crypto
  - description: Manage streaming destinations (custom RTMP).
    name: destinations
  - description: 'Service metadata: status and the OpenAPI document (unauthenticated).'
    name: meta
  - description: Manage and publish stream playlists.
    name: playlists
  - description: Create, control, schedule, and monitor 24/7 loop streams.
    name: streams
  - description: Upload and manage source media (video/audio).
    name: uploads
paths:
  /uploads/{id}/upload-url:
    post:
      tags:
        - uploads
      summary: Generate a presigned upload URL
      operationId: generateUploadUrl
      parameters:
        - description: Resource identifier.
          in: path
          name: id
          required: true
          schema:
            type: string
        - description: >-
            Optional client-generated key. A repeated request with the same key
            replays the original response (within 24h) instead of re-executing —
            safe retries.
          in: header
          name: Idempotency-Key
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type:
                  - string
                  - 'null'
          description: Successful response.
          headers:
            RateLimit-Limit:
              description: Requests allowed per window.
              schema:
                type: integer
            RateLimit-Remaining:
              description: Requests remaining in the current window.
              schema:
                type: integer
            RateLimit-Reset:
              description: Seconds until the window resets.
              schema:
                type: integer
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Missing or invalid access token.
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The token lacks the required scope or access to the resource.
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The resource does not exist or is not visible to the caller.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request body or parameters are invalid.
        '429':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Rate limit exceeded. Retry after the indicated delay.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
        '502':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The upstream data service returned an error.
      security:
        - oauth2:
            - streamloop:write
        - bearerAuth: []
        - apiKey: []
components:
  schemas:
    Problem:
      description: RFC 7807 problem-details error body.
      properties:
        code:
          description: A stable, machine-readable error code.
          type: string
        detail:
          description: A human-readable explanation specific to this occurrence.
          type: string
        status:
          description: The HTTP status code.
          type: integer
        title:
          description: A short, human-readable summary of the problem.
          type: string
        type:
          description: A URI reference identifying the problem type.
          format: uri-reference
          type: string
      required:
        - type
        - title
        - status
        - detail
        - code
      type: object
  securitySchemes:
    oauth2:
      description: OAuth 2.1 authorization-code flow with PKCE.
      flows:
        authorizationCode:
          authorizationUrl: https://auth.streamloop.app/api/auth/oauth2/authorize
          scopes:
            streamloop:billing: Read billing/usage and create top-up links
            streamloop:destructive: Delete streams and destinations
            streamloop:read: Read streams, destinations, playlists, and billing status
            streamloop:write: Create and control streams, destinations, and playlists
          tokenUrl: https://auth.streamloop.app/api/auth/oauth2/token
      type: oauth2
    bearerAuth:
      bearerFormat: JWT
      description: An OAuth 2.1 bearer access token.
      scheme: bearer
      type: http
    apiKey:
      description: >-
        A Streamloop API key (prefix `sl_`), sent in the `X-API-Key` header.
        Create and manage keys in the dashboard. The simplest auth for
        programmatic / agent clients — no OAuth flow required; the key acts as
        its owning user.
      in: header
      name: X-API-Key
      type: apiKey

````