[view as .md]

Quickstart

Using an AI agent? Fetch https://modelux.ai/skill/SKILL.md and drop it into your context — it covers everything below. For Claude Code / Cursor, install it once: curl -fsSL https://modelux.ai/skill/install.sh | sh.

Two minutes from zero to routing. This guide walks you through: creating an account, adding a provider, creating a project + API key, and sending your first request.

1. Create an account

Go to app.modelux.ai and sign in with Google or a passwordless email link. When you log in for the first time, modelux creates a personal organization for you.

2. Add a provider

modelux is BYO-keys — we proxy requests using your own provider credentials.

  1. Open Providers in the sidebar.
  2. Click Add provider.
  3. Pick a provider (OpenAI, Anthropic, Google, Azure, Bedrock, etc.).
  4. Paste your API key. modelux stores it encrypted and verifies it with a test call.

3. Create a project

Projects group routing configs, API keys, and usage analytics.

  1. Open Projects in the sidebar.
  2. Click Create project. Give it a name like my-app.
  3. Create an API key scoped to the project — it’ll be shown once, prefixed with mlx_sk_.

4. Configure routing (optional)

By default, you can call any model directly by name (gpt-4o, claude-sonnet-4-5, etc.) and modelux will route it to the matching provider.

For more advanced routing — fallbacks, ensembles, cost optimization — create a routing config under Routing in the sidebar. Each config gets a stable slug like @production that your app calls instead of a raw model name.

5. Send your first request

The OpenAI SDK works unchanged. Just swap the base_url and API key:

from openai import OpenAI

client = OpenAI(
    base_url="https://api.modelux.ai/openai/v1",
    api_key="mlx_sk_...",
)

response = client.chat.completions.create(
    model="gpt-4o-mini",          # or "@production" for a routing config
    messages=[{"role": "user", "content": "Hello!"}],
)

print(response.choices[0].message.content)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.modelux.ai/openai/v1",
  apiKey: process.env.MODELUX_API_KEY,
});

const response = await client.chat.completions.create({
  model: "gpt-4o-mini",
  messages: [{ role: "user", content: "Hello!" }],
});

console.log(response.choices[0].message.content);
curl https://api.modelux.ai/openai/v1/chat/completions \
  -H "Authorization: Bearer $MODELUX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o-mini",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Prefer the Anthropic SDK? Same drop-in pattern, different base URL — point your client at https://api.modelux.ai/anthropic and use /anthropic/v1/messages. The same model names route to any provider; the response stays in Anthropic’s wire shape.

What to do next