GitHub
Overview

API Reference

REST API for everything pfai and the web UI do — versioned under /api/v1, JSON over HTTPS, Bearer-token auth.

The ProxifAI API exposes 400+ endpoints under /api/v1 on the same host that serves the web UI. There’s no separate API hostname — point your client at http://localhost:3000/api/v1/... (or whatever BASE_URL resolves to in your deployment) and authenticate with a PAT or a pfai_<execID> workflow token.

Reference structure

SectionCovers
AuthenticationBearer tokens, PATs, workflow tokens, OIDC for browser sessions
ConventionsURL shape, content types, pagination, filtering, query semantics
ErrorsResponse shape, status codes, retry guidance
Rate limitsWhere rate limits exist (gateway only) and how they behave

Resource pages

Hand-written reference for the most-used resources. Every other endpoint follows the same conventions described above.

ResourceBase pathDoc
Issues/api/v1/issuesIssues API
Workflows/api/v1/workflowsWorkflows API
Repositories/api/v1/forge/reposRepositories (REST table at the bottom)
Pull requests/api/v1/forge/{owner}/{repo}/pullsPull Requests
Releases/api/v1/forge/{owner}/{repo}/releasesReleases
AI Gateway/api/v1/llm/v1/{chat/completions,messages}AI Gateway → Endpoints
Triggers/api/v1/triggersTriggers
Tokens (PATs)/api/v1/tokensAuthentication → PATs

What’s not here

  • No interactive playground — the API is fully introspectable via the OpenAPI spec at /api/v1/openapi.json (when OPENAPI_ENABLED=true); pair it with Bruno, Insomnia, or curl for now
  • No SDK reference — there isn’t an official client SDK yet; both pfai and the web frontend hit this same surface directly
  • No versioning beyond /api/v1 — additive changes don’t bump the version; breaking changes haven’t happened yet, and when they do they’ll ship under /api/v2

Direct API access from the CLI

Every endpoint is reachable via pfai api without leaving the terminal:

pfai api GET /api/v1/issues?status=in_progress
pfai api POST /api/v1/issues '{"title":"Audit auth flow","teamId":"team_42","status":"todo"}'

This is useful for endpoints that don’t have a dedicated pfai subcommand yet — e.g. cloud, custom event types, push rules.