AgentPMT Chat API

The Chat API from AgentPMT — 12 operation(s) for chat.

Operations 15

POST /chat/direct/completions Direct Chat Completions #
OPTIONS /chat/direct/completions Direct Chat Completions Options #
POST /chat/completions Chat Completions #
POST /chat/admin/completions Admin Chat Completions #
GET /chat/available-models Get Available Models #
POST /chat/sessions/{session_id}/card-action Card Action #
GET /chat/sessions List Sessions #
GET /chat/sessions/{session_id} Get Session #
PATCH /chat/sessions/{session_id} Update Session #
DELETE /chat/sessions/{session_id} Delete Session #
GET /chat/sessions/{session_id}/activity Get Session Activity #
GET /chat/sessions/{session_id}/review Get Session Review #
GET /chat/workflow-requirements Workflow Requirements #
GET /chat/bundle-requirements Bundle Requirements #
GET /chat/scoped-requirements Scoped Requirements #

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/agentpmt-com:agentpmt-com-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

agentpmt-com-chat-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Fast Chat API
  version: 0.1.0
tags:
- name: Chat
paths:
  /chat/direct/completions:
    post:
      summary: Direct Chat Completions
      operationId: direct_chat_completions_chat_direct_completions_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      tags:
      - Chat
    options:
      summary: Direct Chat Completions Options
      operationId: direct_chat_completions_options_chat_direct_completions_options
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      tags:
      - Chat
  /chat/completions:
    post:
      summary: Chat Completions
      description: 'Stream a chat response. NDJSON format.


        The frontend sends ONE new message. The backend owns the history.'
      operationId: chat_completions_chat_completions_post
      security:
      - HTTPBasic: []
      parameters:
      - name: Authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - name: X-AgentPMT-Authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Agentpmt-Authorization
      - name: X-API-Key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      - name: X-Budget-Key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Budget-Key
      - name: X-AgentPMT-Chat-Surface
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Agentpmt-Chat-Surface
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Chat
  /chat/admin/completions:
    post:
      summary: Admin Chat Completions
      description: 'Admin-only chat endpoint for experimenting with models and system prompts.


        Identical to /chat/completions but accepts model_override and

        system_prompt_override fields. Auth is via X-Chat-Admin-Key header

        plus the standard X-API-Key / X-Budget-Key headers (provided by the

        embed proxy from the user''s session).'
      operationId: admin_chat_completions_chat_admin_completions_post
      security:
      - HTTPBasic: []
      parameters:
      - name: X-API-Key
        in: header
        required: true
        schema:
          type: string
          title: X-Api-Key
      - name: X-Budget-Key
        in: header
        required: true
        schema:
          type: string
          title: X-Budget-Key
      - name: X-Chat-Admin-Key
        in: header
        required: true
        schema:
          type: string
          title: X-Chat-Admin-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdminChatCompletionRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Chat
  /chat/available-models:
    get:
      summary: Get Available Models
      description: Return available models and defaults for the admin model config UI.
      operationId: get_available_models_chat_available_models_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBasic: []
      tags:
      - Chat
  /chat/sessions/{session_id}/card-action:
    post:
      summary: Card Action
      description: 'Record a card interaction. Side-effects (add-workflow, add-tool,

        credential-setup) are performed by the Next.js proxy layer BEFORE

        this endpoint is called, using the canonical budget routes which

        handle billing plans, product limits, and dependency resolution.

        This endpoint only persists the resolution in the session document.'
      operationId: card_action_chat_sessions__session_id__card_action_post
      security:
      - HTTPBasic: []
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          title: Session Id
      - name: X-API-Key
        in: header
        required: true
        schema:
          type: string
          title: X-Api-Key
      - name: X-Budget-Key
        in: header
        required: true
        schema:
          type: string
          title: X-Budget-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CardActionRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Chat
  /chat/sessions:
    get:
      summary: List Sessions
      description: List sessions for the authenticated user.
      operationId: list_sessions_chat_sessions_get
      security:
      - HTTPBasic: []
      parameters:
      - name: status_filter
        in: query
        required: false
        schema:
          type: string
          default: active
          title: Status Filter
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 50
          minimum: 1
          default: 20
          title: Limit
      - name: offset
        in: query
        required: false
        schema:
          type: integer
          minimum: 0
          default: 0
          title: Offset
      - name: X-API-Key
        in: header
        required: true
        schema:
          type: string
          title: X-Api-Key
      - name: X-Budget-Key
        in: header
        required: true
        schema:
          type: string
          title: X-Budget-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Chat
  /chat/sessions/{session_id}:
    get:
      summary: Get Session
      description: Get full session document including all messages.
      operationId: get_session_chat_sessions__session_id__get
      security:
      - HTTPBasic: []
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          title: Session Id
      - name: X-API-Key
        in: header
        required: true
        schema:
          type: string
          title: X-Api-Key
      - name: X-Budget-Key
        in: header
        required: true
        schema:
          type: string
          title: X-Budget-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Chat
    patch:
      summary: Update Session
      description: Update session title or status.
      operationId: update_session_chat_sessions__session_id__patch
      security:
      - HTTPBasic: []
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          title: Session Id
      - name: X-API-Key
        in: header
        required: true
        schema:
          type: string
          title: X-Api-Key
      - name: X-Budget-Key
        in: header
        required: true
        schema:
          type: string
          title: X-Budget-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionUpdateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Chat
    delete:
      summary: Delete Session
      description: Soft-delete a session (set status to archived).
      operationId: delete_session_chat_sessions__session_id__delete
      security:
      - HTTPBasic: []
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          title: Session Id
      - name: X-API-Key
        in: header
        required: true
        schema:
          type: string
          title: X-Api-Key
      - name: X-Budget-Key
        in: header
        required: true
        schema:
          type: string
          title: X-Budget-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Chat
  /chat/sessions/{session_id}/activity:
    get:
      summary: Get Session Activity
      description: Get agent activity rows correlated to a single chat session.
      operationId: get_session_activity_chat_sessions__session_id__activity_get
      security:
      - HTTPBasic: []
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          title: Session Id
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 200
          minimum: 1
          default: 20
          title: Limit
      - name: offset
        in: query
        required: false
        schema:
          type: integer
          minimum: 0
          default: 0
          title: Offset
      - name: X-API-Key
        in: header
        required: true
        schema:
          type: string
          title: X-Api-Key
      - name: X-Budget-Key
        in: header
        required: true
        schema:
          type: string
          title: X-Budget-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Chat
  /chat/sessions/{session_id}/review:
    get:
      summary: Get Session Review
      description: Get a bounded transcript page and correlated activity for review.
      operationId: get_session_review_chat_sessions__session_id__review_get
      security:
      - HTTPBasic: []
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          title: Session Id
      - name: message_limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 200
          minimum: 1
          default: 100
          title: Message Limit
      - name: message_offset_from_end
        in: query
        required: false
        schema:
          type: integer
          minimum: 0
          default: 0
          title: Message Offset From End
      - name: activity_limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 200
          minimum: 1
          default: 100
          title: Activity Limit
      - name: activity_offset
        in: query
        required: false
        schema:
          type: integer
          minimum: 0
          default: 0
          title: Activity Offset
      - name: X-API-Key
        in: header
        required: true
        schema:
          type: string
          title: X-Api-Key
      - name: X-Budget-Key
        in: header
        required: true
        schema:
          type: string
          title: X-Budget-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Chat
  /chat/workflow-requirements:
    get:
      summary: Workflow Requirements
      description: 'Check whether a workflow is on the budget and whether credentials

        are configured. Returns structured data so the embed widget can

        show add-workflow / credential-setup screens before the chat starts.'
      operationId: workflow_requirements_chat_workflow_requirements_get
      security:
      - HTTPBasic: []
      parameters:
      - name: workflow_id
        in: query
        required: true
        schema:
          type: string
          title: Workflow Id
      - name: X-API-Key
        in: header
        required: true
        schema:
          type: string
          title: X-Api-Key
      - name: X-Budget-Key
        in: header
        required: true
        schema:
          type: string
          title: X-Budget-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Chat
  /chat/bundle-requirements:
    get:
      summary: Bundle Requirements
      description: 'Check missing credentials for a set of product and workflow IDs.

        Used by the bundle embed widget after items are already on the budget.'
      operationId: bundle_requirements_chat_bundle_requirements_get
      security:
      - HTTPBasic: []
      parameters:
      - name: product_ids
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Product Ids
      - name: workflow_ids
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Workflow Ids
      - name: X-API-Key
        in: header
        required: true
        schema:
          type: string
          title: X-Api-Key
      - name: X-Budget-Key
        in: header
        required: true
        schema:
          type: string
          title: X-Budget-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Chat
  /chat/scoped-requirements:
    get:
      summary: Scoped Requirements
      description: Canonical setup-state endpoint for local and embedded chat surfaces.
      operationId: scoped_requirements_chat_scoped_requirements_get
      security:
      - HTTPBasic: []
      parameters:
      - name: context_type
        in: query
        required: false
        schema:
          type: string
          default: general
          title: Context Type
      - name: scope_id
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Scope Id
      - name: product_ids
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Product Ids
      - name: workflow_ids
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Workflow Ids
      - name: X-API-Key
        in: header
        required: true
        schema:
          type: string
          title: X-Api-Key
      - name: X-Budget-Key
        in: header
        required: true
        schema:
          type: string
          title: X-Budget-Key
      - name: X-AgentPMT-Chat-Surface
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Agentpmt-Chat-Surface
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Chat
components:
  schemas:
    AdminChatCompletionRequest:
      properties:
        message:
          type: string
          maxLength: 10000
          title: Message
          default: ''
        attachments:
          items:
            $ref: '#/components/schemas/ChatAttachmentPayload'
          type: array
          title: Attachments
        session_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Session Id
        budget_id:
          type: string
          minLength: 1
          title: Budget Id
        context:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Context
        init:
          type: boolean
          title: Init
          default: false
        instance_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Instance Id
        instance_metadata:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Instance Metadata
        model_visible_context:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Model Visible Context
        model_override:
          anyOf:
          - type: string
          - type: 'null'
          title: Model Override
        system_prompt_override:
          anyOf:
          - type: string
          - type: 'null'
          title: System Prompt Override
        temperature:
          anyOf:
          - type: number
          - type: 'null'
          title: Temperature
      type: object
      required:
      - budget_id
      title: AdminChatCompletionRequest
    CardActionRequest:
      properties:
        card_id:
          type: string
          title: Card Id
        resolution:
          additionalProperties: true
          type: object
          title: Resolution
        user_id:
          anyOf:
          - type: string
          - type: 'null'
          title: User Id
        card_type:
          anyOf:
          - type: string
          - type: 'null'
          title: Card Type
        budget_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Budget Id
        follow_up_cards:
          anyOf:
          - items:
              additionalProperties: true
              type: object
            type: array
          - type: 'null'
          title: Follow Up Cards
      type: object
      required:
      - card_id
      - resolution
      title: CardActionRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ChatCompletionRequest:
      properties:
        message:
          type: string
          maxLength: 10000
          title: Message
          default: ''
        attachments:
          items:
            $ref: '#/components/schemas/ChatAttachmentPayload'
          type: array
          title: Attachments
        session_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Session Id
        budget_id:
          type: string
          minLength: 1
          title: Budget Id
        context:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Context
        init:
          type: boolean
          title: Init
          default: false
        instance_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Instance Id
        instance_metadata:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Instance Metadata
        model_visible_context:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Model Visible Context
      type: object
      required:
      - budget_id
      title: ChatCompletionRequest
    SessionUpdateRequest:
      properties:
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
        status:
          anyOf:
          - type: string
          - type: 'null'
          title: Status
      type: object
      title: SessionUpdateRequest
    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
    ChatAttachmentPayload:
      properties:
        file_id:
          type: string
          maxLength: 128
          minLength: 1
          title: File Id
        filename:
          type: string
          maxLength: 255
          minLength: 1
          title: Filename
        content_type:
          type: string
          maxLength: 120
          minLength: 1
          title: Content Type
        size_bytes:
          type: integer
          minimum: 1.0
          title: Size Bytes
        preview_kind:
          type: string
          enum:
          - image
          - video
          - file
          title: Preview Kind
      type: object
      required:
      - file_id
      - filename
      - content_type
      - size_bytes
      - preview_kind
      title: ChatAttachmentPayload
  securitySchemes:
    HTTPBasic:
      type: http
      scheme: basic