// reference · api

HTTP API OpenAPI

okami serve exposes a small fail-closed API: unauthenticated GET /health and Bearer-protected POST /chat. OpenAPI remains the portable contract; the visual page ren…

openapi.yaml
openapi: 3.1.0
info:
  title: Okami Agent HTTP API
  version: 0.0.1
servers:
  - url: http://127.0.0.1:8765
paths:
  /health:
    get:
      summary: Healthcheck
      responses:
        '200': { description: API ready }
  /chat:
    post:
      summary: Send a message to the agent
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [message]
              properties:
                agent: { type: string, default: okami }
                message: { type: string }
      responses:
        '200': { description: reply, state and usage }
        '400': { description: invalid JSON }
        '401': { description: missing or invalid Bearer token }
        '404': { description: unknown endpoint }
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

Open this page in the interactive docs