[view as .md]

Projects & API Keys

A project is a logical grouping of API keys, routing configs, and usage analytics within an organization. Typical pattern: one project per app, one project per environment (prod/staging), or one project per customer.

Projects

Projects give you:

  • Scoped API keys — each key belongs to exactly one project
  • Scoped routing configs — configs are created within a project
  • Scoped analytics — request logs, cost, and latency filterable per project
  • Scoped budgets — spend caps can apply to a single project

API keys

Modelux API keys use the prefix mlx_sk_. They’re shown once at creation time — copy it somewhere safe. We store a SHA-256 hash, so we can’t show you the key again later.

Each key can have:

  • Name — for humans (e.g., “staging-server”)
  • Optional expiry — auto-revoke after N days
  • Optional rate limit — requests per minute
  • Revoked status — revoke at any time without rotating other keys

Using an API key

Pass it as a Bearer token:

Authorization: Bearer mlx_sk_xxxxxxxxxxxx

Or via the OpenAI SDK:

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

Project-scoped routing

Routing configs belong to a project, but their slug (@production) is unique within the project. A request authenticated with a project’s API key can only reference routing configs from that project.