Using methods
Claude API — Using Guide (2)
Redeem your code, create an API key, check your balance, and configure 9Router, Claude Code, or Cline.
Before you start
Your MWAPI connection details and supported model IDs
OpenAI-compatible Base URL
https://api.mwapi.dev/v1
API key format example: sk-••••••••••••••••. This is a placeholder only; never paste a real API key into a public message or screenshot.
Provider-listed model IDs: claude-haiku-4-5-20251001, claude-opus-4-6, claude-opus-4-7, claude-opus-4-8, claude-opus-5, claude-sonnet-4-6, and claude-sonnet-5.
Verification note
The MWAPI URLs were reachable when this guide was prepared. The listed model availability and exact 9Router button sequence come from the supplied guide and could not be independently confirmed. The source screenshots were not included in the pasted content, so no unverified screenshots have been added.
Protect your API key
Keep your API key private. Replace YOUR_API_KEY only on your own device, and never share a settings file containing the real key.
- 1
Redeem your purchased code
Convert the code from your order into account credit
MWAPIBrowserOpen the redemption page. Enter the code received with your order in the Promo Code section, activate it, and confirm that the credit has been added to your account.
Open the redemption page - 2
Create your API key
Generate the key used by your development apps
MWAPIBrowserOpen the API Keys page and create a new key. Copy it once and store it securely. Your purchased redeem code and your generated API key are different values.
Open API Keys - 3
Check your remaining balance
View the credit remaining on your API key
MWAPIBrowserOpen the reseller page and enter your API key to check its remaining token or credit balance.
Check remaining balance - 4
Configure 9Router
Add MWAPI as a provider and import its models
9RouterDesktop1. Install and open 9Router.\n2. Go to Providers and add an Anthropic-compatible or OpenAI-compatible provider.\n3. Enter a clear provider name, the matching MWAPI base URL, and your purchased API key, then create the provider.\n4. Open the provider and select Add API Key if the key was not saved during creation.\n5. Select Import Model to load the models exposed by the API.\n6. Confirm the imported models, then test the provider before using it.
Open 9Router documentationInterface may differ
9Router’s current interface may use different labels. If the model import returns nothing, confirm the provider format and base URL shown by MWAPI before retrying.
Providers page: add an Anthropic- or OpenAI-compatible provider Provider settings: name, prefix, base URL https://api.mwapi.dev/v1 and your API key Saved provider details with the Add API Key button Add API key: paste your key, press Check, set a default model Available models after using Import from /models - 5
Configure Claude Code
Use a safe, valid settings file without permission bypasses
Claude CodeWindows / macOS / Linux1. Install Claude Code as a command-line tool or VS Code extension.\n2. Open your user settings file. On Windows, use %USERPROFILE%\\.claude\\settings.json. On macOS or Linux, use ~/.claude/settings.json.\n3. Paste the valid JSON below and replace YOUR_API_KEY on your own device.\n4. Save the file, restart Claude Code, and run /status to confirm the base URL and authentication source.
settings.json
{ "env": { "ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY", "ANTHROPIC_BASE_URL": "https://api.mwapi.dev", "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-sonnet-4-6", "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-sonnet-4-6", "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-6", "CLAUDE_CODE_ENABLE_TELEMETRY": "0" }, "model": "claude-sonnet-4-6", "theme": "dark" }Open Claude Code gateway documentationSafe corrected example
The original example contained malformed JSON, repeated model entries, and settings that bypass confirmation prompts. Those permission-bypass settings have intentionally been removed. Claude Code receives a gateway root URL here and calls its /v1 endpoints itself.
- 6
Configure Cline in VS Code
Connect through Cline’s OpenAI-compatible provider
ClineVS Code1. Install the Cline extension in VS Code.\n2. Open Cline Settings.\n3. Set API Provider to OpenAI Compatible.\n4. Set Base URL to https://api.mwapi.dev/v1.\n5. Enter your own API key in the API Key field.\n6. Set Model ID to claude-sonnet-4-6, or another model currently available for your key.\n7. Save the settings and send a short test request.
Open Cline provider documentationCompatibility note
Cline’s OpenAI-compatible setup requires a base URL, API key, and model ID. Tool support still depends on MWAPI’s compatibility with the model and endpoint.