Home / Docs / API reference
/v1/management/keys
GET /v1/management/keys
Authentication relay key (bearer)
Shape: untyped. This endpoint is used by the massrelay app; its request and response are not documented yet.
Example request
curl
curl https://api.massrelay.ai/v1/management/keys \
-H "Authorization: Bearer $RELAY_KEY"Python
import os, requests
r = requests.get(
"https://api.massrelay.ai/v1/management/keys",
headers={"Authorization": f"Bearer {os.environ['RELAY_KEY']}"},
)
r.raise_for_status()
print(r.json())TypeScript
const r = await fetch("https://api.massrelay.ai/v1/management/keys", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.RELAY_KEY}` },
});
if (!r.ok) throw new Error(`${r.status} ${await r.text()}`);
console.log(await r.json());Common errors
401invalid_api_key403insufficient_scope429over the request rate; read Retry-After
POST /v1/management/keys
Authentication relay key (bearer)
Shape: untyped. This endpoint is used by the massrelay app; its request and response are not documented yet.
Example request
curl
curl -X POST https://api.massrelay.ai/v1/management/keys \
-H "Authorization: Bearer $RELAY_KEY"Python
import os, requests
r = requests.post(
"https://api.massrelay.ai/v1/management/keys",
headers={"Authorization": f"Bearer {os.environ['RELAY_KEY']}"},
)
r.raise_for_status()
print(r.json())TypeScript
const r = await fetch("https://api.massrelay.ai/v1/management/keys", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.RELAY_KEY}` },
});
if (!r.ok) throw new Error(`${r.status} ${await r.text()}`);
console.log(await r.json());Common errors
401invalid_api_key400the body is not usable402out of credit or over a budget413the body is over the limit403insufficient_scope429over the request rate; read Retry-After
Every error has the same JSON shape; see Errors and Limits.
Every answer carries a decision id; the explain endpoint returns why that model was chosen.