Back to products

Using methods

Claude API — Using Guide (2)

Redeem your code, create an API key, check your balance, and configure 9Router, Claude Code, or Cline.

  1. 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.

  2. 1

    Redeem your purchased code

    Convert the code from your order into account credit

    MWAPIBrowser

    Open 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
  3. 2

    Create your API key

    Generate the key used by your development apps

    MWAPIBrowser

    Open 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
  4. 3

    Check your remaining balance

    View the credit remaining on your API key

    MWAPIBrowser

    Open the reseller page and enter your API key to check its remaining token or credit balance.

    Check remaining balance
  5. 4

    Configure 9Router

    Add MWAPI as a provider and import its models

    9RouterDesktop

    1. 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 documentation

    Interface 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
  6. 5

    Configure Claude Code

    Use a safe, valid settings file without permission bypasses

    Claude CodeWindows / macOS / Linux

    1. 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"
    }

    Safe 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.

    Open Claude Code gateway documentation
  7. 6

    Configure Cline in VS Code

    Connect through Cline’s OpenAI-compatible provider

    ClineVS Code

    1. 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.

    Compatibility 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.

    Open Cline provider documentation