ThoughtBox Documents API

The documents API from ThoughtBox — 4 operation(s) for documents.

GitHub OpenAPI

Operations 4

POST /api/documents/extract-text Extract Text Endpoint #
POST /api/documents/extract-rows Extract Rows Endpoint #
POST /api/documents/extract-with-ai Extract With Ai Endpoint #
POST /api/documents/fetch-url Fetch Url Endpoint #

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-documents-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-documents-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: ThoughtBox Documents API
  description: Document proxy and AI chat platform with MCP support
  version: 0.1.0
tags:
- name: Documents
paths:
  /api/documents/extract-text:
    post:
      tags:
      - Documents
      summary: Extract Text Endpoint
      operationId: extract_text_endpoint_api_documents_extract_text_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExtractTextRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtractTextResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/documents/extract-rows:
    post:
      tags:
      - Documents
      summary: Extract Rows Endpoint
      description: 'Bytes-in, deterministic structured-rows-out — mpcentral#723''s

        platform-generic sibling to extract_text_endpoint above. Exists for a

        caller that wants real cell values (not a flattened markdown blob) to

        build a result deterministically instead of asking a model to re-type

        every row, which doesn''t scale past a model''s output-token ceiling.


        A sibling endpoint rather than adding a field to ExtractTextResponse:

        keeps that endpoint''s existing contract/callers stable, and gives this

        capability (raw structured cell data, not text) its own single-purpose

        name and response shape.'
      operationId: extract_rows_endpoint_api_documents_extract_rows_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExtractRowsRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtractRowsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/documents/extract-with-ai:
    post:
      tags:
      - Documents
      summary: Extract With Ai Endpoint
      description: 'Bytes-in, AI-completion-out, no end-user session — the async-job

        counterpart to extract_text_endpoint above, for a caller (mpcentral#998''s

        extraction-job worker) that wants the same single-round completion

        `/api/chat/completions` (tools_enabled=False) already does for the upload

        wizard, but from a Lambda with no live Cognito token and no reason to

        resolve a User at all: the document bytes are given directly, not looked

        up by file_id/provider, so there''s no per-user storage boundary

        (thoughtbox#170) to cross in the first place.


        Provider/model/key come from the tenant''s own governed AI task config

        (get_task_provider_config), the same "extraction" task

        useAiReadinessGate("extraction") already gates the wizard UI on — no

        per-user BYOK fallback, since a caller with no resolved user has no

        personal credential to fall back to anyway.'
      operationId: extract_with_ai_endpoint_api_documents_extract_with_ai_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExtractWithAiRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtractWithAiResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/documents/fetch-url:
    post:
      tags:
      - Documents
      summary: Fetch Url Endpoint
      description: 'A web address as a document snapshot (thoughtbox#281), for a caller

        that keeps documents and is handed terms, policies or docs by URL. A

        failure answers with detail {code, message}: code is one of

        fetch_document''s constants, message is plain enough to show a user.'
      operationId: fetch_url_endpoint_api_documents_fetch_url_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FetchUrlRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FetchUrlResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ExtractRowsRequest:
      properties:
        filename:
          type: string
          title: Filename
        content_base64:
          type: string
          maxLength: 100663296
          title: Content Base64
      type: object
      required:
      - filename
      - content_base64
      title: ExtractRowsRequest
    ExtractRowsResponse:
      properties:
        rows:
          anyOf:
          - items:
              items:
                type: string
              type: array
            type: array
          - type: 'null'
          title: Rows
        extracted_text:
          anyOf:
          - type: string
          - type: 'null'
          title: Extracted Text
        extractable:
          type: boolean
          title: Extractable
      type: object
      required:
      - rows
      - extracted_text
      - extractable
      title: ExtractRowsResponse
    FetchUrlRequest:
      properties:
        url:
          type: string
          maxLength: 2048
          title: Url
      type: object
      required:
      - url
      title: FetchUrlRequest
    ExtractTextRequest:
      properties:
        filename:
          type: string
          title: Filename
        content_base64:
          type: string
          maxLength: 100663296
          title: Content Base64
        skip_tables:
          type: boolean
          title: Skip Tables
          default: false
      type: object
      required:
      - filename
      - content_base64
      title: ExtractTextRequest
    ExtractWithAiRequest:
      properties:
        filename:
          type: string
          title: Filename
        content_base64:
          type: string
          maxLength: 100663296
          title: Content Base64
        prompt:
          type: string
          title: Prompt
        task:
          type: string
          title: Task
          default: extraction
        raw_text:
          type: boolean
          title: Raw Text
          default: false
        skip_tables:
          type: boolean
          title: Skip Tables
          default: false
      type: object
      required:
      - filename
      - content_base64
      - prompt
      title: ExtractWithAiRequest
    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
    ExtractTextResponse:
      properties:
        extracted_text:
          anyOf:
          - type: string
          - type: 'null'
          title: Extracted Text
        extractable:
          type: boolean
          title: Extractable
      type: object
      required:
      - extracted_text
      - extractable
      title: ExtractTextResponse
    FetchUrlResponse:
      properties:
        url:
          type: string
          title: Url
        final_url:
          type: string
          title: Final Url
        fetched_at:
          type: string
          title: Fetched At
        content_type:
          type: string
          title: Content Type
        content_base64:
          type: string
          title: Content Base64
        sha256:
          type: string
          title: Sha256
        text_sha256:
          type: string
          title: Text Sha256
        extracted_text:
          type: string
          title: Extracted Text
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
        last_updated:
          anyOf:
          - type: string
          - type: 'null'
          title: Last Updated
      type: object
      required:
      - url
      - final_url
      - fetched_at
      - content_type
      - content_base64
      - sha256
      - text_sha256
      - extracted_text
      title: FetchUrlResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ExtractWithAiResponse:
      properties:
        content:
          type: string
          title: Content
        extracted_text:
          anyOf:
          - type: string
          - type: 'null'
          title: Extracted Text
      type: object
      required:
      - content
      title: ExtractWithAiResponse
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer