API & clients
Point any OpenAI- or Anthropic-compatible client at Pretense by changing 1 base URL.
Clients
There is no SDK to adopt and no code to rewrite. You change 1 environment variable, listed in Configuration.
| Client | How to point it |
|---|---|
| Claude Code | ANTHROPIC_BASE_URL=http://localhost:9339 |
| Codex CLI | OPENAI_BASE_URL=http://localhost:9339/v1 |
| Cursor | Settings → Models → Override Base URL |
| Python SDK | OpenAI(base_url="http://localhost:9339/v1") |
OpenAI-compatible clients take the /v1 suffix. Anthropic ones do not, because their SDK adds the path itself. The proxy has no per-client setting: it reads the path the client sends, so that suffix is what tells it which provider you meant. pretense run sets the right form for you.
The proxy answers on loopback, so a client on another machine cannot reach it until you say so. pretense run starts one and stops it again. pretense start leaves one up for several tools to share. See Quickstart.
Health
1 request tells you the proxy is up, and whether its audit log is available. Useful as a readiness check before a job points a client at it.
curl -s http://localhost:9339/health
{"status":"ok","version":"…","auditAvailable":true}Next steps
- ConfigurationThe variable you set, and the interface the proxy binds
- QuickstartLet the CLI point the tool for you instead
- Automation & CIThe same base URL, set inside an image