ThoughtBox Chat API

The chat-api API from ThoughtBox — 5 operation(s) for chat-api.

GitHub OpenAPI

Operations 6

POST /api/v1/sessions Create Session #
GET /api/v1/sessions/{session_id} Get Session #
GET /api/v1/sessions/{session_id}/messages List Session Messages #
POST /api/v1/sessions/{session_id}/messages Post Message #
GET /api/v1/turns/{turn_id} Get Turn #
POST /api/v1/actions/{action_id}/decision Decide Action #

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/thoughtbox-ai:thoughtbox-ai-chat-api-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

thoughtbox-ai-chat-api-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: ThoughtBox Chat API
  description: Document proxy and AI chat platform with MCP support
  version: 0.1.0
tags:
- name: chat-api
paths:
  /api/v1/sessions:
    post:
      tags:
      - chat-api
      summary: Create Session
      description: 'Create a session, or return the existing one for `external_ref`.

        201 when created, 200 when an existing session is returned.'
      operationId: create_session_api_v1_sessions_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSessionRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /api/v1/sessions/{session_id}:
    get:
      tags:
      - chat-api
      summary: Get Session
      operationId: get_session_api_v1_sessions__session_id__get
      security:
      - HTTPBearer: []
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Session Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/sessions/{session_id}/messages:
    get:
      tags:
      - chat-api
      summary: List Session Messages
      operationId: list_session_messages_api_v1_sessions__session_id__messages_get
      security:
      - HTTPBearer: []
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Session Id
      - name: after
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          description: Return only messages after this message ID
          title: After
        description: Return only messages after this message ID
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 500
          minimum: 1
          default: 100
          title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - chat-api
      summary: Post Message
      description: 'Send a message and run a turn. The user''s message and every reply

        are saved on the server, so the conversation also shows in the web UI.


        Returns the turn as JSON; as server-sent events when `stream` is true

        (the usual chat events, then one `message` event per saved reply, then

        `done`); or, when `background` is true, 202 with a turn ID to poll.


        In a panel session every advisor answers; the reply list has one

        message per advisor, and streamed events carry `advisor_id`.'
      operationId: post_message_api_v1_sessions__session_id__messages_post
      security:
      - HTTPBearer: []
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Session Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostMessageRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/turns/{turn_id}:
    get:
      tags:
      - chat-api
      summary: Get Turn
      description: A background turn's status, and its replies once it has finished.
      operationId: get_turn_api_v1_turns__turn_id__get
      security:
      - HTTPBearer: []
      parameters:
      - name: turn_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Turn Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/actions/{action_id}/decision:
    post:
      tags:
      - chat-api
      summary: Decide Action
      description: 'thoughtbox#337: Allow or Deny on a write a turn is waiting on, as shown

        in its `approval` event or in GET /turns/{id}''s pending_actions. Only the

        caller that sent the message answers: the same key, or the user signed

        in. A key needs Approve actions turned on, checked again here, so turning

        it off stops a card already waiting. waiting=false: nothing changed (not

        this caller''s, already answered, or no longer waiting).'
      operationId: decide_action_api_v1_actions__action_id__decision_post
      security:
      - HTTPBearer: []
      parameters:
      - name: action_id
        in: path
        required: true
        schema:
          type: string
          title: Action Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/app__routers__chat_api__ActionDecision'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    app__routers__chat_api__ActionDecision:
      properties:
        allow:
          type: boolean
          title: Allow
      type: object
      required:
      - allow
      title: ActionDecision
    PostMessageRequest:
      properties:
        content:
          type: string
          maxLength: 100000
          minLength: 1
          title: Content
        client_message_id:
          type: string
          maxLength: 200
          minLength: 1
          title: Client Message Id
        stream:
          type: boolean
          title: Stream
          default: false
        background:
          type: boolean
          title: Background
          default: false
      type: object
      required:
      - content
      - client_message_id
      title: PostMessageRequest
    CreateSessionRequest:
      properties:
        title:
          type: string
          maxLength: 500
          title: Title
          default: New conversation
        provider:
          type: string
          maxLength: 50
          title: Provider
          default: ''
        model:
          type: string
          maxLength: 100
          title: Model
          default: ''
        panel_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Panel Id
        external_ref:
          anyOf:
          - type: string
            maxLength: 200
            minLength: 1
          - type: 'null'
          title: External Ref
      type: object
      title: CreateSessionRequest
    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
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer