Loading...
Loading...
Run Claude Code or Codex CLI on Muapi (api.muapi.ai) using Muapi credits instead of a separate vendor account. Use when the user wants a local coding agent to use Muapi as its model provider, asks which Muapi models work with Claude Code or Codex, or needs the base URL, API key variable, provider block or model name for either agent. Covers Claude Code (Anthropic Messages) and Codex CLI (OpenAI Responses), model discovery, verification and troubleshooting.
npx skill4agent add samuraigpt/muapi-skills muapi-chat-agents| Agent | Protocol | Base URL | Models endpoint |
|---|---|---|---|
| Claude Code | Anthropic Messages | | |
| Codex CLI | OpenAI Responses | | |
MUAPI_API_KEY/v1/messages/responsesAuthorization: Bearer <key>ANTHROPIC_AUTH_TOKENx-api-keyexport MUAPI_API_KEY=your_key$env:MUAPI_API_KEY = "your_key"setx MUAPI_API_KEY "your_key"curl -s -H "Authorization: Bearer $MUAPI_API_KEY" https://api.muapi.ai/anthropic/v1/models
curl -s -H "Authorization: Bearer $MUAPI_API_KEY" https://api.muapi.ai/openai/v1/modelscurl.exe~/.claude/settings.json.claude/settings.local.json{
"env": {
"ANTHROPIC_BASE_URL": "https://api.muapi.ai/anthropic",
"ANTHROPIC_AUTH_TOKEN": "<your Muapi API key>",
"ANTHROPIC_MODEL": "claude-sonnet-5-5"
}
}ANTHROPIC_BASE_URLANTHROPIC_AUTH_TOKEN="$MUAPI_API_KEY"claudesettings.json/statusclaude --debugGET /anthropic/v1/modelsclaude --model <id>ANTHROPIC_DEFAULT_HAIKU_MODELANTHROPIC_SMALL_FAST_MODEL/openai/v1modelapply_patch~/.codex/config.tomlmodel = "gpt-5-6-sol"
model_provider = "muapi"
[model_providers.muapi]
name = "Muapi"
base_url = "https://api.muapi.ai/openai/v1"
env_key = "MUAPI_API_KEY"
wire_api = "responses"env_keymodelopenaiollamalmstudiomuapicodex doctormodel_reasoning_effort = "high"| Problem | Fix |
|---|---|
| 401 | Header must be |
| 402 / insufficient credit | Balance cannot cover the worst case for that request; top up, or lower the output limit |
| 404 model not found | Use an id from the models endpoint |
| Remove the path suffix from the base URL |
| Claude Code asks to log in to Anthropic | Quit the terminal, export the variables, reopen it, start |
| Codex ignores the provider | Move settings to |
| 5xx / provider error | Retry; the proxy already retries a backup route once |