Blekline
v0.3.0GitHub

API

openapi

View as Markdown

Blekline publishes an OpenAPI 3.1 spec at packages/contracts/openapi.yaml in the monorepo.

Covered endpoints

MethodPathPurpose
POST/api/maskMask prompts
POST/api/eventsMetadata event ingest
POST/api/mcp/enforce-tool-callMCP tool-call governance
POST/api/policy/simulatePolicy simulation
GET/POST/api/workspace/mcp-policyWorkspace MCP tool allow/deny
POST/api/ingress/v1/chat/completionsOpenAI-compatible ingress proxy
POST/api/ingress/v1/messagesAnthropic Messages ingress proxy

Auth

All endpoints accept x-blekline-workspace-token (scoped API token). Dashboard sessions use bearer cookies via the same routes where applicable.

Optional headers for fleet telemetry:

  • x-blekline-client-surfacecursor, claude-desktop, codex, sdk, extension
  • x-blekline-model-provider — model vendor
  • x-blekline-model-id — model id string

Generate clients

Import the YAML into Postman, Insomnia, or openapi-generator for Java/Go/Rust clients. Official SDKs: @blekline/client (TypeScript) and blekline-client (Python).


Next steps: AI Enablement Stack · TypeScript SDK · POST /api/mask · Open workspace · Report issue