ThoughtBox Chat API

The chat API from ThoughtBox — 8 operation(s) for chat.

GitHub OpenAPI

Operations 8

GET /api/chat/models List Models #
POST /api/chat/resume/{request_id} Resume Approval #
POST /api/chat/completions Chat Completions #
GET /api/chat/turns/{turn_id} Web Turn Status #
POST /api/chat/turns/{turn_id}/stop Stop Web Turn #
POST /api/chat/actions/{action_id}/decision Decide Action #
POST /api/chat/internal/slack-completion Internal Slack Completion #
POST /api/chat/panel-completions Panel Chat Completions #

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"
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-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
paths:
  /api/chat/models:
    get:
      tags:
      - Chat
      summary: List Models
      description: Return models the user can access for each connected AI provider.
      operationId: list_models_api_chat_models_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
  /api/chat/resume/{request_id}:
    post:
      tags:
      - Chat
      summary: Resume Approval
      operationId: resume_approval_api_chat_resume__request_id__post
      security:
      - HTTPBearer: []
      parameters:
      - name: request_id
        in: path
        required: true
        schema:
          type: string
          title: Request Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResumeApprovalRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/chat/completions:
    post:
      tags:
      - Chat
      summary: Chat Completions
      description: Proxy a chat completion request using the user's own API key.
      operationId: chat_completions_api_chat_completions_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatRequest'
        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/chat/turns/{turn_id}:
    get:
      tags:
      - Chat
      summary: Web Turn Status
      description: 'thoughtbox#436: how a web chat turn went, for a page that lost its stream.'
      operationId: web_turn_status_api_chat_turns__turn_id__get
      security:
      - HTTPBearer: []
      parameters:
      - name: turn_id
        in: path
        required: true
        schema:
          type: string
          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/chat/turns/{turn_id}/stop:
    post:
      tags:
      - Chat
      summary: Stop Web Turn
      description: 'The Stop button: end a web chat turn the page is no longer streaming.'
      operationId: stop_web_turn_api_chat_turns__turn_id__stop_post
      security:
      - HTTPBearer: []
      parameters:
      - name: turn_id
        in: path
        required: true
        schema:
          type: string
          title: Turn Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/chat/actions/{action_id}/decision:
    post:
      tags:
      - Chat
      summary: Decide Action
      description: 'thoughtbox#337: Allow or Deny on a held tool call. waiting=false: it

        wasn''t this user''s, was already answered, or stopped waiting, and

        nothing changed.'
      operationId: decide_action_api_chat_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__ActionDecision'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/chat/internal/slack-completion:
    post:
      tags:
      - Chat
      summary: Internal Slack Completion
      description: 'Companion to mpcentral#934''s Events webhook Lambda: resolve the

        Slack-originated identity, run the same tool-calling completion loop

        the web Assistant tab uses (run_chat_completion), and persist the turn

        to Conversation/ChatMessage keyed by the external thread -- the only

        caller of those tables from the completion path today (thoughtbox#186);

        chat_completions itself is otherwise stateless per-call.'
      operationId: internal_slack_completion_api_chat_internal_slack_completion_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InternalCompletionRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/chat/panel-completions:
    post:
      tags:
      - Chat
      summary: Panel Chat Completions
      description: 'thoughtbox#206 — fan one user message out to N configured advisors

        concurrently; every advisor sees the same full shared history (no

        per-advisor filtering), and every advisor''s tokens stream to the client

        as they''re generated, tagged by advisor, over one multiplexed stream.'
      operationId: panel_chat_completions_api_chat_panel_completions_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PanelCompletionRequest'
        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: []
components:
  schemas:
    InternalCompletionRequest:
      properties:
        mpc_tenant_id:
          type: string
          title: Mpc Tenant Id
        slack_team_id:
          type: string
          title: Slack Team Id
        slack_user_id:
          type: string
          title: Slack User Id
        thread_key:
          type: string
          title: Thread Key
        text:
          type: string
          title: Text
        shows_cards:
          type: boolean
          title: Shows Cards
          default: false
      type: object
      required:
      - mpc_tenant_id
      - slack_team_id
      - slack_user_id
      - thread_key
      - text
      title: InternalCompletionRequest
      description: 'thoughtbox#186: a resolved-identity completion request from a trusted

        internal caller (mpcentral''s Slack Lambda today) -- no Cognito session,

        trust is the shared secret this route checks instead. mpc_tenant_id/

        slack_team_id/slack_user_id together resolve to a User via

        resolve_slack_identity (per-user link if one exists, else the

        workspace''s tenant-default); thread_key scopes conversation continuity

        to one external thread, composed server-side in the handler below, not

        trusted as pre-composed from the caller.'
    PanelCompletionRequest:
      properties:
        messages:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Messages
        advisor_ids:
          items:
            type: string
          type: array
          title: Advisor Ids
        tools_enabled:
          type: boolean
          title: Tools Enabled
          default: true
        time_zone:
          anyOf:
          - type: string
          - type: 'null'
          title: Time Zone
        brief_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Brief Id
        conversation_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Conversation Id
        hands_free:
          type: boolean
          title: Hands Free
          default: false
        open_space:
          anyOf:
          - type: string
          - type: 'null'
          title: Open Space
      type: object
      required:
      - messages
      - advisor_ids
      title: PanelCompletionRequest
      description: 'Same client-resends-full-history shape as ChatRequest (thoughtbox#186''s

        "chat_completions is otherwise stateless per-call" applies here too —

        persistence is the frontend''s job via POST .../messages, same as today''s

        single-model chat, just called once per advisor after their stream ends

        instead of once). advisor_ids selects who''s in the panel for this turn;

        provider/model come from each Advisor row, not this request.'
    ResumeApprovalRequest:
      properties:
        slip_id:
          anyOf:
          - type: string
            maxLength: 128
            minLength: 1
          - type: 'null'
          title: Slip Id
        error:
          anyOf:
          - type: string
            maxLength: 64
            minLength: 1
          - type: 'null'
          title: Error
        message:
          anyOf:
          - type: string
            maxLength: 2000
          - type: 'null'
          title: Message
      type: object
      title: ResumeApprovalRequest
    app__routers__chat__ActionDecision:
      properties:
        allow:
          type: boolean
          title: Allow
        plan:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Plan
        only_reads:
          type: boolean
          title: Only Reads
          default: false
      type: object
      required:
      - allow
      title: ActionDecision
    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
    ChatRequest:
      properties:
        provider:
          type: string
          title: Provider
        model:
          type: string
          title: Model
        messages:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Messages
        stream:
          type: boolean
          title: Stream
          default: true
        tools_enabled:
          type: boolean
          title: Tools Enabled
          default: true
        file_id:
          anyOf:
          - type: string
          - type: 'null'
          title: File Id
        file_name:
          anyOf:
          - type: string
          - type: 'null'
          title: File Name
        file_provider:
          anyOf:
          - type: string
          - type: 'null'
          title: File Provider
        return_extracted_text:
          type: boolean
          title: Return Extracted Text
          default: false
        task:
          anyOf:
          - type: string
          - type: 'null'
          title: Task
        time_zone:
          anyOf:
          - type: string
          - type: 'null'
          title: Time Zone
        brief_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Brief Id
        conversation_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Conversation Id
        user_message_id:
          anyOf:
          - type: string
          - type: 'null'
          title: User Message Id
        hands_free:
          type: boolean
          title: Hands Free
          default: false
        open_space:
          anyOf:
          - type: string
          - type: 'null'
          title: Open Space
      type: object
      required:
      - provider
      - model
      - messages
      title: ChatRequest
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer