Get the calling key
Returns the key you call it with: its settings, its spend so far, and its account's limits. It also returns the balance, or the room left under its spend limit.
https://inference.trymorse.ai/v1/keyReturns the API key the request is made with: its settings, what its spend limit has used, and its account's limits. A key with no spend limit also reads the account's balance. A key with one reads what it may still spend instead, so a tool given a limited key does not learn the account's balance. It is the same key object the Morse app's key list shows, and it never carries the key's secret. Only an API key reads it: it changes nothing, and a key still cannot manage its account. The call is free and needs no balance. It does not count toward the account's requests per minute. Each account may read it 60 times a minute, on every plan.
curl https://inference.trymorse.ai/v1/key \
-H "Authorization: Bearer $MORSE_API_KEY"{
"object": "key",
"id": "0190b2a6-7c3e-7000-8000-00000000a0b1",
"name": "ci",
"prefix": "sk_morse_4fQx9Lb2",
"created_at": "2026-11-01T00:00:00Z",
"revoked_at": null,
"last_used_at": "2026-11-20T10:00:00Z",
"expires_at": "2027-01-01T00:00:00Z",
"status": "active",
"allowed_ips": [
"203.0.113.0/24"
],
"min_privacy": "private",
"min_tier": "private",
"sealed_only": false,
"privacy_veil": false,
"forward_settings": true,
"spend_limit": {
"limit_micros": 5000000,
"limit_credits": 500,
"reset": "monthly",
"spent_micros": 1250000,
"spent_credits": 125,
"resets_at": "2026-12-01T00:00:00Z"
},
"account": {
"balance_micros": 1234567,
"balance_credits": 123.4567,
"rate_limit_rpm": 600,
"concurrency_limit": 10
}
}Response
The key and its account.
object"key"RequiredidstringRequiredThe key's id.
namestringRequiredprefixstringRequiredThe first characters of the secret, to tell keys apart. The secret itself is shown once, when the key is made.
created_atstringRequiredrevoked_atstring | nullRequiredAlways null here: a revoked key is refused.
last_used_atstring | nullRequiredexpires_atstring | nullRequiredWhen the key stops working, or null for never.
statusstringRequiredactive: an expired or revoked key is refused.
One of
active.allowed_ipsarray of stringRequiredThe addresses and CIDR ranges the key may be used from. Empty allows any address.
min_privacystringRequiredThe lowest privacy tier the key's requests may run at. A key can no longer be set to e2ee. An older key at e2ee finds no model until this is lowered.
One of
anon,private,tee, ore2ee.min_tierstringRequiredThe same as min_privacy, under its earlier name.
One of
anon,private,tee, ore2ee.sealed_onlybooleanRequiredTrue when the key may send only requests sealed to Morse's enclave, through POST /v1/sealed.
privacy_veilbooleanRequiredTrue when every chat of the key runs with the Privacy Veil.
forward_settingsbooleanRequiredTrue when a chat's sampling settings, such as temperature, reach the model's provider.
spend_limitnull | KeySpendLimitRequiredThe most the key may spend, or null for no limit.
Show its 6 properties
limit_microsintegerRequiredlimit_creditsnumberRequiredresetstringRequiredOne of
never,daily,weekly, ormonthly.spent_microsintegerRequiredWhat the key spent in the current window.
spent_creditsnumberRequiredresets_atstring | nullRequiredWhen the window starts again, or null for a limit that never resets.
accountKeyAccountRequiredThe key's account, with the names GET /v1/account uses.
Show its 4 properties
balance_microsintegerThe account's credit balance in micro-dollars, plan and referral credits included, and never below 0. Absent on a key with a spend limit, which reads spend_remaining instead.
balance_creditsnumberThe same balance in credits, 100 to the dollar.
rate_limit_rpmintegerRequiredThe requests a minute the account may make across all its keys.
concurrency_limitintegerRequiredThe requests the account may have running at once.
spend_remainingobjectWhat a key with a spend limit may still spend in the period: the limit less what it has spent, never below 0. Present only on such a key, which does not read the account's balance. Absent on a key with no limit.
Show its 2 properties
microsintegerRequiredcreditsnumberRequired
Response headers
| Header | What it says |
|---|---|
X-Morse-Version | The running build. Every response the server makes carries it. A refusal the inference door makes itself does not, such as its 404 not_found or its 401 for a request with no key. |
Errors
Every error has the same shape. Error codes explains it and when to retry.
401The key is missing or wrong, or the bearer is not an API key.4 codes
invalid_api_keyOne of these is true:
- The Authorization header is missing or not Bearer.
- The key is unknown or revoked.
- A token that starts with sk_ is not a whole sk_morse_ key.
- The bearer is no Morse key or login token at all, such as another service's API key (sk-proj-...).
api_key_expiredThe key is past the expiry set on it. Make a new key, or set a later expiry before a key expires.
invalid_tokenThe bearer is shaped as a Morse login token (a JWT) but its signature fails or it has expired. An API key sends the whole sk_morse_ key.
api_key_requiredThe bearer is a Morse app login or guest token. A login lists its account's keys in the Morse app.
403The key's account may not make this request.5 codes
account_disabledMorse has disabled the key's account.
account_deletedThe key's account has been deleted.
account_under_18The account's owner said they are under 18.
ip_not_allowedThe key allows requests only from its allowed IPs, and the request came from another address. The message names the address the proxy saw.
service_unavailable_in_regionMorse doesn't serve the place the request comes from, because of US sanctions rules and its providers' terms. Every request from there returns this, whatever the key.
429The account read its key too often. Wait the number of seconds in Retry-After, then retry.1 code
rate_limit_exceededThe account used up its 60 key reads a minute. All of the account's keys share them. Up to 7 reads can go at once, then one each second.
503Morse or the provider is busy or unavailable. Retry the request later.1 code
service_unavailableMorse could not start the request. Retry it.