@waibiwaibig/all-api
v0.1.1
Published
Tiny OpenAI-compatible gateway for local coding agents.
Readme
all-api
Tiny OpenAI-compatible gateway for local coding agents.
It turns local codex, claude, OpenClaw, and Hermes endpoints into a small
OpenAI-style base_url + api_key + model service.
Implemented surface:
GET /v1/modelsPOST /v1/chat/completions
Use
From npm:
npm install -g @waibiwaibig/all-api
all-api setupFrom source:
git clone https://github.com/waibiwaibig/all-api.git
cd all-api
npm install
npm link
all-api setupsetup asks for the workspace directory, creates an API key, starts the server,
in the background, prints the connection details, and exits:
Base URL:
http://127.0.0.1:4011/v1
API key:
sk-allapi-admin-...
Models:
codex-local
claude-codeCall it:
curl http://127.0.0.1:4011/v1/chat/completions \
-H "Authorization: Bearer sk-allapi-admin-..." \
-H "Content-Type: application/json" \
-d '{
"model": "codex-local",
"messages": [{"role": "user", "content": "Reply with exactly: ok"}]
}'Create another key:
all-api key create --models claude-codeStop the background server:
all-api stopNotes
- No runtime dependencies.
- No Docker or database.
- Each request starts a fresh agent process.
- Stores API key hashes, not raw keys.
- Codex runs with
--sandbox read-only. - Claude runs with
--permission-mode plan. - Binds to
127.0.0.1by default. /v1is the OpenAI API version prefix. Usehttp://127.0.0.1:4011/v1for OpenAI-compatible clients; root paths like/chat/completionsalso work.
