Skip to content

Providers & credentials

The Providers page is where you manage the platform's AI supply. Ten providers ship pre-configured in the catalog: fal.ai, MiniMax/Hailuo, Google (Imagen + Veo), OpenAI, Runway, Luma, Replicate, Runware, ElevenLabs, Tavus.

First-time setup

  1. Catalog page → Install all — one click registers all 10 providers and 48 recommended models. Idempotent (safe to click again).
  2. Providers → click a provider → Add credentials.
  3. Enter a label ("Main OpenAI key") and either:
    • the API key itself — stored encrypted, shown masked forever after; or
    • an env-var reference (OPENAI_API_KEY) — key stays on the server, DB stores only the pointer.
  4. Click Verify on the new row — the platform pings the provider's API with the key and shows ok / unreachable.

Multiple accounts on one provider

Add as many reseller accounts as you like per provider (e.g. two OpenAI orgs). Traffic distributes across all ACTIVE accounts by weight (Routing dialog). Use cases:

  • Migrating keys — add the new account, Verify it, set the old one to SUSPENDED. Zero downtime.
  • Cost tiers — set costMultiplier: 0.9 on a discounted account and give it higher weight.
  • Blast-radius control — split traffic so one revoked key doesn't take the provider down.

Rotating a credential

Row → key icon (Rotate credentials) → paste the new key → Save. The account keeps its label, weight, budgets, and usage history; only the secret changes. Then Verify. The old key stops being used immediately.

Budgets — your spending guardrails

Row → Routing → set Daily budget / Monthly budget (in poisha — 5000000 = ৳50,000). When spend hits the cap the account flips to EXHAUSTED and traffic fails over to other accounts (or errors if none remain). Budgets reset automatically at period boundaries; force-reset via row menu → Reactivate + reset budget.

The Budget (daily) column shows a live progress bar of spend vs cap.

Health

  • Verify (per row) — one account.
  • Health-check all (page header) — pings every ACTIVE account everywhere, updates status dots.
  • Reseller-account statuses: ACTIVE (serving) · RATE_LIMITED (backing off) · EXHAUSTED (budget hit) · SUSPENDED (manually off).

Provider status & auto-disable

A provider (the parent, e.g. Gemini) has its own status, shown as a badge on the Providers page:

StatusMeaningSet by
ACTIVEServing traffic; listed to customersmanual / auto
DEGRADEDServing but flagged (e.g. partial issues)manual
INACTIVENo usable reseller account — hidden from customersautomatic
DISABLEDTurned off by an operatormanual

Auto-disable: when a provider's last ACTIVE reseller account goes away (suspended, rate-limited, exhausted, or deleted), the platform automatically flips the provider to INACTIVE. An INACTIVE provider disappears from the client model lists (/v1/models, /v1/models/me) and its models return PROVIDER_UNAVAILABLE — no more silent 503s at request time. As soon as an account becomes ACTIVE again, the provider auto-recovers to ACTIVE.

DEGRADED and DISABLED are manual states and are never auto-changed. The manual status toggle offers only ACTIVE / DEGRADED / DISABLEDINACTIVE is auto-only.

Magic.ai — internal documentation