Primate Intelligence Client Tokens API

The client_tokens API from Primate Intelligence — 1 operation(s) for client_tokens.

GitHub OpenAPI

Operations 1

POST /v1/client_tokens Mint an ephemeral browser-safe client token (pvct_) #

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/primateintelligence-ai:primateintelligence-ai-client-tokens-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

primateintelligence-ai-client-tokens-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Primate Vision Client Tokens API
  version: 1.0.0-alpha
  description: Public API v1 for Primate Vision — video understanding for the agentic web. P1 (PRI-430) publishes resource schemas; endpoints ship from P3 onward.
  contact:
    email: support@primateintelligence.ai
servers:
- url: https://api.primateintelligence.ai
  description: Production
- url: https://dev-api.primateintelligence.ai
  description: Development
tags:
- name: client_tokens
paths:
  /v1/client_tokens:
    post:
      summary: Mint an ephemeral browser-safe client token (pvct_)
      tags:
      - client_tokens
      description: 'Server-side token exchange (§4.9): authenticate with a secret key (or first-party session), receive a short-lived scoped pvct_ bearer for the browser. The browser then calls Primate directly — your secret key never leaves your server. Tokens are revoked implicitly when the minting key is revoked (≤5s). Rate class: 120/min per key. Client tokens can never mint tokens.'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateClientTokenRequest'
      responses:
        '201':
          description: Token minted. The raw token appears only in this response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientToken'
        '400':
          description: validation_failed — scopes/ttl_s/binding violations, all listed at once.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '403':
          description: insufficient_scope — requested scopes exceed the minting key’s, or the caller is itself a client token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: resource_not_found — video_id binding does not resolve to an owned video.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: rate_limit_exceeded — client_tokens.create is 120/min per key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      operationId: postV1ClientTokens
      x-operation-id-source: derived
components:
  schemas:
    ErrorObject:
      type:
      - object
      - 'null'
      properties:
        code:
          type: string
          example: video_unreadable
        message:
          type: string
      required:
      - code
      - message
    ErrorEnvelope:
      type: object
      properties:
        error:
          allOf:
          - $ref: '#/components/schemas/ErrorObject'
          - type: object
            properties:
              status:
                type: integer
            required:
            - status
      required:
      - error
    ClientToken:
      type: object
      properties:
        object:
          type: string
          enum:
          - client_token
        id:
          type: string
        token:
          type: string
          description: '256-bit CSPRNG bearer, SHA-256 at rest — shown exactly once. Browser-safe: accepted on product-plane endpoints (CORS *).'
          example: pvct_…
        scopes:
          type: array
          items:
            type: string
        expires_at:
          type: string
        video_id:
          type: string
          pattern: ^video_[0-9A-HJKMNP-TV-Z]{26}$
          description: Video resource id (prefixed ULID). Immutable.
          example: video_01KX12XX3BNM688AWHX7406HCF
        stream_id:
          type: string
      required:
      - object
      - id
      - token
      - scopes
      - expires_at
    CreateClientTokenRequest:
      type: object
      properties:
        scopes:
          type: array
          items:
            type: string
            enum:
            - videos:write
            - analyses:read
            - analyses:write
            - streams:create
            - streams:signal
          minItems: 1
          description: Non-empty subset of the §4.9 scope set. Must also be a subset of the minting key’s scopes.
        ttl_s:
          type: integer
          minimum: 60
          maximum: 900
          default: 900
          description: Token lifetime in seconds (60–900, default 900). Tokens are never refreshable — mint a new one.
        video_id:
          type: string
          pattern: ^video_[0-9A-HJKMNP-TV-Z]{26}$
          description: 'Optional resource binding: narrows the token to this one video. Mutually exclusive with stream_id.'
          example: video_01KX12XX3BNM688AWHX7406HCF
        stream_id:
          type: string
          description: Optional resource binding to one stream (WS acceptance ships P6).
      required:
      - scopes
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key (pv_live_… / pv_test_…). Clerk session JWTs are accepted on the same endpoints for first-party clients.