Overview API Reference Integrations

Documentation

An API gateway for AI models — routes your requests to the cheapest capable model across multiple providers. Supports OpenAI-compatible and Anthropic-native endpoints.

How it works

Instead of specifying a model, you specify a capability tier (economy, standard, or premium) and an optimisation preference (cheap, fast, balanced, or quality). The router selects the best model from all available providers.

If a provider goes down, the circuit breaker reroutes automatically. If a cheaper model launches, you benefit without changing code. Context-window guards ensure your input always fits the selected model.

Quick start

1. Sign up — go to /profile, enter your email, get a login code. New accounts get $1 in trial credits.

2. Create an API key — on the profile page, generate a key (starts with mr_sk_).

3. Make a request — two endpoints available:

OpenAI-compatible — works with any OpenAI SDK or tool:

# Economy tier — cheap models, burns trial credits curl https://api.lxg2it.com/v1/chat/completions \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "economy", "messages": [{"role": "user", "content": "Hello!"}] }'

economy routes to the cheapest models in each tier. Your $1 trial credit covers millions of tokens on economy, or fewer calls on standard / premium. Pin a specific model like claude-sonnet-4-6. See Tiers.

Anthropic-native — use the native Anthropic Messages API for full-fidelity Claude access (including thinking blocks and interleaved reasoning):

# Anthropic-native — route to Claude via the Messages API curl https://api.lxg2it.com/v1/messages \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -H "anthropic-version: 2023-06-01" \ -d '{ "model": "claude-opus-4-8", "max_tokens": 1024, "messages": [{"role": "user", "content": "Hello!"}] }'

That’s it. For the OpenAI-compatible endpoint, the response format is identical to OpenAI’s — any existing client library or tool that speaks the OpenAI API will work without modification. For the Anthropic-native endpoint, use the standard Anthropic Messages API format.

Learn more
API Reference
Endpoints, parameters, tiers, model pinning, error codes.
Integrations
Setup guides for Cursor, Windsurf, RooCode, OpenClaw, and more.
Pricing

Provider costs are passed through at exact rates — no per-request markup. We charge a 4% fee on credit top-ups (minimum $0.80) via Stripe. That’s it.

All prices in USD. View your balance and usage at /profile.