Skip to content

API

The Prefactor platform API lets you work with the platform from your own code — list agents, register and query instances, and watch runs as they happen. Every operation is available as a plain HTTPS request, and a WebSocket transport carries the same operations plus server-pushed notifications when instances change.

The TypeScript and Python SDKs are built on this API, and handle authentication, retries, and rate limiting for you. Come to this section when you’re calling the API directly or writing your own client.

  • HTTP API — base URL, authentication, response and error shapes, and bulk operations
  • WebSocket API — connection, JSON-RPC message format, and notifications when instances change
  • Rate limits — how limits are applied, and what a limited response looks like
  • Summary templates — the Liquid template language behind the summaries rendered for span types and quality schemas
  • Sensitive encoding — the $sensitive marker format for flagging sensitive values in span payloads
  • Stream agent instance updates — a runnable script that subscribes to an instance and prints every change
  • Platform API docs — the generated explorer: every operation with its params and response schemas
  • Swagger UI — try requests against the live API from your browser
  • OpenAPI JSON — the raw schema, for API clients and code generation
  • OpenRPC JSON — the machine-readable spec for the WebSocket methods
  • API token — every call authenticates with a bearer token; the token’s scope decides which operations you can call
  • SDK overview — the TypeScript and Python SDKs call this API for you
  • Prefactor CLI — the same operations from the terminal, without writing code