How do I get started?

Get an API key from your dashboard, then choose where to use it.

Build websites

Set up chat

A headline, album cover and vinyl record appear on Needle’s record shop website.

For beginners

Install a desktop chat app for Claude and ChatGPT

Use Cherry Studio to create websites and presentations, ask questions and work with documents.

For advanced users and developers

Reference

Install a desktop chat app for Claude and ChatGPT

Use Cherry Studio to create websites and presentations, ask questions and work with documents. Try attaching a PDF and asking for the main points. All you need to use Claude from Anthropic and GPT from OpenAI is an internet connection and one ModelProxy key.

Cherry Studio showing a request for a presentation and a reply with the file Cherry_Studio_Introduction.pptx
“Make a presentation about Cherry Studio”

The Slide Designer assistant replied with an eight-slide PowerPoint file.

Original screenshot
  1. Install the chat app

    Choose your operating system and download Cherry Studio.

    Operating system

    The first download works for most PCs. Open the downloaded file and follow the instructions. Once installed, you’ll find Cherry Studio in the Start menu.

  2. Connect the app to ModelProxy

    Click the gear to open Settings, then select Model Provider. Click + Add Provider and fill in the three fields below.

    Provider name
    ModelProxy
    API Key
    Open API keys, create a key and paste it here. You can also use an existing key.
    OpenAI · Base URL
    https://api.modelproxy.org

    Click Add, then turn on the switch next to ModelProxy.

  3. Choose a model and start chatting

    Click Sync models. Add a GPT model, a Claude model or both from the list.

    Start a new chat and select a model at the top of the window. Try asking, “Help me write an email asking a colleague to move our meeting to Friday.”

    My model isn’t listed

    Check the OpenAI field. It should contain https://api.modelproxy.org. The app adds /v1/chat/completions automatically.

    To add a model manually, click + next to the sync button. In the Model ID field, try gpt-5.6-luna for GPT or claude-fable-5 for Claude.

The reply appears in the chat. To switch models, click the model name at the top of the window.

Connect an AI agent to your project

Choose the program you use to work with files and code.

Checked against the developers’ guides on

Connect Claude Code

Claude Code connects to ModelProxy through the Anthropic Messages API. Installation guide

  1. Set the address and key

    Replace mp-YOUR-KEY with your key from API keys, then run both commands in your terminal. For Claude Code, the address ends in .org.

    macOS / Linux
    export ANTHROPIC_BASE_URL="https://api.modelproxy.org"
    export ANTHROPIC_AUTH_TOKEN='mp-YOUR-KEY'
    Windows commands
    PowerShell
    $env:ANTHROPIC_BASE_URL = "https://api.modelproxy.org"
    $env:ANTHROPIC_AUTH_TOKEN = 'mp-YOUR-KEY'
  2. Start Claude Code

    Start Claude in the same terminal and send “Hello” in the chat. To use another Claude model, copy its exact ID from the model catalog.

    Terminal
    claude --model claude-fable-5
Type /status in the Claude chat. Check that Anthropic base URL shows https://api.modelproxy.org and Auth token shows ANTHROPIC_AUTH_TOKEN.

Connect Codex CLI

These settings connect Codex in your terminal to ModelProxy through the Responses API. Installation guide

  1. Set your API key

    Get a key from API keys in your dashboard. Replace mp-YOUR-KEY with your key and run the command. Keep this terminal open.

    macOS / Linux
    export MODELPROXY_API_KEY='mp-YOUR-KEY'
    Windows command
    PowerShell
    $env:MODELPROXY_API_KEY = 'mp-YOUR-KEY'
  2. Open the configuration file

    Open ~/.codex/config.toml in your home directory. If it doesn’t exist, create it and any missing folders. If you already have a config, update model and model_provider at the top, before the first section in square brackets. Then add or update the [model_providers.modelproxy] section.

    ~/.codex/config.toml
    model = "gpt-5.6-luna"
    model_provider = "modelproxy"
    
    [model_providers.modelproxy]
    name = "ModelProxy"
    base_url = "https://api.modelproxy.org/v1"
    env_key = "MODELPROXY_API_KEY"
    wire_api = "responses"
  3. Test it in your project

    In the same terminal, open your project’s Git directory and run the command.

    Terminal
    codex exec "Reply with one word: hello"
Codex prints its reply and exits. To open an interactive chat, run codex.

Connect Kilo Code

Open the Kilo Code extension in VS Code. If you use the terminal, see the CLI example below. Installation guide

  1. Add a provider

    Click the gear in Kilo Code, open Providers and select Custom provider at the bottom of the list.

    Provider ID
    modelproxy
    Display name
    ModelProxy
    Provider API
    OpenAI Compatible
    Base URL
    https://api.modelproxy.org/v1
    API key
    Your key from API keys
  2. Add a model

    In Models, select gpt-5.6-luna. If the list is empty, click Fetch models or add the model manually using the same ID. Click Submit.

  3. Open the Kilo chat

    Type /models, select your model under ModelProxy and send “Hello.”

I only use Kilo in the terminal

Install Kilo CLI

  1. Set your API key

    Get a key from API keys in your dashboard. Replace mp-YOUR-KEY with your key and run the command. Keep this terminal open.

    macOS / Linux
    export MODELPROXY_API_KEY='mp-YOUR-KEY'
    Windows command
    PowerShell
    $env:MODELPROXY_API_KEY = 'mp-YOUR-KEY'
  2. Open the configuration file

    Open ~/.config/kilo/kilo.jsonc in your home directory. If it doesn’t exist, create it and any missing folders. If you already have a config, add the provider settings to it.

    ~/.config/kilo/kilo.jsonc
    {
      "model": "openai-compatible/gpt-5.6-luna",
      "provider": {
        "openai-compatible": {
          "options": {
            "apiKey": "{env:MODELPROXY_API_KEY}",
            "baseURL": "https://api.modelproxy.org/v1"
          },
          "models": {
            "gpt-5.6-luna": {
              "name": "gpt-5.6-luna",
              "tool_call": true
            }
          }
        }
      }
    }
  3. Send your first message

    Run this command in the same terminal.

    Terminal
    kilo run --model openai-compatible/gpt-5.6-luna "Reply with one word: hello"

Connect Hermes Agent

You can set the address, key and model directly in Hermes. Installation guide

  1. Open the model picker

    Run this command in your terminal, then select Custom endpoint.

    Terminal
    hermes model
  2. Enter the connection details

    Enter https://api.modelproxy.org/v1 and your key from API keys. If prompted for the API format, choose Chat Completions. Select gpt-5.6-luna or type its model ID.

  3. Test the connection

    This sends one message and prints the reply in your terminal.

    Terminal
    hermes chat --oneshot -q "Reply with one word: hello"

Connect Pi

Add ModelProxy to Pi’s list of providers to make it available in the model picker. Installation guide

  1. Set your API key

    Get a key from API keys in your dashboard. Replace mp-YOUR-KEY with your key and run the command. Keep this terminal open.

    macOS / Linux
    export MODELPROXY_API_KEY='mp-YOUR-KEY'
    Windows command
    PowerShell
    $env:MODELPROXY_API_KEY = 'mp-YOUR-KEY'
  2. Open the configuration file

    Open ~/.pi/agent/models.json in your home directory. If it doesn’t exist, create it and any missing folders. If you already have a providers section, add modelproxy to it. Keep the $ in apiKey so Pi reads the key from your terminal environment.

    ~/.pi/agent/models.json
    {
      "providers": {
        "modelproxy": {
          "baseUrl": "https://api.modelproxy.org/v1",
          "api": "openai-completions",
          "apiKey": "$MODELPROXY_API_KEY",
          "models": [
            {
              "id": "gpt-5.6-luna"
            }
          ]
        }
      }
    }
  3. Test the connection

    Run this command in the same terminal. Pi prints a single reply.

    Terminal
    pi --model modelproxy/gpt-5.6-luna --no-session -p "Reply with one word: hello"

Connect oh-my-pi (omp)

oh-my-pi reads its model settings from a YAML file. Installation guide

  1. Set your API key

    Get a key from API keys in your dashboard. Replace mp-YOUR-KEY with your key and run the command. Keep this terminal open.

    macOS / Linux
    export MODELPROXY_API_KEY='mp-YOUR-KEY'
    Windows command
    PowerShell
    $env:MODELPROXY_API_KEY = 'mp-YOUR-KEY'
  2. Open the configuration file

    Open ~/.omp/agent/models.yml in your home directory. If it doesn’t exist, create it and any missing folders. If you already have a providers section, add modelproxy to it, keeping the indentation shown below. In apiKey, enter the variable name exactly as shown.

    ~/.omp/agent/models.yml
    providers:
      modelproxy:
        baseUrl: https://api.modelproxy.org/v1
        api: openai-completions
        apiKey: MODELPROXY_API_KEY
        models:
          - id: gpt-5.6-luna
  3. Test the connection

    Run this command in the same terminal. You should see a greeting.

    Terminal
    omp -p --model modelproxy/gpt-5.6-luna "Reply with one word: hello"

Connect OpenClaw

Set up ModelProxy on the computer where OpenClaw runs. Installation guide

  1. Open model settings

    If OpenClaw is already configured, run the first command. For a new installation, open the setup wizard.

    For an existing OpenClaw setup
    openclaw configure --section model
    Command for a new installation
    Terminal
    openclaw onboard --classic
  2. Select Custom Provider

    If the option isn’t visible, open More…. Enter https://api.modelproxy.org/v1, select OpenAI-compatible (Chat Completions) and paste your key from API keys. Use modelproxy for the endpoint ID and gpt-5.6-luna for the model. Save the settings.

  3. Test with one message

    This command sends a message directly to the selected model. You can run the check from your terminal.

    Terminal
    openclaw agent exec "Reply with one word: hello" --model modelproxy/gpt-5.6-luna

Connect your app to AI

Try sending a message from your terminal. For an app, choose the Python or JavaScript example.

  1. Set your API key

    Get a key from API keys in your dashboard. Replace mp-YOUR-KEY with your key and run the command. Keep this terminal open.

    macOS / Linux
    export MODELPROXY_API_KEY='mp-YOUR-KEY'
    Windows command
    PowerShell
    $env:MODELPROXY_API_KEY = 'mp-YOUR-KEY'
  2. Send a message

    Copy and run the command for your operating system.

    macOS / Linux
    curl -sS https://api.modelproxy.org/v1/chat/completions \
      -H "Authorization: Bearer $MODELPROXY_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "gpt-5.6-luna",
        "messages": [{"role": "user", "content": "Reply with just the word hello"}]
      }'
    Windows command

    Save the text below in the current folder as request.json using UTF-8 encoding. Then run the command in the same PowerShell window.

    request.json
    {
      "model": "gpt-5.6-luna",
      "messages": [
        {
          "role": "user",
          "content": "Reply with just the word hello"
        }
      ]
    }
    PowerShell
    curl.exe -sS https://api.modelproxy.org/v1/chat/completions `
      -H "Authorization: Bearer $env:MODELPROXY_API_KEY" `
      -H "Content-Type: application/json" `
      --data-binary "@request.json"
Find the reply text in choices[0].message.content.

Connect your app to AI

You’ll need Python for this example. Open a terminal in the folder where you want to work.

  1. Set your API key

    Get a key from API keys in your dashboard. Replace mp-YOUR-KEY with your key and run the command. Keep this terminal open.

    macOS / Linux
    export MODELPROXY_API_KEY='mp-YOUR-KEY'
    Windows command
    PowerShell
    $env:MODELPROXY_API_KEY = 'mp-YOUR-KEY'
  2. Install the OpenAI library

    Terminal
    python -m pip install openai
  3. Run the example

    Save the code below as chat.py. In the same folder, run python chat.py.

    chat.py
    import os
    from openai import OpenAI
    
    client = OpenAI(
        api_key=os.environ["MODELPROXY_API_KEY"],
        base_url="https://api.modelproxy.org/v1",
    )
    
    reply = client.chat.completions.create(
        model="gpt-5.6-luna",
        messages=[{"role": "user", "content": "Reply with the word hello"}],
    )
    print(reply.choices[0].message.content)
The model’s reply appears in your terminal.

Connect your app to AI

You’ll need Node.js for this example. Open a terminal in your project folder.

  1. Set your API key

    Get a key from API keys in your dashboard. Replace mp-YOUR-KEY with your key and run the command. Keep this terminal open.

    macOS / Linux
    export MODELPROXY_API_KEY='mp-YOUR-KEY'
    Windows command
    PowerShell
    $env:MODELPROXY_API_KEY = 'mp-YOUR-KEY'
  2. Install the OpenAI library

    Terminal
    npm install openai
  3. Run the example

    Save the code below as chat.mjs. In the same folder, run node chat.mjs.

    chat.mjs
    import OpenAI from "openai";
    
    const client = new OpenAI({
      apiKey: process.env.MODELPROXY_API_KEY,
      baseURL: "https://api.modelproxy.org/v1",
    });
    
    const reply = await client.chat.completions.create({
      model: "gpt-5.6-luna",
      messages: [{role: "user", content: "Reply with the word hello"}],
    });
    console.log(reply.choices[0].message.content);
The model’s reply appears in your terminal.

Create an image

gpt-image-2 creates an image from your description. You’ll need Python for this example. Open a terminal in the folder where you want to save the result.

  1. Set your API key

    Get a key from API keys in your dashboard. Replace mp-YOUR-KEY with your key and run the command. Keep this terminal open.

    macOS / Linux
    export MODELPROXY_API_KEY='mp-YOUR-KEY'
    Windows command
    PowerShell
    $env:MODELPROXY_API_KEY = 'mp-YOUR-KEY'
  2. Install the OpenAI library

    Terminal
    python -m pip install openai
  3. Run the example

    In prompt, describe the image you want to create. Save the code as image.py, then run python image.py.

    image.py
    import base64
    from pathlib import Path
    import os
    from openai import OpenAI
    
    client = OpenAI(
        api_key=os.environ["MODELPROXY_API_KEY"],
        base_url="https://api.modelproxy.org/v1",
    )
    
    result = client.images.generate(
        model="gpt-image-2",
        prompt="A paper boat on dark water, seen from above",
        quality="low",
    )
    Path("result.png").write_bytes(base64.b64decode(result.data[0].b64_json))
Open result.png in the same folder.

Edit an image

This Python example uses gpt-image-2 to change an image’s background. Open a terminal in the folder containing your image.

  1. Set your API key

    Get a key from API keys in your dashboard. Replace mp-YOUR-KEY with your key and run the command. Keep this terminal open.

    macOS / Linux
    export MODELPROXY_API_KEY='mp-YOUR-KEY'
    Windows command
    PowerShell
    $env:MODELPROXY_API_KEY = 'mp-YOUR-KEY'
  2. Install the OpenAI library

    Save your original image in this folder as source.png.

    Terminal
    python -m pip install openai
  3. Run the example

    In prompt, describe what you want to change. Save the code as image.py, then run python image.py.

    image.py
    import base64
    from pathlib import Path
    import os
    from openai import OpenAI
    
    client = OpenAI(
        api_key=os.environ["MODELPROXY_API_KEY"],
        base_url="https://api.modelproxy.org/v1",
    )
    
    with open("source.png", "rb") as original:
        result = client.images.edit(
            model="gpt-image-2",
            image=original,
            prompt="Make the background light gray",
        )
    Path("edited.png").write_bytes(base64.b64decode(result.data[0].b64_json))
Open edited.png in the same folder.
Which files can I use?

You can send up to five images in PNG, JPEG or WebP format. Each image’s longest side can be up to 8192 pixels. Each image can be up to 20 MB, and the entire request up to 64 MB.

API keys and balance

Get an API key

An API key lets an app use models on your behalf. Treat it like a password.

  1. Open your dashboard

    Go to API keys. If you don’t have an account yet, sign up.

  2. Create and copy your key

    You’ll only see the full key once. Save it in a password manager now.

Paste the key into the API Key field in your app’s settings.
How to replace a key

Create a new key, update your apps and check that they work. Then revoke the old key in your dashboard. If someone else has obtained your key, revoke it immediately.

Check your key through the API

Replace mp-YOUR-KEY with your key and run the commands in your terminal. You’ll find your models in data.

macOS / Linux
export MODELPROXY_API_KEY='mp-YOUR-KEY'
curl -sS "https://api.modelproxy.org/v1/models" \
  -H "Authorization: Bearer $MODELPROXY_API_KEY"
Windows commands
PowerShell
$env:MODELPROXY_API_KEY = 'mp-YOUR-KEY'
curl.exe -sS https://api.modelproxy.org/v1/models -H "Authorization: Bearer $env:MODELPROXY_API_KEY"

Check your balance

Check how much money you have left for model requests.

Personal account

Your balance appears on the dashboard home screen.

Open dashboard
Check your balance through the API
  1. Set your API key

    Get a key from API keys in your dashboard. Replace mp-YOUR-KEY with your key and run the command. Keep this terminal open.

    macOS / Linux
    export MODELPROXY_API_KEY='mp-YOUR-KEY'
    Windows command
    PowerShell
    $env:MODELPROXY_API_KEY = 'mp-YOUR-KEY'
  2. Request your balance

    Use your personal key.

    cURL · macOS / Linux
    curl -sS "https://api.modelproxy.org/v1/available_balance" \
      -H "Authorization: Bearer $MODELPROXY_API_KEY"
The amount is in available_balance and the currency is in currency. The default currency is US dollars.

Your organization spending limit

See how much you can still spend on a particular model this month. The limit resets at the start of each month, in UTC.

  1. Set your API key

    Get your organization key. Replace mp-YOUR-KEY with it and run the command. Keep this terminal open.

    macOS / Linux
    export MODELPROXY_API_KEY='mp-YOUR-KEY'
    Windows command
    PowerShell
    $env:MODELPROXY_API_KEY = 'mp-YOUR-KEY'
  2. Choose a model

    In the command, replace gpt-5.6-luna with the ID of the model you want.

    cURL · macOS / Linux
    curl -sS "https://api.modelproxy.org/v1/available_balance?model=gpt-5.6-luna" \
      -H "Authorization: Bearer $MODELPROXY_API_KEY"
The remaining amount is in available_balance. A status of no_limit means you have no spending limit for this model.

Models and pricing

Find a model in the catalog and copy its ID. This is the exact name to use in your app’s settings.

Catalog prices

Input is what you send to a model. Output is what it sends back.

Open the catalog
List models through the API
  1. Set your API key

    Get a key from API keys in your dashboard. Replace mp-YOUR-KEY with your key and run the command. Keep this terminal open.

    macOS / Linux
    export MODELPROXY_API_KEY='mp-YOUR-KEY'
    Windows command
    PowerShell
    $env:MODELPROXY_API_KEY = 'mp-YOUR-KEY'
  2. Request the list

    Run the command and find your model in the data list.

    cURL · macOS / Linux
    curl -sS "https://api.modelproxy.org/v1/models" \
      -H "Authorization: Bearer $MODELPROXY_API_KEY"
Copy its id value into the model field of your request.

API formats

Choose the format your app supports.

I already have an appHow to change the API address and key in the OpenAI libraryChat CompletionsFor chat through the OpenAI libraryResponsesFor Codex CLI and apps using the Responses APIMessagesFor Claude Code and the Anthropic libraryImagesCreate or edit an image

OpenAI Responses

Codex CLI uses this API to send messages. In the OpenAI library, set the base URL to https://api.modelproxy.org/v1.

  1. Set your API key

    Get a key from API keys in your dashboard. Replace mp-YOUR-KEY with your key and run the command. Keep this terminal open.

    macOS / Linux
    export MODELPROXY_API_KEY='mp-YOUR-KEY'
    Windows command
    PowerShell
    $env:MODELPROXY_API_KEY = 'mp-YOUR-KEY'
  2. Send a message

    cURL · macOS / Linux
    curl -sS https://api.modelproxy.org/v1/responses \
      -H "Authorization: Bearer $MODELPROXY_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "gpt-5.6-luna",
        "input": "Reply with just the word hello"
      }'
Find the model’s message in the output list. The reply text is inside that message.

Anthropic Messages

Claude Code uses this API to send messages. In the Anthropic library, set the base URL to https://api.modelproxy.org.

  1. Set your API key

    Get a key from API keys in your dashboard. Replace mp-YOUR-KEY with your key and run the command. Keep this terminal open.

    macOS / Linux
    export MODELPROXY_API_KEY='mp-YOUR-KEY'
    Windows command
    PowerShell
    $env:MODELPROXY_API_KEY = 'mp-YOUR-KEY'
  2. Send a message

    cURL · macOS / Linux
    curl -sS https://api.modelproxy.org/v1/messages \
      -H "x-api-key: $MODELPROXY_API_KEY" \
      -H "anthropic-version: 2023-06-01" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "claude-fable-5",
        "max_tokens": 128,
        "messages": [{"role": "user", "content": "Reply with just the word hello"}]
      }'
Find the reply in the content list, in a block of type text.

Troubleshooting

Find the number in your error message to see what to do next.

400

Invalid request

The error message identifies the field to fix. Correct its value and try again. When checking an organization limit, include model only once.

401

API key rejected

Check that you copied the whole key, starting with mp-, and pasted it into your app or terminal. If the key was revoked, create a new key.

402

Insufficient balance

Check your balance. If you need more funds, top up your account and try again.

403

Organization disabled

If you see this error when checking your balance, contact your organization administrator.

404

Model not found

Copy the exact model name from the model catalog into the model field.

429

Model service busy

Try again shortly. The Retry-After response header tells you when you can retry.

503

Service temporarily unavailable

Try again later. If you were checking a balance in rubles or yuan, try requesting it in US dollars (USD).

Connect another agent

Open your app’s model settings. You’ll need a field for the API address and another for the key.

  1. Find the provider setting

    Under Providers or Models, look for Custom provider or Base URL. This setup requires an app that lets you change its API address.

  2. Enter the address for your API format

    Use the OpenAI address for Chat Completions or Responses, and the Anthropic address for Messages. Paste it into Base URL.

    OpenAI
    https://api.modelproxy.org/v1
    Anthropic
    https://api.modelproxy.org
    My app asks for the full endpoint URL
    Chat Completions
    https://api.modelproxy.org/v1/chat/completions
    Responses
    https://api.modelproxy.org/v1/responses
    Messages
    https://api.modelproxy.org/v1/messages
  3. Enter the key and model

    Paste your key from API keys into API Key. In Model, enter the exact ID from the model catalog. Save the settings and send “Hello.”

A reply confirms that chat works. For the agent to work with files, both the agent and its model must support tool calling.

Connect an existing app

If your app already uses the OpenAI library, you can update its connection settings. This example uses Python.

  1. Set your API key

    Get a key from API keys in your dashboard. Replace mp-YOUR-KEY with your key and run the command. Keep this terminal open.

    macOS / Linux
    export MODELPROXY_API_KEY='mp-YOUR-KEY'
    Windows command
    PowerShell
    $env:MODELPROXY_API_KEY = 'mp-YOUR-KEY'
  2. Update the address and key in your code

    Find OpenAI( in your project. Set the address and key as shown below.

    Python
    import os
    from openai import OpenAI
    
    client = OpenAI(
        api_key=os.environ["MODELPROXY_API_KEY"],
        base_url="https://api.modelproxy.org/v1",
    )
  3. Choose a model

    In chat.completions.create, specify gpt-5.6-luna or another model from the model catalog. Run your app and send a message.

Your app will show the reply. To see the cost of the request, open Usage in your dashboard.

Search documentation