[view as .md]

API overview

Modelux exposes two HTTP APIs:

  • Proxy API at https://api.modelux.ai/v1/* — OpenAI-compatible surface for running inference. Authenticated with a project API key.
  • Management API at https://api.modelux.ai/manage/v1/* — REST API for managing projects, routing configs, providers, budgets, analytics, etc. Authenticated with a management API key.

Authentication

All API calls require a bearer token:

Authorization: Bearer mlx_sk_...        // proxy / project key
Authorization: Bearer mlx_mk_...        // management key

API key prefixes

PrefixUse
mlx_sk_Project API key — for the proxy API
mlx_mk_Management API key — for the management API and MCP

Base URLs

EnvironmentBase URL
Productionhttps://api.modelux.ai
Dev (self-hosted)http://localhost:8080 (proxy), http://localhost:5100 (app)

Error format

Errors follow the OpenAI error shape for familiarity:

{
  "error": {
    "type": "invalid_request_error",
    "message": "Missing required field: messages",
    "code": "missing_field"
  }
}

Management API errors use the same shape with additional fields where useful:

{
  "error": {
    "type": "not_found",
    "message": "routing config @missing not found",
    "code": "routing_config_not_found",
    "resource": "routing_config",
    "id": "@missing"
  }
}

Status codes

CodeMeaning
200Success
400Bad request — malformed input
401Missing or invalid authentication
402Payment required — budget exceeded
403Forbidden — authenticated but lacks permission
404Not found
409Conflict — duplicate resource
422Unprocessable entity — validation failed
429Rate limited
500Server error — check status page
502/504Upstream provider error or timeout

Rate limits

Proxy API limits are per-API-key. Default: 600 requests/minute. Upgrade tiers increase this. Custom limits can be set per key.

Management API: 60 req/min per management key.

Idempotency

Mutating management API endpoints accept an Idempotency-Key header. Same key + same body returns the original response within 24 hours.

Pagination

Management API list endpoints return:

{
  "data": [...],
  "next_cursor": "opaque_cursor_or_null",
  "has_more": true
}

Pass ?cursor=... to fetch the next page.