Authentication
The Workspace API authenticates with API keys. A key is tied to a workspace and acts with admin privileges, so treat it like a password.
Creating an API key
Section titled “Creating an API key”- Sign in as a workspace admin.
- Open your workspace API key settings.
- Create a new key and give it a descriptive name (e.g. “Zapier”, “ETL job”).
- Copy the key now — the full value (
ml_live_…) is shown once. After that, only a masked hint is displayed.
Using a key
Section titled “Using a key”Send the key as a Bearer token on every request:
export MIXERLEAD_API_KEY="ml_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
curl https://ai.mixerlead.com/api/ai/models \ -H "Authorization: Bearer $MIXERLEAD_API_KEY"const res = await fetch("https://ai.mixerlead.com/api/ai/models", { headers: { Authorization: `Bearer ${process.env.MIXERLEAD_API_KEY}` },});const data = await res.json();import os, requests
res = requests.get( "https://ai.mixerlead.com/api/ai/models", headers={"Authorization": f"Bearer {os.environ['MIXERLEAD_API_KEY']}"},)res.raise_for_status()print(res.json())Scoping to a project
Section titled “Scoping to a project”By default, requests use your workspace’s default project. To target a
specific project, add the X-Project-Id
header:
curl https://ai.mixerlead.com/api/agents \ -H "Authorization: Bearer $MIXERLEAD_API_KEY" \ -H "X-Project-Id: <your_project_id>"Managing & rotating keys
Section titled “Managing & rotating keys”- List your keys to see their names, masked hints, and last‑used time.
- Rotate by creating a new key, updating your integration, then deleting the old one.
- Revoke a key by deleting it — it stops working immediately.
Errors
Section titled “Errors”| Situation | Response |
|---|---|
| Missing or malformed key | 401 Unauthorized |
| Unknown / revoked key | 401 Unauthorized |
| Rate limit exceeded | 429 Too Many Requests |
See Errors & rate limits for the full reference.
Related
Section titled “Related” API overview Base URL and conventions.
Members & roles Who can manage keys.
Security & trust How MixerLead protects credentials.