Skip to main content
MuBit runtime access uses API keys across SDK, HTTP, and gRPC surfaces. Correct key handling is operationally critical for developer teams. Most authentication incidents in AI platform integrations come from key and environment drift, not protocol design. Keep endpoint-key pairing explicit, keep keys server-side only, and run controlled rotation workflows. This gives predictable auth behavior across development, staging, and production.

API key model

  • Key format: mbt_<instance_tag>_<key_id>_<secret>
  • Header: Authorization: Bearer <api_key>
Canonical environment setup:
.env
MUBIT_API_KEY="mbt_<instance>_<key_id>_<secret>"

Key lifecycle endpoints

RoutePurpose
POST /v2/core/auth/usersCreate user and initial key
POST /v2/core/auth/users/:username/rotate_keyRotate user key
POST /v2/core/auth/users/:username/revoke_keyRevoke active key
GET /v2/core/auth/usersList users
GET /v2/core/auth/users/:usernameInspect user
Never expose MuBit API keys in browser clients.

Failure modes and troubleshooting

SymptomRoot causeFix
Invalid key format errorsTruncated or malformed keyRe-issue and validate full mbt_... value
Repeated 401/403Wrong key, revoked key, or wrong endpointVerify endpoint-key pairing and rotate if needed
Partial rollout failuresMixed key versions after rotationStage rollout and confirm complete deploy

Next steps