Claude Code Adapter for LLMs
ccal is a small, local HTTP server that bridges the claude CLI
to the OpenAI API. Point any OpenAI client at your Claude Code login — no
extra API key, no billing.
Requires Node 20+ and the claude CLI installed and logged in.
Under the hood, ccal shells out to
claude -p --output-format stream-json and translates the CLI's
streaming output into OpenAI Server-Sent Events. It exposes
/v1/chat/completions and /v1/models, so existing
OpenAI code just works.
ccal drives the Claude Code CLI you already have logged in — it never calls the Anthropic API directly, so no separate key or billing is involved.
Set the base URL to http://127.0.0.1:8787/v1 and pick sonnet, opus, or haiku. Models, chat completions, and streaming all work.
Binds to localhost by default. No daemon, no config files, no state. One command starts it and Ctrl-C stops it.
Full SSE support with data: [DONE] framing, plus a plain non-streaming mode that returns a single assembled message.
The API key is ignored — auth comes from your local claude login — so any placeholder works.