Polycode Chat API

The Chat API from Polycode — 3 operation(s) for chat.

Operations 3

POST /api/chat Async one-turn chat: returns 202 + a task id; poll /api/chat/result. #
POST /api/v1/chat/completions OpenAI-shaped MECHANICAL completion shim: { messages } → grammar Formulate →… #
GET /api/chat/result Poll an async chat task: working | completed (with reply) | failed #

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/polycode-co-uk:polycode-co-uk-chat-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

polycode-co-uk-chat-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: marginalia public Chat API
  version: 0.1.7
  description: Public read + chat API for marginalia (https://marginalia.polycode.co.uk). No auth today; the API is public. Generated from route-descriptors.mjs.
  license:
    name: AGPL-3.0-only
servers:
- url: https://marginalia.polycode.co.uk
  description: production
- url: https://ci-{slug}.marginalia.polycode.co.uk
  description: CI branch
  variables:
    slug:
      default: main
tags:
- name: Chat
paths:
  /api/chat:
    post:
      operationId: postChat
      summary: 'Async one-turn chat: returns 202 + a task id; poll /api/chat/result.'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Bad request
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - userMessage
              properties:
                graphId:
                  type: string
                  description: Target graph id; omit for the default graph.
                sessionUuid:
                  type: string
                userMessage:
                  type: string
                volatile:
                  type: boolean
                  default: false
                visitorId:
                  type: string
                  description: Optional pseudonymous visitor id.
      tags:
      - Chat
  /api/v1/chat/completions:
    post:
      operationId: postMechanicalCompletion
      summary: 'OpenAI-shaped MECHANICAL completion shim: { messages } → grammar Formulate →…'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Bad request
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      tags:
      - Chat
  /api/chat/result:
    get:
      operationId: getChatResult
      summary: 'Poll an async chat task: working | completed (with reply) | failed'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
      parameters:
      - name: task
        in: query
        required: false
        schema:
          type: string
      tags:
      - Chat