DocsReferenceAPI & clients

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.

ClientHow to point it
Claude CodeANTHROPIC_BASE_URL=http://localhost:9339
Codex CLIOPENAI_BASE_URL=http://localhost:9339/v1
CursorSettings → Models → Override Base URL
Python SDKOpenAI(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.

bash
curl -s http://localhost:9339/health
json
{"status":"ok","version":"…","auditAvailable":true}

Next steps