Balance

$0.00

Add credits
Spent · 30d
$0.00
Tokens · 30d
0
API keys
0

Quickstart

Copy the prompt for your tool and paste it into your AI agent (Claude Code, Codex, ChatGPT…): it sets everything up and checks your key.

Set up Claude Code on this computer to use MafiaLLM, an AI API, with my key.

API key: <paste your sk-mf-… key here>
OpenAI-compatible base URL: https://api.mafiallm.com/openai/v1
Anthropic-compatible base URL: https://167.254.242.38:3010/anthropic
Model list (public JSON, no key needed): https://api.mafiallm.com/v1/models
Full guide: /docs/coding-tools

Steps:
1. Fetch the model list and show it to me as a short table: id, name, context, input and output price (USD per million tokens), and whether it is uncensored or reasoning. Skip models whose status is "down". Then ask me to choose a main model (suggest claude-sonnet-5-5), a stronger one for /model opus (suggest claude-opus-5-5) and a cheap small one for background work (suggest claude-haiku-5-5), and wait for my answer. If I just say "ok", use the suggestions.
2. Add an "env" block to ~/.claude/settings.json (create the file if needed, keep what is already there) with: ANTHROPIC_BASE_URL = "https://167.254.242.38:3010/anthropic" (no /v1, Claude Code adds it), ANTHROPIC_AUTH_TOKEN = the key, ANTHROPIC_MODEL and ANTHROPIC_DEFAULT_SONNET_MODEL = the main model, ANTHROPIC_DEFAULT_OPUS_MODEL = the stronger one, ANTHROPIC_DEFAULT_HAIKU_MODEL = the small one.
3. If the main model is not a Claude model, also set CLAUDE_CODE_MAX_CONTEXT_TOKENS to its "context": Claude Code assumes 200,000 otherwise.
4. Never put the key in a project’s .claude/settings.json: it gets committed with the code.
5. If I use the VS Code extension, also add to VS Code’s user settings.json: "claudeCode.environmentVariables" with ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN, and "claudeCode.disableLoginPrompt": true.
6. Then tell me to restart claude, run /logout once if I was logged in with a claude.ai account, and check /status shows the MafiaLLM URL.
7. Check the key works: curl https://167.254.242.38:3010/anthropic/v1/messages -H "Authorization: Bearer <key>" -H "content-type: application/json" -d '{"model": "claude-haiku-5-5", "max_tokens": 16, "messages": [{"role": "user", "content": "Hi"}]}'
   200 = ready. 401 = wrong key. 402 = empty balance (top up at https://mafiallm.com/billing).

Rules:
- If the key above is still a placeholder, ask me for it before starting. Never commit it or put it in a project file that goes to git.
- Back up any config file before changing it, and keep the settings already there.
- If you can't edit files or run commands here, give me the exact steps and file contents instead.
- When done, tell me in two lines what you changed and how to switch models.

Prefer to do it by hand? Setup guides →

No editor yet? MafiaLLM IDE is our free one, with MafiaLLM already set up. Get the IDE →

Spending

Last 30 days, with the requests

Full usage →

By model

Share of the 30 days' spending