API Reference
ACP exposes two API implementations: a production-ready Cloudflare Worker API deployed at the edge and a Python FastAPI backend for local development with full engine access.
API Architecture
Both APIs share the same consensus protocol and axiom database but differ in deployment model, caching strategy, and feature scope.
| Worker API (Production) | Python API (Local) | |
|---|---|---|
| Base URL | https://your-worker.workers.dev | http://localhost:8000 |
| Deployment | Cloudflare edge (global) | Local / self-hosted |
| Caching | Vectorize + KV semantic cache | In-memory |
| Async support | Streaming response | Task queue with polling |
| Auth | x-api-key | Optional |
Current Version
The API is at version 2.0.0 (Vectorize). The Worker API runs ACP protocol version 4.0.0 internally.
Base URLs
Production Worker: https://your-worker.workers.dev
Local Python: http://localhost:8000 (via uvicorn main:app --reload)
Local Worker Dev: http://localhost:8787 (via wrangler dev)
Sections
Authentication
API key and Bearer token authentication, model API keys, and rate-limiting headers.
Worker API
Production Cloudflare Worker endpoints -- consensus, axiom search, semantic cache, embeddings.
Python API
FastAPI endpoints for local development -- async and sync consensus, task polling, health checks.
Errors & Rate Limits
HTTP status codes, error response format, rate limiting rules, and retry strategies.
SDKs
Client libraries and examples for Python, JavaScript/TypeScript, and cURL.