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.

GEThttps://inference.trymorse.ai/v1/key

Returns 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"
Response
{
  "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"Required
idstringRequired

The key's id.

namestringRequired
prefixstringRequired

The first characters of the secret, to tell keys apart. The secret itself is shown once, when the key is made.

created_atstringRequired
revoked_atstring | nullRequired

Always null here: a revoked key is refused.

last_used_atstring | nullRequired
expires_atstring | nullRequired

When the key stops working, or null for never.

statusstringRequired

active: an expired or revoked key is refused.

One of active.

allowed_ipsarray of stringRequired

The addresses and CIDR ranges the key may be used from. Empty allows any address.

min_privacystringRequired

The 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, or e2ee.

min_tierstringRequired

The same as min_privacy, under its earlier name.

One of anon, private, tee, or e2ee.

sealed_onlybooleanRequired

True when the key may send only requests sealed to Morse's enclave, through POST /v1/sealed.

privacy_veilbooleanRequired

True when every chat of the key runs with the Privacy Veil.

forward_settingsbooleanRequired

True when a chat's sampling settings, such as temperature, reach the model's provider.

spend_limitnull | KeySpendLimitRequired

The most the key may spend, or null for no limit.

Show its 6 properties
limit_microsintegerRequired
limit_creditsnumberRequired
resetstringRequired

One of never, daily, weekly, or monthly.

spent_microsintegerRequired

What the key spent in the current window.

spent_creditsnumberRequired
resets_atstring | nullRequired

When the window starts again, or null for a limit that never resets.

accountKeyAccountRequired

The key's account, with the names GET /v1/account uses.

Show its 4 properties
balance_microsinteger

The 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_creditsnumber

The same balance in credits, 100 to the dollar.

rate_limit_rpmintegerRequired

The requests a minute the account may make across all its keys.

concurrency_limitintegerRequired

The requests the account may have running at once.

spend_remainingobject

What 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
microsintegerRequired
creditsnumberRequired

Response headers

HeaderWhat it says
X-Morse-VersionThe 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_key

One 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_expired

The key is past the expiry set on it. Make a new key, or set a later expiry before a key expires.

invalid_token

The 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_required

The 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_disabled

Morse has disabled the key's account.

account_deleted

The key's account has been deleted.

account_under_18

The account's owner said they are under 18.

ip_not_allowed

The 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_region

Morse 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_exceeded

The 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_unavailable

Morse could not start the request. Retry it.