Show the signed-in account
https://api.mozartai.com/v1/meShows who is signed in: the user, their plan, the key or app in use, its scopes and whether it is in test mode.
- Cost
- Free
- Rate limit
- Read
- MCP tool
whoami- CLI (coming soon)
mozart whoami
When to use: At the start of a session to confirm access, or when a call fails with PUBLIC_API_SCOPE_MISSING and you need to see the scopes held. In test_mode, results are canned and nothing is spent.
When not to use: For the credit balance, use GET /v1/credits. For limits and usage, use GET /v1/limits.
Side effects: None. Reads only; safe to repeat.
Authentication
Send your API key as Authorization: Bearer <key>. The key needs these scopes:
account:read
Response 200
Success.
user_idstringRequireddisplay_namestringor nullRequiredplanstringRequiredThe tier this caller's limits follow: the user's Mozart plan for MCP and CLI, and at least pro for a REST key, whose calls bill to
api_planand the API credit balance instead.api_planenumor nullRequiredFor a REST API key: the API plan its calls bill to while that plan is active. Null when the key spends only top-up credits, and for MCP, CLI and app callers, which spend Mozart plan credits.
Allowed valuesstarterbuildscalegrowth
callerenumRequiredShow 7 values
apimcpcliwebDesktopwebMobileiphoneunknown
key_namestringor nullRequiredapp_namestringor nullRequiredscopeslist of enumRequiredShow 9 values
account:readlibrary:readlibrary:writegeneratecredits:spenddownloaduploads:writepersonas:writewebhooks:manage
test_modebooleanRequired
Response headers
x-request-idThe id of this request; quote it when asking for help.x-mozart-api-versionThe API version that answered.x-ratelimit-limitRequests allowed in the current window for this caller.x-ratelimit-remainingRequests left in the current window.x-ratelimit-resetWhen the window resets, in Unix seconds.idempotent-replayedtruewhen this answer is the stored answer to an earlier call with the same idempotency key; the work was not done again.
Errors
What to do: PUBLIC_API_KEY_INVALID, PUBLIC_API_KEY_REVOKED or PUBLIC_API_TOKEN_INVALID: stop and ask the user to sign in again. PUBLIC_API_PLAN_REQUIRED: the API needs Pro or higher; tell the user. PUBLIC_API_RATE_LIMITED: wait retry_after_seconds, then call again.
| Status | Type | Meaning |
|---|---|---|
| 400 | invalid_request | The request is malformed or an input is invalid. |
| 401 | authentication | The key or token is missing, invalid or revoked. |
| 402 | insufficient_credits | The account has too few credits for this call. A REST key also needs an API plan (Starter, Build, Scale or Growth) or API credits; with neither, every call is refused with PUBLIC_API_CREDITS_REQUIRED. payment_required: The account's plan does not include this; it needs an upgrade. |
| 403 | permission | The caller may not do this: a missing scope, a Mozart CLI sign-in whose account is below Pro, or access not enabled. |
| 404 | not_found | The resource or route does not exist for this caller. |
| 409 | conflict | The request conflicts with the current state, or an idempotency key was reused with a different body. |
| 422 | content_refused | The input was refused by content screening. |
| 429 | rate_limited | Too many requests; retry after Retry-After seconds. limit_reached: A daily, concurrent or total limit was reached. |
| 500 | internal | Mozart failed to answer; retry later. |
| 503 | provider_unavailable | A generation provider is unavailable; retry later. service_unavailable: A Mozart check the request needs, such as content screening, is temporarily unavailable; retry after retry_after_seconds. |