Bespoke Labs Viewer API

The Viewer API from Bespoke Labs — 4 operation(s) for viewer.

Operations 4

POST /v0/viewer/sessions Create Session #
PUT /v0/viewer/sessions/{session_id} Update Session #
POST /v0/viewer/sessions/{session_id}/responses/{idx} Stream Response #
GET /v0/viewer/sessions/{session_id}/fetch_data Fetch Dataset #

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/bespoke-labs:bespoke-labs-viewer-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

bespoke-labs-viewer-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Bespoke Labs Viewer API
  version: 0.0.2
tags:
- name: Viewer
paths:
  /v0/viewer/sessions:
    post:
      summary: Create Session
      description: Create a new session and store metadata
      operationId: create_session_v0_viewer_sessions_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionMetadata'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - BearerAuthorization: []
      - LegacyApiKey: []
      tags:
      - Viewer
  /v0/viewer/sessions/{session_id}:
    put:
      summary: Update Session
      operationId: update_session_v0_viewer_sessions__session_id__put
      security:
      - BearerAuthorization: []
      - LegacyApiKey: []
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          title: Session Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionMetadataUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Viewer
  /v0/viewer/sessions/{session_id}/responses/{idx}:
    post:
      summary: Stream Response
      operationId: stream_response_v0_viewer_sessions__session_id__responses__idx__post
      security:
      - BearerAuthorization: []
      - LegacyApiKey: []
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          title: Session Id
      - name: idx
        in: path
        required: true
        schema:
          type: integer
          maximum: 9223372036854775807
          minimum: 0
          title: Idx
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StreamRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Viewer
  /v0/viewer/sessions/{session_id}/fetch_data:
    get:
      summary: Fetch Dataset
      operationId: fetch_dataset_v0_viewer_sessions__session_id__fetch_data_get
      security:
      - BearerAuthorization: []
      - LegacyApiKey: []
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          title: Session Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Viewer
components:
  schemas:
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    StreamRequest:
      properties:
        response_data:
          type: string
          title: Response Data
      type: object
      required:
      - response_data
      title: StreamRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SessionMetadata:
      properties:
        run_hash:
          type: string
          title: Run Hash
        dataset_hash:
          type: string
          title: Dataset Hash
        prompt_func:
          type: string
          title: Prompt Func
        model_name:
          type: string
          title: Model Name
        response_format:
          type: string
          title: Response Format
        batch_mode:
          type: boolean
          title: Batch Mode
        status:
          type: string
          title: Status
        hf_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Hf Id
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        total_cost_milli_dollars:
          anyOf:
          - type: number
            exclusiveMaximum: 9.223372036854776e+18
            minimum: 0.0
          - type: 'null'
          title: Total Cost Milli Dollars
        total_output_tokens:
          anyOf:
          - type: integer
            maximum: 9.223372036854776e+18
            minimum: 0.0
          - type: 'null'
          title: Total Output Tokens
        total_input_tokens:
          anyOf:
          - type: integer
            maximum: 9.223372036854776e+18
            minimum: 0.0
          - type: 'null'
          title: Total Input Tokens
        total_requests:
          anyOf:
          - type: integer
            maximum: 9.223372036854776e+18
            minimum: 0.0
          - type: 'null'
          title: Total Requests
        default_app_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Default App Id
      type: object
      required:
      - run_hash
      - dataset_hash
      - prompt_func
      - model_name
      - response_format
      - batch_mode
      - status
      title: SessionMetadata
    SessionMetadataUpdate:
      properties:
        run_hash:
          anyOf:
          - type: string
          - type: 'null'
          title: Run Hash
        dataset_hash:
          anyOf:
          - type: string
          - type: 'null'
          title: Dataset Hash
        prompt_func:
          anyOf:
          - type: string
          - type: 'null'
          title: Prompt Func
        model_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Model Name
        response_format:
          anyOf:
          - type: string
          - type: 'null'
          title: Response Format
        batch_mode:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Batch Mode
        status:
          anyOf:
          - type: string
          - type: 'null'
          title: Status
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        total_cost_milli_dollars:
          anyOf:
          - type: number
            exclusiveMaximum: 9.223372036854776e+18
            minimum: 0.0
          - type: 'null'
          title: Total Cost Milli Dollars
        total_output_tokens:
          anyOf:
          - type: integer
            maximum: 9.223372036854776e+18
            minimum: 0.0
          - type: 'null'
          title: Total Output Tokens
        total_input_tokens:
          anyOf:
          - type: integer
            maximum: 9.223372036854776e+18
            minimum: 0.0
          - type: 'null'
          title: Total Input Tokens
        total_requests:
          anyOf:
          - type: integer
            maximum: 9.223372036854776e+18
            minimum: 0.0
          - type: 'null'
          title: Total Requests
        default_app_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Default App Id
      type: object
      title: SessionMetadataUpdate
  securitySchemes:
    BearerAuthorization:
      type: apiKey
      in: header
      name: Authorization
    LegacyApiKey:
      type: apiKey
      in: header
      name: api_key
x-provenance:
  method: harvested
  publisher: Bespoke Labs
  source: https://api.bespokelabs.ai/openapi.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)