# Add to your Claude Code skills
git clone https://github.com/codingworkflow/claude-code-apiOpenAI-compatible API gateway for Claude Code CLI.
/v1/chat/completions, /v1/models, sessions/projects APIs)model field: if omitted, CLI default model is usedgit clone https://github.com/codingworkflow/claude-code-api
cd claude-code-api
make install
make start
Server URLs:
http://localhost:8000http://localhost:8000/docshttp://localhost:8000/healthUse the provided wrappers:
make.bat install
start.bat
Notes:
start.bat starts the API in dev mode.make.bat provides common project commands.Model config is in claude_code_api/config/models.json.
Override with CLAUDE_CODE_API_MODELS_PATH.
claude-opus-4-6-20260205claude-opus-4-5-20251101claude-sonnet-4-5-20250929claude-haiku-4-5-20251001Alias/fallback behavior:
model/v1/chat/completionsopus, claude-opus-latest, claude-opus-4-6 resolve to Opus 4.6.400 with error.code = model_not_supported.Chat completion:
curl -X POST http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"messages": [
{"role": "user", "content": "Hello"}
]
}'
List models:
curl http://localhost:8000/v1/models
Streaming:
curl -X POST http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-5-20250929",
"messages": [{"role": "user", "content": "Tell me a joke"}],
"stream": true
}'
Common settings are in claude_code_api/core/config.py:
claude_binary_pathproject_rootdatabase_urlrequire_authFor engineering workflows and internal commands:
docs/dev.mdThis project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.