Token Canopy Downloads API

The downloads API from Token Canopy, for downloads.

GitHub OpenAPI

Operations 1

POST /v0/drives/{drive_id}/download-capabilities Create Download Capability #

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/tokencanopy-com:tokencanopy-com-downloads-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

tokencanopy-com-downloads-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: AgentDrive Downloads API
  description: 'AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match.'
  version: 0.0.1
servers:
- url: https://drive.tokencanopy.com
  description: This deployment
- url: http://127.0.0.1:8000
  description: Local dev
tags:
- name: Downloads
paths:
  /v0/drives/{drive_id}/download-capabilities:
    post:
      tags:
      - Downloads
      summary: Create Download Capability
      description: 'Mint one fresh, generation-pinned signed GET target for the current

        artifact head or one owned version. 200 only; every call reauthorizes

        and re-mints.


        Strict JSON body (charset utf-8): unknown/duplicate fields, unknown discriminators, and malformed ids are 400 INVALID_REQUEST. Idempotency-Key is FORBIDDEN on this operation (manifest idempotency_class: forbidden): a supplied key is rejected with 400 INVALID_REQUEST and no idempotency record is created — every request reauthorizes and mints a fresh signed target. The signed URL is a bearer capability after disclosure: it is bucket/object-, generation-, method-, semantic-query-, and expiry-bound only (no one-time-use or audience enforcement).'
      operationId: download_capabilities_create
      parameters:
      - name: drive_id
        in: path
        required: true
        schema:
          type: string
          title: Drive Id
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
        deprecated: true
        description: 'Deprecated: redundant with the operation''s `bearerAuth` security requirement, which is how a generated client should learn to authenticate. Scheduled for removal.'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DownloadCapabilityOut'
          headers:
            Cache-Control:
              description: Always no-store.
              schema:
                type: string
            Referrer-Policy:
              description: Always no-referrer.
              schema:
                type: string
            X-Content-Type-Options:
              description: Always nosniff — governs THIS JSON response only, never the later GCS response.
              schema:
                type: string
            X-Request-Id:
              description: Request correlation identifier.
              schema:
                type: string
        '404':
          description: The parent or target resource was not found or is not visible.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V0ErrorEnvelope'
          headers:
            X-Request-Id:
              description: Request correlation identifier.
              schema:
                type: string
        '406':
          description: Accept does not admit application/json (NOT_ACCEPTABLE).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V0ErrorEnvelope'
          headers:
            X-Request-Id:
              description: Request correlation identifier.
              schema:
                type: string
        '415':
          description: The mint body must be application/json (UNSUPPORTED_MEDIA_TYPE).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V0ErrorEnvelope'
          headers:
            X-Request-Id:
              description: Request correlation identifier.
              schema:
                type: string
        '503':
          description: Direct transfer is not fully configured/enabled (TRANSFER_DISABLED) or the direct download signer/configuration is unavailable (DOWNLOAD_SIGNING_UNAVAILABLE) — fail closed, no redirect/stream/viewer fallback, and no retry hint of their own (B8 owns retry policy). Retry-After appears only on the generic auth-unavailability 503.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V0ErrorEnvelope'
          headers:
            X-Request-Id:
              description: Request correlation identifier.
              schema:
                type: string
            Retry-After:
              description: Seconds until the caller should retry.
              schema:
                type: integer
                minimum: 0
        '401':
          description: Missing or invalid bearer token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V0ErrorEnvelope'
          headers:
            X-Request-Id:
              description: Request correlation identifier.
              schema:
                type: string
            WWW-Authenticate:
              description: RFC 6750 bearer authentication challenge.
              schema:
                type: string
        '403':
          description: Token lacks a required scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V0ErrorEnvelope'
          headers:
            X-Request-Id:
              description: Request correlation identifier.
              schema:
                type: string
        '429':
          description: Rate limited.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V0ErrorEnvelope'
          headers:
            X-Request-Id:
              description: Request correlation identifier.
              schema:
                type: string
            Retry-After:
              description: Seconds until the caller should retry.
              schema:
                type: integer
                minimum: 0
        '400':
          description: Malformed request (invalid query parameter, cursor, or argument).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V0ErrorEnvelope'
          headers:
            X-Request-Id:
              description: Request correlation identifier.
              schema:
                type: string
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
              - target
              properties:
                target:
                  description: Exactly one download-target union member.
                  oneOf:
                  - type: object
                    additionalProperties: false
                    required:
                    - kind
                    - artifact_id
                    properties:
                      kind:
                        type: string
                        enum:
                        - artifact
                      artifact_id:
                        type: string
                        pattern: ^art_[a-f0-9]{16}$
                  - type: object
                    additionalProperties: false
                    required:
                    - kind
                    - artifact_id
                    - version_id
                    properties:
                      kind:
                        type: string
                        enum:
                        - version
                      artifact_id:
                        type: string
                        pattern: ^art_[a-f0-9]{16}$
                      version_id:
                        type: string
                        pattern: ^ver_[a-f0-9]{16}$
      x-required-scopes:
      - content:read
      x-stability-level: beta
components:
  schemas:
    V0ErrorEnvelope:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
              description: Stable machine-readable error code (see the error-catalog).
              enum:
              - ARTIFACT_NOT_FOUND
              - ARTIFACT_PATH_CONFLICT
              - ARTIFACT_TOO_LARGE
              - AUTHENTICATION_REQUIRED
              - AUTH_UNAVAILABLE
              - BAD_REQUEST
              - BANDWIDTH_LIMIT_EXCEEDED
              - CHANGE_CURSOR_EXPIRED
              - CHECKSUM_MISMATCH
              - CONFLICT
              - DOWNLOAD_SIGNING_UNAVAILABLE
              - DRIVE_LIMIT_EXCEEDED
              - DRIVE_NOT_FOUND
              - FOLDER_NOT_FOUND
              - FOLDER_PATH_CONFLICT
              - FOLDER_RECURSIVE_REQUIRED
              - GRANT_CONFLICT
              - GRANT_NOT_FOUND
              - GRANT_PERMANENT
              - IDEMPOTENCY_CONFLICT
              - IDEMPOTENCY_IN_PROGRESS
              - IDEMPOTENCY_KEY_REQUIRED
              - INTERNAL_ERROR
              - INVALID_ARGUMENT
              - INVALID_CURSOR
              - INVALID_PARAMETER
              - INVALID_QUERY
              - INVALID_REQUEST
              - METHOD_NOT_ALLOWED
              - NAME_CONFLICT
              - NOT_ACCEPTABLE
              - NOT_AUTHORIZED
              - NOT_FOUND
              - OBJECT_METADATA_MISMATCH
              - OBJECT_SIZE_MISMATCH
              - PAYLOAD_TOO_LARGE
              - PERMISSION_DENIED
              - PRECONDITION_FAILED
              - PRECONDITION_REQUIRED
              - RATE_LIMITED
              - SEARCH_MODE_UNAVAILABLE
              - SHARE_NOT_FOUND
              - SHEET_EDIT_LIMIT_EXCEEDED
              - SHEET_NOT_FOUND
              - SHEET_SESSION_ALREADY_COMPLETED
              - SHEET_SESSION_EXPIRED
              - SHEET_SESSION_NOT_FOUND
              - SUBTREE_TOO_LARGE
              - TRANSFER_DISABLED
              - TRANSFER_LIMIT_EXCEEDED
              - TRANSFER_UNAVAILABLE
              - UNSUPPORTED_MEDIA_TYPE
              - UPLOAD_ALREADY_COMPLETED
              - UPLOAD_BUSY
              - UPLOAD_EXPIRED
              - UPLOAD_INCOMPLETE
              - UPLOAD_NOT_COMPLETABLE
              - VALIDATION_ERROR
              - VERSION_NOT_FOUND
              - VIEWER_DISABLED
              - VIEWER_SESSION_NOT_FOUND
              - WORKBOOK_NOT_EDITABLE
              - WORKBOOK_TOO_LARGE
              - WORKBOOK_UNPARSEABLE
            message:
              type: string
            details:
              type: object
              description: Error-code-specific context (optional).
          additionalProperties: true
    DownloadOut:
      properties:
        artifact_id:
          type: string
          pattern: ^art_[a-f0-9]{16}$
          title: Artifact Id
        version_id:
          type: string
          pattern: ^ver_[a-f0-9]{16}$
          title: Version Id
        expires_at:
          type: string
          format: date-time
          title: Expires At
        target:
          $ref: '#/components/schemas/DownloadTargetOut'
      additionalProperties: false
      type: object
      required:
      - artifact_id
      - version_id
      - expires_at
      - target
      title: DownloadOut
    DownloadTargetOut:
      properties:
        url:
          type: string
          title: Url
        method:
          type: string
          const: GET
          title: Method
        required_headers:
          additionalProperties: false
          type: object
          maxProperties: 0
          title: Required Headers
        content_disposition:
          type: string
          title: Content Disposition
      additionalProperties: false
      type: object
      required:
      - url
      - method
      - required_headers
      - content_disposition
      title: DownloadTargetOut
      description: 'The one signed, generation-pinned direct GET target (B3 §5.7).

        Secret material: present only in the fresh mint response, never in any

        stored record, replay, or log. CLOSED schema on purpose: Packet 5 and

        generated clients must not learn a broader security-sensitive target

        contract than the wire actually carries.'
    DownloadCapabilityOut:
      properties:
        download:
          $ref: '#/components/schemas/DownloadOut'
      additionalProperties: false
      type: object
      required:
      - download
      title: DownloadCapabilityOut
      description: 'The §5.7 mint response — a capability computation, not a stored

        resource: 200 only, freshly signed on every call.'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Hub-issued bearer token. Scopes: drives:*, content:*, sharing:*, changes:read, usage:read. See the OAuth-protected-resource discovery document (RFC 9728).'
x-agentdrive-compatibility-policy: 2