uploads.sh Galleries API

An ordered set of media behind one public link, linkable to a pull request or issue.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 12

POST /v1/workspaces/{workspace}/galleries Create a gallery #
GET /v1/workspaces/{workspace}/galleries List galleries #
GET /v1/workspaces/{workspace}/galleries/by-reference Find galleries by reference #
GET /v1/workspaces/{workspace}/galleries/{galleryId} Get a gallery #
PATCH /v1/workspaces/{workspace}/galleries/{galleryId} Update a gallery #
DELETE /v1/workspaces/{workspace}/galleries/{galleryId} Delete a gallery #
POST /v1/workspaces/{workspace}/galleries/{galleryId}/items Add an item #
PUT /v1/workspaces/{workspace}/galleries/{galleryId}/items/order Reorder items #
DELETE /v1/workspaces/{workspace}/galleries/{galleryId}/items/{itemId} Remove an item #
GET /v1/workspaces/{workspace}/galleries/{galleryId}/external-references List references #
POST /v1/workspaces/{workspace}/galleries/{galleryId}/external-references Add a reference #
DELETE /v1/workspaces/{workspace}/galleries/{galleryId}/external-references/{referenceId} Remove a reference #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/uploads-sh:uploads-sh-galleries-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

uploads-sh-galleries-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: uploads.sh Galleries API
  version: 1.0.0
  description: 'Workspace-scoped file hosting for agents and humans. The canonical public hierarchy is `/v1/workspaces/{workspace}/...`. Full narrative docs: https://uploads.sh/docs/api'
  contact:
    url: https://github.com/buildinternet/uploads
  license:
    name: Apache-2.0
    url: https://github.com/buildinternet/uploads/blob/main/LICENSE
servers:
- url: https://api.uploads.sh
  description: Production API
security:
- bearerAuth: []
tags:
- name: Galleries
  description: An ordered set of media behind one public link, linkable to a pull request or issue.
paths:
  /v1/workspaces/{workspace}/galleries:
    parameters:
    - $ref: '#/components/parameters/Workspace'
    post:
      operationId: createGallery
      security:
      - bearerAuth:
        - files:write
      summary: Create a gallery
      description: Send an Idempotency-Key to make retries safe for 24 hours. Reusing the key with the same effective body returns the original 201 response. Reusing it with a different body returns 409.
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GalleryCreate'
      responses:
        '201':
          description: The gallery was created.
          headers:
            Idempotency-Replayed:
              description: Present with value `true` when the API replays a stored response.
              schema:
                type: string
                enum:
                - 'true'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Gallery'
        '400':
          $ref: '#/components/responses/Validation'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/RateLimited'
      tags:
      - Galleries
    get:
      operationId: listGalleries
      security:
      - bearerAuth:
        - files:read
      summary: List galleries
      parameters:
      - $ref: '#/components/parameters/GalleryLimit'
      - $ref: '#/components/parameters/Cursor'
      responses:
        '200':
          description: Enriched gallery summaries and an opaque continuation cursor.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GalleryList'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
      tags:
      - Galleries
  /v1/workspaces/{workspace}/galleries/by-reference:
    parameters:
    - $ref: '#/components/parameters/Workspace'
    get:
      operationId: findGalleriesByReference
      security:
      - bearerAuth:
        - files:read
      summary: Find galleries by reference
      parameters:
      - name: provider
        in: query
        required: true
        schema:
          type: string
      - name: coordinate
        in: query
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/GalleryLimit'
      - $ref: '#/components/parameters/Cursor'
      responses:
        '200':
          description: Gallery summaries and an opaque continuation cursor.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GalleryList'
        '400':
          $ref: '#/components/responses/Validation'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
      tags:
      - Galleries
  /v1/workspaces/{workspace}/galleries/{galleryId}:
    parameters:
    - $ref: '#/components/parameters/Workspace'
    - $ref: '#/components/parameters/GalleryId'
    get:
      operationId: getGallery
      security:
      - bearerAuth:
        - files:read
      summary: Get a gallery
      responses:
        '200':
          description: The gallery and its items.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Gallery'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
      tags:
      - Galleries
    patch:
      operationId: updateGallery
      security:
      - bearerAuth:
        - files:write
      summary: Update a gallery
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GalleryUpdate'
      responses:
        '200':
          description: The updated gallery.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Gallery'
        '400':
          $ref: '#/components/responses/Validation'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/RateLimited'
      tags:
      - Galleries
    delete:
      operationId: deleteGallery
      security:
      - bearerAuth:
        - files:write
      summary: Delete a gallery
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExpectedVersion'
      responses:
        '200':
          description: The gallery was deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteResult'
        '400':
          $ref: '#/components/responses/Validation'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/RateLimited'
      tags:
      - Galleries
  /v1/workspaces/{workspace}/galleries/{galleryId}/items:
    parameters:
    - $ref: '#/components/parameters/Workspace'
    - $ref: '#/components/parameters/GalleryId'
    post:
      operationId: addGalleryItem
      security:
      - bearerAuth:
        - files:write
      summary: Add an item
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GalleryItemCreate'
      responses:
        '200':
          description: The file was already a member; the existing item is returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GalleryItem'
        '201':
          description: The gallery item was created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GalleryItem'
        '400':
          $ref: '#/components/responses/Validation'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/RateLimited'
      tags:
      - Galleries
  /v1/workspaces/{workspace}/galleries/{galleryId}/items/order:
    parameters:
    - $ref: '#/components/parameters/Workspace'
    - $ref: '#/components/parameters/GalleryId'
    put:
      operationId: reorderGalleryItems
      security:
      - bearerAuth:
        - files:write
      summary: Reorder items
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GalleryOrder'
      responses:
        '200':
          description: Ordered items and whether the order was unchanged.
          content:
            application/json:
              schema:
                type: object
                required:
                - items
                - unchanged
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/GalleryItem'
                  unchanged:
                    type: boolean
        '400':
          $ref: '#/components/responses/Validation'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/RateLimited'
      tags:
      - Galleries
  /v1/workspaces/{workspace}/galleries/{galleryId}/items/{itemId}:
    parameters:
    - $ref: '#/components/parameters/Workspace'
    - $ref: '#/components/parameters/GalleryId'
    - name: itemId
      in: path
      required: true
      schema:
        type: string
    delete:
      operationId: removeGalleryItem
      security:
      - bearerAuth:
        - files:write
      summary: Remove an item
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExpectedVersion'
      responses:
        '200':
          description: The gallery membership was deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteResult'
        '400':
          $ref: '#/components/responses/Validation'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/RateLimited'
      tags:
      - Galleries
  /v1/workspaces/{workspace}/galleries/{galleryId}/external-references:
    parameters:
    - $ref: '#/components/parameters/Workspace'
    - $ref: '#/components/parameters/GalleryId'
    get:
      operationId: listGalleryReferences
      security:
      - bearerAuth:
        - files:read
      summary: List references
      responses:
        '200':
          description: Linked references.
          content:
            application/json:
              schema:
                type: object
                required:
                - references
                properties:
                  references:
                    type: array
                    items:
                      $ref: '#/components/schemas/ExternalReference'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
      tags:
      - Galleries
    post:
      operationId: addGalleryReference
      security:
      - bearerAuth:
        - files:write
      summary: Add a reference
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GalleryReferenceCreate'
      responses:
        '200':
          description: Already linked.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalReference'
        '201':
          description: Linked.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalReference'
        '400':
          $ref: '#/components/responses/Validation'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/RateLimited'
      tags:
      - Galleries
  /v1/workspaces/{workspace}/galleries/{galleryId}/external-references/{referenceId}:
    parameters:
    - $ref: '#/components/parameters/Workspace'
    - $ref: '#/components/parameters/GalleryId'
    - name: referenceId
      in: path
      required: true
      schema:
        type: string
    delete:
      operationId: removeGalleryReference
      security:
      - bearerAuth:
        - files:write
      summary: Remove a reference
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExpectedVersion'
      responses:
        '200':
          description: The external reference was deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteResult'
        '400':
          $ref: '#/components/responses/Validation'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/RateLimited'
      tags:
      - Galleries
components:
  schemas:
    Metadata:
      type: object
      additionalProperties:
        type: string
    GalleryItemCreate:
      allOf:
      - $ref: '#/components/schemas/ExpectedVersion'
      - type: object
        required:
        - objectKey
        properties:
          objectKey:
            type: string
          caption:
            type:
            - string
            - 'null'
          altText:
            type:
            - string
            - 'null'
    GalleryCreate:
      type: object
      required:
      - title
      properties:
        title:
          type: string
          minLength: 1
          maxLength: 120
        description:
          type:
          - string
          - 'null'
          maxLength: 2000
    ExternalReference:
      type: object
      required:
      - id
      - provider
      - resourceType
      - coordinate
      - canonicalUrl
      - createdAt
      properties:
        id:
          type: string
        provider:
          type: string
          enum:
          - github
        resourceType:
          type: string
        coordinate:
          type: string
          description: '`owner/repo#number`.'
        canonicalUrl:
          type:
          - string
          - 'null'
          format: uri
        createdAt:
          type: string
          format: date-time
    GalleryReferenceCreate:
      allOf:
      - $ref: '#/components/schemas/ExpectedVersion'
      - type: object
        required:
        - provider
        - coordinate
        properties:
          provider:
            type: string
          coordinate:
            type: string
    GalleryOrder:
      allOf:
      - $ref: '#/components/schemas/ExpectedVersion'
      - type: object
        required:
        - itemIds
        properties:
          itemIds:
            type: array
            items:
              type: string
    ExpectedVersion:
      type: object
      required:
      - expectedVersion
      properties:
        expectedVersion:
          type: integer
          minimum: 1
    GalleryItem:
      type: object
      required:
      - id
      - objectKey
      - position
      - caption
      - altText
      - createdAt
      - status
      - url
      - embedUrl
      - pageUrl
      - contentType
      - size
      - uploaded
      - modified
      properties:
        id:
          type: string
        objectKey:
          type: string
        position:
          type: integer
          minimum: 0
        caption:
          type:
          - string
          - 'null'
        altText:
          type:
          - string
          - 'null'
        createdAt:
          type: string
          format: date-time
        status:
          type: string
          enum:
          - available
          - missing
          - withheld
        url:
          type:
          - string
          - 'null'
          format: uri
        embedUrl:
          type:
          - string
          - 'null'
          format: uri
        pageUrl:
          type: string
          format: uri
        contentType:
          type:
          - string
          - 'null'
        size:
          type:
          - integer
          - 'null'
          minimum: 0
        uploaded:
          type:
          - string
          - 'null'
          format: date-time
        modified:
          type:
          - string
          - 'null'
          format: date-time
        posterUrl:
          type: string
          format: uri
        videoDimensions:
          $ref: '#/components/schemas/VideoDimensions'
        metadata:
          $ref: '#/components/schemas/Metadata'
    DeleteResult:
      type: object
      required:
      - deleted
      properties:
        id:
          type: string
        key:
          type: string
        deleted:
          const: true
      anyOf:
      - required:
        - id
      - required:
        - key
    VideoDimensions:
      type: object
      required:
      - width
      - height
      properties:
        width:
          type: integer
          minimum: 1
        height:
          type: integer
          minimum: 1
    GallerySummary:
      type: object
      required:
      - id
      - url
      - workspace
      - title
      - visibility
      - version
      properties:
        id:
          type: string
          pattern: ^gal_
        url:
          type: string
          format: uri
        workspace:
          type: string
        title:
          type: string
        description:
          type:
          - string
          - 'null'
        visibility:
          type: string
          enum:
          - public
        coverItemId:
          type:
          - string
          - 'null'
        version:
          type: integer
          minimum: 1
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        itemCount:
          type: integer
          minimum: 0
        references:
          type: array
          items:
            $ref: '#/components/schemas/ExternalReference'
        previewUrl:
          type:
          - string
          - 'null'
          format: uri
    Gallery:
      allOf:
      - $ref: '#/components/schemas/GallerySummary'
      - type: object
        required:
        - items
        properties:
          items:
            type: array
            items:
              $ref: '#/components/schemas/GalleryItem'
    ErrorEnvelope:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - type
          - message
          properties:
            code:
              type: string
            type:
              type: string
            message:
              type: string
            details: {}
    GalleryList:
      type: object
      required:
      - galleries
      - nextCursor
      properties:
        galleries:
          type: array
          items:
            $ref: '#/components/schemas/GallerySummary'
        nextCursor:
          type:
          - string
          - 'null'
    GalleryUpdate:
      allOf:
      - $ref: '#/components/schemas/ExpectedVersion'
      - type: object
        properties:
          title:
            type: string
            minLength: 1
            maxLength: 120
          description:
            type:
            - string
            - 'null'
            maxLength: 2000
          coverItemId:
            type:
            - string
            - 'null'
  parameters:
    Workspace:
      name: workspace
      in: path
      required: true
      schema:
        type: string
    GalleryLimit:
      name: limit
      in: query
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 50
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: A caller-scoped retry key retained for 24 hours. Use 1 to 255 visible ASCII characters.
      schema:
        type: string
        minLength: 1
        maxLength: 255
    Cursor:
      name: cursor
      in: query
      schema:
        type: string
      description: Opaque cursor returned by the previous page.
    GalleryId:
      name: galleryId
      in: path
      required: true
      schema:
        type: string
        pattern: ^gal_
  responses:
    Validation:
      description: Invalid request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Forbidden:
      description: The credential lacks the required scope or role.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Unauthorized:
      description: Missing or invalid credential.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    NotFound:
      description: The resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    RateLimited:
      description: The workspace rate limit or upload budget was exceeded.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Conflict:
      description: The request conflicts with current resource state.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Workspace token from `uploads login` or `/account/developers`. Canonical routes can also accept an uploads.sh browser session, but public API integrations should use a workspace token. Tokens carry named scopes `files:read`, `files:write`, and `files:delete`; each operation lists the required scope as a role name on this scheme. REST v1 does not accept OAuth access tokens (those are for the hosted MCP). Scope catalog: https://api.uploads.sh/.well-known/oauth-protected-resource'
    oauth2:
      type: oauth2
      description: 'Named permission scopes for workspace tokens (this API) and for OAuth 2.1 access tokens on the hosted MCP at https://agents.uploads.sh/mcp. REST v1 authenticates with `bearerAuth` only. Request the scopes listed on each operation. Discovery: https://uploads.sh/.well-known/oauth-authorization-server and https://api.uploads.sh/.well-known/oauth-protected-resource'
      flows:
        authorizationCode:
          authorizationUrl: https://uploads.sh/api/auth/oauth2/authorize
          tokenUrl: https://auth.uploads.sh/api/auth/oauth2/token
          scopes:
            files:read: List, search, read metadata, usage, galleries, and feeds.
            files:write: Upload, update metadata, galleries, feeds, and usage reconcile.
            files:delete: Delete stored objects and purge expired objects.
x-tagGroups:
- name: Core
  tags:
  - Files
  - Review
- name: Sharing
  tags:
  - Galleries
  - Live links
  - Public
- name: Workspace
  tags:
  - GitHub
  - Usage
  - Maintenance