Authentication
Every client request carries an API key as a bearer token:
curl -sS "https://llms.party/v1/models" \
-H "Authorization: Bearer $LLMS_PARTY_KEY"const response = await fetch('https://llms.party/v1/models', {
headers: { authorization: `Bearer ${process.env.LLMS_PARTY_KEY}` },
});
const { data } = await response.json();
console.log(data);import os
import requests
response = requests.get(
"https://llms.party/v1/models",
headers={"Authorization": f"Bearer {os.environ['LLMS_PARTY_KEY']}"},
timeout=30,
)
print(response.json()["data"])Keys are issued by your administrator. Each key is bounded in three ways:
| Bound | Meaning |
|---|---|
| Model list | The exact model groups the key may call, frozen when the key is issued. |
| Budget | A spend limit checked before each request. |
| Budget window | The window resets on its own; it is not a key expiry. |
Grants are frozen when a key is issued
A key's model access is recorded at creation time. Adding a model group does not
extend existing keys; ask for a new key. GET /v1/models is the authoritative
list for a key.
Read your balance
GET /v1/usage returns the calling key's budget, spend and model access. Use it
to show a remaining balance or explain a budget error; the fields are documented
under Usage and balance.
Try a key from this page
The playgrounds keep the key in this tab's sessionStorage and send it only to
the gateway. This panel is shared by every playground on the page.
Stored in this tab's sessionStorage and sent only to the gateway as a bearer token. It is cleared when the tab closes. Type over the field to replace the saved key.
Status codes
| Status | Meaning |
|---|---|
401 | Missing, malformed or revoked key, or key_model_access_denied for an out-of-scope group. |
403 | The path is not part of the public API. |
422 | The key is over budget, or the request failed validation. |
429 | The key or the upstream provider is rate limited. |
Rotation and revocation
Ask your administrator for a new key when one may have leaked. Revocation takes effect on the next request; there is no cache to wait out.