🚀 Model.Beer API Proxy

Integration Guide

Base URL: https://api.model.beer

API Base URL
https://api.model.beer
API Key (example)
sk-abcd1234

⚡ Quick Start

Simply point your tool's custom Base URL to https://api.model.beer and use the API Key we provide. Below are configuration guides for Claude Code (Anthropic) and Codex (OpenAI).

🟠 Claude Code Configuration

Anthropic's CLI coding assistant. Supports configuration via settings.json or environment variables.

  1. Open the Claude Code global settings file

    This file controls Claude Code behavior shared across all projects.

~/.claude/settings.json
// ~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.model.beer",
    "ANTHROPIC_AUTH_TOKEN": "sk-abcd1234",
    "ANTHROPIC_MODEL": "claude-opus-4-8"        // optional: set default model
  }
}
  1. Launch Claude Code

    After configuration, simply run claude and the new settings will take effect automatically.

To limit the configuration to the current project only, place the same env settings in .claude/settings.json at the project root.

Set the following environment variables in your terminal, or add them to ~/.bashrc / ~/.zshrc for persistence:

~/.bashrc or ~/.zshrc
# Claude Code — Use Model.Beer Proxy
export ANTHROPIC_BASE_URL="https://api.model.beer"
export ANTHROPIC_AUTH_TOKEN="sk-abcd1234"
export ANTHROPIC_MODEL="claude-opus-4-8"   # optional
ANTHROPIC_AUTH_TOKEN can also be replaced with ANTHROPIC_API_KEY — both work the same way.

⬛ Codex (OpenAI) Configuration

OpenAI's CLI coding assistant. Configure via config.toml or environment variables.

  1. Create or edit the Codex config file

    The config file is located at ~/.codex/config.toml (or ~/.config/codex/config.toml).

~/.codex/config.toml
# ~/.codex/config.toml
base_url = "https://api.model.beer/v1"
api_key = "sk-abcd1234"
model = "gpt-5.5"  # optional: set default model
  1. Launch Codex

    Simply run codex to start using the proxy service.

Set the following environment variables (can be added to shell config for persistence):

~/.bashrc or ~/.zshrc
# Codex / OpenAI — Use Model.Beer Proxy
export OPENAI_BASE_URL="https://api.model.beer/v1"
export OPENAI_API_KEY="sk-abcd1234"
Codex's Base URL must include the /v1 path suffix to ensure compatibility with the OpenAI API format.

📖 Environment Variables Reference

If you prefer managing everything via environment variables, here is a quick reference for both tools.

Tool Variable Name Recommended Value
Claude Code ANTHROPIC_BASE_URL https://api.model.beer
ANTHROPIC_AUTH_TOKEN sk-abcd1234
ANTHROPIC_MODEL claude-opus-4-8
Codex / OpenAI OPENAI_BASE_URL https://api.model.beer/v1
OPENAI_API_KEY sk-abcd1234

❓ FAQ

Q: Getting "Connection refused" or 404 after configuration?

A: Check that the Base URL includes the protocol (https://), and that Codex's URL has the /v1 suffix.

Q: Getting 401 Unauthorized?

A: Verify the API Key spelling and variable name (Claude Code uses ANTHROPIC_AUTH_TOKEN or ANTHROPIC_API_KEY).

Q: How can I confirm I'm using the proxy?

A: Claude Code displays the API endpoint on startup; Codex can be run in Debug mode to inspect request URLs. You can also capture network traffic to confirm requests are going to api.model.beer.

Q: Can I use this with other OpenAI-compatible clients?

A: Yes! Any OpenAI API-compatible client can use https://api.model.beer/v1 as the Base URL with sk-abcd1234 as the API Key.