import weflayr
client = weflayr.client() # reads WEFLAYR_API_KEY
client.get_api_key_info()
const weflayr = require('weflayr');
const client = weflayr.client(); // reads WEFLAYR_API_KEY
await weflayr.api.getApiKeyInfo({
client,
throwOnError: true,
});
curl "https://app.weflayr.com/api/api-key/" \
-H "Authorization: Bearer $WEFLAYR_API_KEY"
{
"name": "Coding agent",
"scopes": ["gateway", "management"],
"expires_at": "2027-02-03T09:30:00.123456+00:00",
"rate_limit_requests_per_minute": 600,
"spend_limits": [{"amount_usd": 100.0, "every": 1, "unit": "day"}],
"created_by_user_email": "jane@acme.com",
"created_at": "2026-11-05T09:30:00.123456+00:00"
}
Project
Get API key info
Get the scopes, expiry date, limits, creator and creation date of the API key you are using. Works with a key of any scope.
GET
/
api
/
api-key
/
import weflayr
client = weflayr.client() # reads WEFLAYR_API_KEY
client.get_api_key_info()
const weflayr = require('weflayr');
const client = weflayr.client(); // reads WEFLAYR_API_KEY
await weflayr.api.getApiKeyInfo({
client,
throwOnError: true,
});
curl "https://app.weflayr.com/api/api-key/" \
-H "Authorization: Bearer $WEFLAYR_API_KEY"
{
"name": "Coding agent",
"scopes": ["gateway", "management"],
"expires_at": "2027-02-03T09:30:00.123456+00:00",
"rate_limit_requests_per_minute": 600,
"spend_limits": [{"amount_usd": 100.0, "every": 1, "unit": "day"}],
"created_by_user_email": "jane@acme.com",
"created_at": "2026-11-05T09:30:00.123456+00:00"
}
This route takes no parameters. Use it to check that a key has the scope a task needs before using it.
import weflayr
client = weflayr.client() # reads WEFLAYR_API_KEY
client.get_api_key_info()
const weflayr = require('weflayr');
const client = weflayr.client(); // reads WEFLAYR_API_KEY
await weflayr.api.getApiKeyInfo({
client,
throwOnError: true,
});
curl "https://app.weflayr.com/api/api-key/" \
-H "Authorization: Bearer $WEFLAYR_API_KEY"
{
"name": "Coding agent",
"scopes": ["gateway", "management"],
"expires_at": "2027-02-03T09:30:00.123456+00:00",
"rate_limit_requests_per_minute": 600,
"spend_limits": [{"amount_usd": 100.0, "every": 1, "unit": "day"}],
"created_by_user_email": "jane@acme.com",
"created_at": "2026-11-05T09:30:00.123456+00:00"
}
| Field | Description |
|---|---|
scopes | gateway, management, or both |
expires_at | When the key stops working, null if it never expires |
rate_limit_requests_per_minute | Cap on the key’s gateway calls, null if none |
spend_limits | Caps on the key’s gateway spend: at most amount_usd every every units (hour, day or month) |
created_by_user_email | Who created the key, null if unknown |