Skip to main content

Member API keys for the Model Gateway

For: a member of an organisation on UpsQuad who wants an API key to call the Model Gateway from a script, a tool or a CI job that acts as them, and the person inside that organisation who supports them. Not for: an agent that runs outside UpsQuad. An agent does not use a member API key. It uses its own client credentials, described in the external-agent guide in this manuals section.

This page describes what the service does today, and it says plainly where something is limited.

1. What a member API key is, and what it is not​

A member API key is a bearer credential that acts as you. It looks like uq_key_ followed by 32 hexadecimal characters. Anyone who holds the string can make Model Gateway calls as you, at the clearance the key carries, until the key expires or is revoked. Treat it like a password.

A key carries four things, set at the moment it is minted:

  • your organisation;
  • you, the member it is attributed to: every call it makes is recorded against you;
  • one team in your organisation that you belong to;
  • your clearance, as it stood when you minted the key. If your clearance is lowered later, the key is lowered with it (section 4.4).

A key is for Model Gateway calls only. It cannot sign you in to the portal, and it cannot mint, list, rotate or revoke keys: those operations need your signed-in UpsQuad session.

A key is not an agent credential. The mint request still has an optional field that names an agent (scoped_agent_id). Do not use it. The Model Gateway can be configured to refuse any key that names an agent, and the evaluation service described in section 6 refuses them (agent_scoped_key_demoted, section 10.2). An agent that needs to call the gateway uses its own client credentials instead.

UpsQuad stores only a SHA-256 hash of your key. The full key appears once, in the response to the request that created it. Nobody, including UpsQuad, can show it to you again. If you lose it, revoke it and mint a new one.

2. Status at a glance​

AreaState today
Minting in the portalAvailable from the API Keys page and from the Model Gateway section of your organisation (section 5.1).
Minting, listing and revoking over HTTPAvailable (sections 5.2, 8, 9).
RotationAvailable over HTTP and over the RPC the portal uses (section 7).
Using a keyThe Model Gateway is currently offered for evaluation traffic at https://model-gw-beta.upsquad.ai. It does not yet carry production traffic (section 6).
Keys that name an agentRefused on the evaluation service (section 1).
The "Name" and "Scope" fields in the portal's New API Key dialogNot stored. They do not label or restrict the key (section 5.1).

3. Who may mint a key​

All of these must hold. The server checks them on every mint, whether the request comes from the portal or from your own HTTP client.

  1. You are signed in as a member of the organisation, and the server can tell which member you are. If it cannot, it refuses rather than mint a key it cannot attribute (CALLER_UNRESOLVED).
  2. Your clearance is L3 or above. UpsQuad holds your clearance in two places: your sign-in token and your member record. The key gets the lower of the two, and the L3 check is made against that value. A value above L5 counts as L5. A key can never carry more clearance than you have.
  3. You name a team you belong to (unit_id). It must be a team in your own organisation (not a pillar or another kind of unit) that has not been deleted, and you must be a member of it. Your role in the team (member, lead and so on) is not considered: an ordinary member of a team may hold a key for it.

Points 1 and 2 are checked before the team is looked at. Someone who may not mint learns nothing about which teams exist.

What you cannot choose. The member, the organisation and the clearance of the key come from your verified sign-in, never from the request. The request still accepts member_id and team_id for compatibility with old clients, but both are ignored. Sending somebody else's id does not fail; the key is bound to you anyway.

There is no default team, even if you belong to only one. A request with no unit_id is refused (UNIT_REQUIRED), so that a key that could never complete a gateway call is refused at the moment you can still fix it.

4. What a key can reach​

4.1 What the key is scoped to​

DimensionSet byNotes
Organisationyour verified sign-inNever empty.
Memberyour verified sign-inEvery gateway call is recorded against this member.
Teamthe unit_id you send, checked against your membershipsRequired. The gateway decides which endpoints the key may use from this team (section 4.2).
Clearanceyour verified sign-in: the lower of your two clearance values when both are set, otherwise the one that is set (an unset value is ignored, not counted as zero), capped at L5Compared against each endpoint's clearance floor on every call.
Agentoptional scoped_agent_idDo not use (section 1).
Expiryoptional expires_atNo default and no maximum. If you leave it out, the key never expires. A time that is not in the future is refused (EXPIRES_AT_IN_PAST). Set an expiry.

One key, one team. The gateway first routes your request by model to an endpoint, then checks whether your team is approved to use that endpoint. If you work in two teams, mint one key for each.

4.2 What a call with the key needs​

A call is admitted only if all of these hold at the time of the call:

  • the key is active (not revoked) and not expired;
  • the model you ask for is served by an endpoint registered in your organisation;
  • your team has an approved binding to that endpoint. A binding is the organisation's grant of an endpoint to a team, approved by the team's manager. Pending, rejected and absent bindings are all refused the same way (no_approved_binding);
  • the key's clearance is at least the higher of the endpoint's clearance floor and the binding's clearance floor;
  • the gateway's other checks pass: rate limits, budgets, model allow-lists and content guardrails. These apply to every kind of credential, not only to member API keys.

Your team's binding is read on every call, so a binding that is approved, withheld or removed takes effect on your next call.

4.3 What a key cannot do​

  • Reach endpoints that your team has no approved binding for, including endpoints approved for your other teams.
  • Carry more clearance than you had when you minted it, or more than you have now.
  • Sign in to the portal, or mint, list, rotate or revoke keys.
  • Change, except in one way. Its team and expiry are fixed when it is minted. Its clearance can only go down, when yours is lowered (section 4.4).

4.4 How long a key lives​

A key works until it expires or is revoked, whichever comes first.

Leaving ends it too. When you are removed from the team a key is for, every key of yours for that team is revoked at that moment. When you are removed from the organisation, or your account is suspended (for example by your identity provider), every key you hold in the organisation is revoked, whichever team it is for. The next call with such a key is refused with 401, even if the gateway checked the key a moment earlier. There is one exception. Just after the change, the gateway drops its cached check for each revoked key. If that drop fails, the key can still be accepted for up to 60 seconds. The failure is logged for your operator, and the key is already revoked. If the gateway's key cache cannot be reached when the change is made, the change is refused and nothing is changed (section 10.1). If you are reinstated, mint a new key: a revoked key is never reactivated. Rotation (section 7) re-checks your team membership, so a member who has left the team cannot rotate the key into a fresh one.

A lower clearance lowers your keys. A key carries the lower of its mint clearance and the member's current clearance; promotion does not raise it — rotate. When your clearance is lowered, every active key you hold in the organisation that carries more than your new clearance is lowered to it, at the same moment and in the same change. Keys at or below your new clearance are not changed. The key is not revoked: it keeps working, at the new clearance, on the next call. This holds even below L3. L3 is what you need to mint or rotate a key, not to keep using one. The same 60-second exception applies: if the gateway cannot drop its cached check after the change, the key can be accepted at its old clearance for up to 60 seconds. If the key cache cannot be reached when the change is made, the clearance change is refused and nothing is changed (section 10.1). When your clearance is raised again, your existing keys stay where they are. To use the higher clearance, rotate the key (section 7) or mint a new one.

The gateway caches a successful key check for up to 60 seconds. A key therefore stops working at its expiry time, give or take up to one minute.

5. Minting a key​

5.1 In the portal​

You need clearance L3 or above to mint.

  • API Keys page, New API Key. Choose a team and an expiry (never, 30 days, 90 days or 1 year), then create the key. The team list shows every team in your organisation, not only yours. If you pick one you are not a member of, the mint is refused with "you are not an active member of that org unit". The Name and Scope fields in this dialog are not stored and do not restrict the key.
  • Model Gateway section of your organisation. This surface mints a key with the team already filled in from an approved binding, so the key works with that binding's endpoint.

Copy the key when it is shown. It is not shown again.

5.2 Over HTTP​

Send the request to the UpsQuad API with your signed-in session token as the bearer, the same credential the portal uses. A member API key is not accepted here.

POST /v1/api-keys HTTP/1.1
Authorization: Bearer <your signed-in session token>
Content-Type: application/json

{"unit_id": "6f1c0e2a-…", "expires_at": "2026-12-31T23:59:59Z"}
FieldRequiredMeaning
unit_idYesThe id (a UUID) of a team in your organisation that you are a member of.
expires_atNoRFC 3339 timestamp. Leave it out and the key never expires. A value that is not RFC 3339 is refused with 400 INVALID_REQUEST; a time that is not in the future is refused with 400 EXPIRES_AT_IN_PAST.
scoped_agent_idNoDo not use (section 1).
team_id, member_idNoAccepted and ignored (section 3).

The request body is limited to 1 MiB. A successful mint answers 201 Created:

{
"key_id": "0b7d4c1e-…",
"raw_key": "uq_key_3f9a1REDACTED",
"key_prefix": "uq_key_3f9a1",
"created_at": "2026-11-17T09:30:00Z",
"expires_at": "2026-12-31T23:59:59Z"
}
  • raw_key is the key. This is the only time it is returned.
  • key_prefix is its first 12 characters. It is stored and shown in key listings so that you can tell keys apart. It does not authenticate anything.
  • key_id is what you use to rotate or revoke the key.
  • expires_at is present only if you sent one.

The same operation over Connect is upsquad.auth.v1.APIKeyService/CreateAPIKey with {"unitId": "…", "expiresAt": "…"}. This is the RPC the portal calls. It applies exactly the same rules and returns the same fields.

6. Using the key​

The Model Gateway is currently offered for evaluation traffic at:

https://model-gw-beta.upsquad.ai

Every path under /v1/ is relayed to the endpoint that serves the model you ask for. Send the key as a bearer token:

export UQ_KEY='uq_key_…' # the raw_key from the mint response

curl -s -X POST "https://model-gw-beta.upsquad.ai/v1/chat/completions" \
-H "Authorization: Bearer $UQ_KEY" \
-H 'Content-Type: application/json' \
-d '{"model": "<a model served by an endpoint your team is approved for>",
"messages": [{"role": "user", "content": "hello"}]}'
  • A member API key is read only from the Authorization header, as Bearer uq_key_….
  • The request body must name a model. It is limited to 32 MiB.
  • Your key never leaves UpsQuad. The gateway removes your Authorization header (and any X-Api-Key, Api-Key, Cookie and Proxy-Authorization header) before it forwards the request. It then adds your organisation's own credential for the model provider.
  • The key is checked when each request arrives. A request the gateway has already admitted is not interrupted if the key is revoked while the response is still streaming.

The request and response formats the gateway accepts for each model provider, and the refusals that every kind of credential can receive, are described in the external-agent guide in this manuals section. They are the same for a member API key. Only the credential differs.

7. Rotating a key​

Rotation replaces a key with a new one in a single step. Over HTTP:

POST /v1/api-keys/rotate HTTP/1.1
Authorization: Bearer <your signed-in session token>
Content-Type: application/json

{"key_id": "0b7d4c1e-…"}

Rotation counts as minting, so the rules of section 3 apply again:

  • you need clearance L3 or above, and you may rotate only your own keys (NOT_KEY_OWNER otherwise);
  • the new key keeps the old key's team, and your membership of that team is checked again. If you have left the team, rotation is refused (UNIT_NOT_A_MEMBER);
  • the new key's clearance is the lower of your clearance now and the old key's clearance;
  • the new key keeps the old key's expiry and agent field. Rotation does not extend a key's lifetime. To get a longer-lived key, mint a new one;
  • a key that carries no team (keys minted before the team became required) cannot be rotated (UNIT_REQUIRED). Mint a new key instead;
  • a key whose expiry has already passed cannot be rotated (EXPIRES_AT_IN_PAST): its replacement would carry the same expiry and be dead on arrival. Mint a new key instead.

The new key is created and the old key is revoked together, in one transaction: either both happen or neither does. A successful rotation answers 200 OK:

{"new_key_id": "9a2e…", "raw_key": "uq_key_7c0d2REDACTED", "key_prefix": "uq_key_7c0d2", "revoked_key_id": "0b7d4c1e-…"}

The same operation over Connect is upsquad.auth.v1.APIKeyService/RotateAPIKey with {"keyId": "…"}. It applies exactly the same rules, answers with newKeyId, rawKey, keyPrefix and revokedKeyId, and refuses with the Connect codes in section 10.1.

After a rotation, the gateway also drops its cached check for the old key, so the old key stops working at once. If that cache drop fails, you are told, and you are not given a new key:

  • HTTP answers 503 ROTATE_CACHE_LIVE, and Connect answers unavailable.
  • The old key is revoked, but it may still be accepted for up to 60 seconds.
  • No replacement is issued. The new key created in that rotation is deactivated straight away and its value is never shown, so nobody holds it.
  • What to do: revoke the old key again (section 9). That is safe to repeat, and each attempt retries the cache drop. Then mint a new key (section 5). Rotating the old key again answers 409 KEY_ALREADY_REVOKED, because it is already revoked.

8. Listing keys​

GET /v1/api-keys?member_id=<optional member id>&limit=100&offset=0 HTTP/1.1
Authorization: Bearer <your signed-in session token>
  • Anyone signed in to the organisation can list. The list holds every key in the organisation, for every member, active and revoked. Pass member_id to see one member's keys.
  • Each entry has key_id, key_prefix, member_id, team_id (the key's team), scoped_agent_id (if set), is_active, created_at and expires_at (if set). The key itself is never listed.
  • is_active: true means the key works now: it is not revoked and its expires_at, if set, has not passed. is_active: false means it does not: with an expires_at in the past, the key has expired (it may also have been revoked; the listing does not say); otherwise it has been revoked. The expiry is compared with the current time when you list, so a key turns inactive in the listing at its expiry time without anything being changed.
  • Newest first. limit defaults to 100 and is capped at 500. The response also carries total_count, limit and offset.
  • Over Connect, APIKeyService/ListAPIKeys returns at most 100 keys and has no paging. If you get exactly 100, there may be more: use the HTTP listing.

9. Revoking a key​

DELETE /v1/api-keys/<key_id> HTTP/1.1
Authorization: Bearer <your signed-in session token>

The same operation over Connect is APIKeyService/RevokeAPIKey with {"keyId": "…"}.

Who may revoke: any one of these three, over HTTP and over Connect alike:

WhoCondition
The key's ownerThe key was minted by you. There is no clearance requirement: even if your clearance has been lowered since, you can always revoke your own keys.
An administrator of the key's teamYou are a member of the team the key is for, at clearance L4 or above.
An administrator of the organisationYour clearance is L5. Any key in the organisation, whatever its team, including a key that carries no team.

Anyone else is refused with 403 REVOKE_FORBIDDEN (Connect permission_denied), and the key is not touched. A key that carries no team (keys minted before the team became required) has no team administrators: only its owner or an L5 member can revoke it.

Keys of another organisation cannot be revoked: they answer 404 KEY_NOT_FOUND (Connect not_found). That answer comes before the check above, so it is the same whoever asks. Because anyone signed in can list every key in the organisation (section 8), a 403 on a key of your own organisation tells you nothing the listing does not.

If the server cannot check your team membership, the revoke answers 500 UNIT_VERIFIER_UNAVAILABLE (Connect internal) and nothing is revoked. This can only happen when you are not the owner and are at L4, not L5: an L5 member and the owner never need the check, and below L4 the answer is 403 without it.

What happens:

  • The key is deactivated (is_active: false), and the record of it is kept. The record holds only the hash, never the key, and it is what explains the usage recorded against the key. There is no way to delete a key, only to revoke it.
  • Revocation takes effect for the next request: the gateway's cached check for the key is dropped as part of the revoke. A request already admitted is not interrupted (section 6).
  • If the cache drop fails, you are told. HTTP answers 503 REVOKE_CACHE_LIVE, and Connect answers unavailable. The key is already deactivated, but it may still be accepted for up to 60 seconds. Retry the revoke. Retrying is safe, and each retry attempts the cache drop again.
  • Revoking a key that is already revoked answers 200 again.

A successful revoke answers 200 OK with an empty object, {}.

10. Error contract​

10.1 Minting, rotating, listing and revoking​

If your session token is missing or invalid, the request is refused before it reaches the key service, with 401 and a body of the form {"code": "Unauthorized", "message": "…"}.

Every other refusal from the key service has this body:

{"error": {"code": "UNIT_NOT_A_MEMBER", "message": "you are not an active member of that org unit"}}

Over Connect, the same refusals arrive as Connect error codes. The error message is not the same text as the HTTP message.

HTTPerror.codeConnect codeCauseWhat to do
400INVALID_REQUESTinvalid_argument (rotate with no keyId)Malformed JSON, a body over 1 MiB, an expires_at that is not RFC 3339, or (rotate) no key_id.Fix the request.
400EXPIRES_AT_IN_PASTinvalid_argumentMint: expires_at is not in the future. Rotate: the old key's expiry has passed.Send a later expires_at. For rotate, mint a new key.
400UNIT_REQUIREDinvalid_argumentNo unit_id. On rotate, the old key carries no team.Name a team you belong to. For rotate, mint a new key.
400UNIT_NOT_UUIDinvalid_argumentunit_id is not a UUID.Send the team's id, not its name.
401UNAUTHORIZEDunauthenticatedYour sign-in names no organisation.Sign in to the organisation the key is for.
403CALLER_UNRESOLVEDpermission_deniedThe server cannot tell which member you are.Ask your organisation's administrator to check your membership.
403MEMBER_NOT_FOUNDpermission_deniedMint or rotate: your member record was removed from the organisation while the request was in flight. No key was issued.Ask your organisation's administrator whether you are still a member. If you are, sign in again and retry.
403MEMBER_NOT_ACTIVEpermission_deniedMint or rotate: your membership in the organisation is not active (for example, it is suspended). No key was issued. While your membership is not active, every other request is refused too, with 403 and reason member_not_active.Ask your organisation's administrator to reinstate you, then mint a new key.
403NO_VERIFIED_CLEARANCEpermission_deniedNo clearance is recorded for you.Ask your administrator to set your clearance.
403MINT_FORBIDDENpermission_deniedYour clearance is below L3.Ask someone at L3 or above, or ask for a higher clearance.
403UNIT_NOT_A_MEMBERpermission_deniedYou are not a member of that team, or no such team exists in your organisation. The two are deliberately indistinguishable.Check the id, or ask the team's manager to add you.
403NOT_KEY_OWNERpermission_deniedRotate only: the key is not yours.Rotate your own keys. To cut off somebody else's key, revoke it, if you may (section 9).
403REVOKE_FORBIDDENpermission_deniedRevoke only: the key is not yours, and you are neither at L4 or above in the key's team nor at L5.Ask the key's owner, an L4 member of its team or an L5 member of your organisation to revoke it.
404KEY_NOT_FOUNDnot_foundRotate or revoke: no such key in your organisation.Check the key_id from the mint response or the listing.
409KEY_ALREADY_REVOKEDfailed_preconditionRotate only: the key is already revoked.Mint a new key.
500UNIT_VERIFIER_UNAVAILABLEinternalThe server could not check your team membership. Nothing was minted, rotated or revoked.Not your fault. Report it; do not retry in a loop.
500MINT_NO_TRANSACTIONinternalMint only: the server could not open the database transaction the key is written in. No key was issued.Not your fault. Report it; do not retry in a loop.
503REVOKE_CACHE_LIVEunavailableRevoke only: the key is deactivated, but it may be accepted for up to 60 seconds.Retry the revoke (section 9).
503ROTATE_CACHE_LIVEunavailableRotate only: the old key is revoked, but it may be accepted for up to 60 seconds, and no new key was issued.Revoke the old key again, then mint a new key (section 7).
500INTERNAL_ERRORinternalAny other server fault.Report it.

Membership changes that revoke keys. Removing a member from a team or from the organisation, suspending them, or setting their status to removed also revokes their keys (section 4.4). If that revocation cannot be completed, the membership change is refused as a whole: nothing is changed. The answer has one of two fixed messages:

Code (gRPC / Connect)MessageCauseWhat to do
unavailableMEMBER_API_KEY_CACHE_UNAVAILABLE: the member's API keys could not be revoked because the API key cache is unreachable, so nothing was changed. Retry.The gateway's key cache could not be reached, so a revoked key could not be guaranteed to stop working at once.Retry the change. Retrying is safe.
internalMEMBER_API_KEY_REVOKE_FAILED: the member's API keys could not be revoked, so nothing was changed.Any other fault while revoking the keys.Report it.

Clearance changes that lower keys. Lowering a member's clearance also lowers their keys (section 4.4). If that cannot be completed, the clearance change is refused as a whole: the member keeps their clearance and every key keeps its own. This holds for each row of a CSV bulk import too: a row that reports one of these messages as update_failed changed nothing, and the other rows of the import are applied. The answer has one of two fixed messages:

Code (gRPC / Connect)MessageCauseWhat to do
unavailableMEMBER_API_KEY_CACHE_UNAVAILABLE: the member's API keys could not be lowered to the new clearance because the API key cache is unreachable, so nothing was changed. Retry.The gateway's key cache could not be reached, so a lowered key could not be guaranteed to be served at its new clearance at once.Retry the change. Retrying is safe.
internalMEMBER_API_KEY_CLAMP_FAILED: the member's API keys could not be lowered to the new clearance, so nothing was changed.Any other fault while lowering the keys.Report it.

10.2 Calling the Model Gateway​

Key problems answer 401 with this body:

{"error": {"type": "invalid_api_key", "message": "invalid or expired API key"}}
messageCauseWhat to do
missing or malformed Authorization headerNo Authorization header, or it does not start with Bearer .Send Authorization: Bearer uq_key_….
invalid API key formatThe bearer does not start with uq_key_.Send the raw_key from the mint response.
invalid or expired API keyNo active, unexpired key matches: it was mistyped, revoked or has expired.Mint a new key.
this API key does not resolve to an organisationThe key's record names no organisation.Revoke it and mint a new one. Report it if it recurs.
internal authentication errorThe gateway could not look the key up. A server fault, not a problem with your key.Retry later; report it if it persists.

Governance refusals have this body:

{"error": {"code": "no_approved_binding", "message": "…", "gate": "5/binding", "class": "policy"}}

gate names the check that refused the call. class says what kind of refusal it is: request (fix the request), policy (somebody must change a configuration or grant), quota (a spend, token or request-rate cap; a 429 carries a Retry-After header) or unavailable (the check could not be made; a retry may succeed). These are the refusals a member API key is most likely to meet:

HTTPerror.codegateCauseWhat to do
400model_required5/requestThe body has no model.Name a model.
404no_matching_endpoint5/routingNo endpoint in your organisation serves that model.Use a model your organisation has registered.
403agent_scoped_key_demoted3/identityThe key names an agent (section 1).Mint a key without scoped_agent_id. Agents use their own client credentials.
403binding_unit_unresolved5/bindingThe key carries no team. Only keys minted before the team became required are in this state.Mint a new key with unit_id. Rotation will not fix it.
403no_approved_binding5/bindingYour team has no approved binding for the endpoint serving that model. The key is fine; the grant is missing.Ask your team's manager to approve a binding for that endpoint, or use a model your team is approved for.
403binding_withheld5/bindingThe team's manager has withheld this endpoint from your team.Ask the team's manager.
403insufficient_clearance7a/clearance_floorThe key's clearance is below the endpoint's or the binding's floor. The message names both levels.Use another endpoint, or ask for a higher clearance and then mint a new key: an existing key is not raised when your clearance is (section 4.4).

The other refusals (rate limits, budgets, model allow-lists, guardrails and the gateway's own faults) are common to every credential. They are listed in the external-agent guide in this manuals section.

11. Worked example​

A member with clearance L3, a member of the team 6f1c0e2a-…, whose team has an approved binding to an endpoint that serves gpt-4o-mini. Keys and ids are shortened; secrets are REDACTED.

  1. Mint, with a 30-day expiry:

    POST /v1/api-keys
    {"unit_id": "6f1c0e2a-…", "expires_at": "2026-12-17T00:00:00Z"}

    → 201 with "key_id": "0b7d4c1e-…" and "raw_key": "uq_key_3f9a1REDACTED".

  2. Call the gateway with that key and "model": "gpt-4o-mini" → 200 and the provider's response.

  3. The same key with a model whose endpoint is not bound to the team → 403 no_approved_binding, gate 5/binding.

  4. List with ?member_id=<your member id> → the key appears with team_id 6f1c0e2a-…, is_active: true and the expiry you set.

  5. Revoke: DELETE /v1/api-keys/0b7d4c1e-… → 200 {}.

  6. Call again → 401, invalid or expired API key.

12. Verification checklist​

12.1 For the member​

  1. The mint answers 201 and raw_key starts with uq_key_. You have stored it somewhere safe, and you have set an expiry.
  2. The listing shows the key under your member_id, with the team_id you asked for and is_active: true.
  3. A call with the key and a model your team is approved for answers 200. A 403 no_approved_binding means the key is fine and your team needs a binding (section 4.2).
  4. A call with no Authorization header answers 401.
  5. After you revoke the key, the next call answers 401 with invalid or expired API key.

12.2 For the person who supports members​

  1. The member's clearance is L3 or above, or they cannot mint (MINT_FORBIDDEN).
  2. The member belongs to the team the key is for (UNIT_NOT_A_MEMBER otherwise). Their role in the team does not matter.
  3. The team has an approved binding to the endpoint that serves the model the member asks for, and the member's clearance meets that endpoint's and that binding's floors.
  4. A member who works in two teams has two keys.
  5. When a member leaves a team or the organisation, or is suspended, their keys for that team (or all of their keys) are revoked automatically. The next call with one of those keys answers 401, or within 60 seconds if the gateway's cached check could not be dropped (section 4.4). If the removal or suspension answers unavailable with the message MEMBER_API_KEY_CACHE_UNAVAILABLE: the member's API keys could not be revoked because the API key cache is unreachable, so nothing was changed. Retry., nothing was changed: retry it. When their clearance is lowered, their active keys are lowered to the new clearance automatically and keep working at it (section 4.4); a listing (member_id=…) shows the new clearance. Nothing needs revoking. If the change answers unavailable with the message MEMBER_API_KEY_CACHE_UNAVAILABLE: the member's API keys could not be lowered to the new clearance because the API key cache is unreachable, so nothing was changed. Retry., nothing was changed: retry it. To revoke another member's key you must be at L4 or above in the key's team, or at L5 (section 9).
  6. When a key may have leaked, revoke it at once rather than rotating it. A 503 REVOKE_CACHE_LIVE means "retry", not "failed". A rotation that answers 503 ROTATE_CACHE_LIVE has revoked the old key and issued nothing: revoke the old key again, then mint a new one. A 403 REVOKE_FORBIDDEN means you may not revoke that key: ask its owner, an L4 member of its team or an L5 member to do it.