import datetime
import weflayr
client = weflayr.client() # reads WEFLAYR_API_KEY
client.get_calls(
date_from=datetime.date(2026, 6, 1), date_to=datetime.date(2026, 6, 30)
)
const weflayr = require('weflayr');
const client = weflayr.client(); // reads WEFLAYR_API_KEY
await weflayr.api.getCalls({
client,
throwOnError: true,
query: { dateFrom: '2026-06-01', dateTo: '2026-06-30' },
});
curl "https://app.weflayr.com/api/calls/?date_from=2026-06-01&date_to=2026-06-30" \
-H "Authorization: Bearer $WEFLAYR_API_KEY"
{
"calls": [
{
"call_name": "summarize_profile",
"call_count": 120,
"features": ["onboarding"],
"models": ["gpt-6-luna"],
"total_cost": 1.5
}
],
"unnamed_call_count": 7,
"next_cursor": null,
"has_more": false
}
{"error": "Invalid or missing API key. Send it as \"Authorization: Bearer <your key>\"."}
{"error": "Invalid request payload.", "detail": [{"field": "date_from", "error": "Field required"}]}
Calls
Get calls
Get the call names logged over a period, with their number of calls, features, models and cost.
GET
/
api
/
calls
/
import datetime
import weflayr
client = weflayr.client() # reads WEFLAYR_API_KEY
client.get_calls(
date_from=datetime.date(2026, 6, 1), date_to=datetime.date(2026, 6, 30)
)
const weflayr = require('weflayr');
const client = weflayr.client(); // reads WEFLAYR_API_KEY
await weflayr.api.getCalls({
client,
throwOnError: true,
query: { dateFrom: '2026-06-01', dateTo: '2026-06-30' },
});
curl "https://app.weflayr.com/api/calls/?date_from=2026-06-01&date_to=2026-06-30" \
-H "Authorization: Bearer $WEFLAYR_API_KEY"
{
"calls": [
{
"call_name": "summarize_profile",
"call_count": 120,
"features": ["onboarding"],
"models": ["gpt-6-luna"],
"total_cost": 1.5
}
],
"unnamed_call_count": 7,
"next_cursor": null,
"has_more": false
}
{"error": "Invalid or missing API key. Send it as \"Authorization: Bearer <your key>\"."}
{"error": "Invalid request payload.", "detail": [{"field": "date_from", "error": "Field required"}]}
unnamed_call_count counts the calls with no call name. A model benchmark can replay any call name listed here. The calls that replay or judge a benchmark’s own answers are left out.
Set a call name with set_call_name in the Python and Node.js SDKs, or with the call_name field of an AI gateway request.
Parameters
string
required
Start of the period, inclusive.
YYYY-MM-DD.string
End of the period, inclusive.
YYYY-MM-DD. Defaults to today.integer
default:"100"
Number of call names per page. Max
1000.string
The route is paginated: pass the previous page’s
next_cursor, as is, to get the next page. has_more says whether another page exists.import datetime
import weflayr
client = weflayr.client() # reads WEFLAYR_API_KEY
client.get_calls(
date_from=datetime.date(2026, 6, 1), date_to=datetime.date(2026, 6, 30)
)
const weflayr = require('weflayr');
const client = weflayr.client(); // reads WEFLAYR_API_KEY
await weflayr.api.getCalls({
client,
throwOnError: true,
query: { dateFrom: '2026-06-01', dateTo: '2026-06-30' },
});
curl "https://app.weflayr.com/api/calls/?date_from=2026-06-01&date_to=2026-06-30" \
-H "Authorization: Bearer $WEFLAYR_API_KEY"
{
"calls": [
{
"call_name": "summarize_profile",
"call_count": 120,
"features": ["onboarding"],
"models": ["gpt-6-luna"],
"total_cost": 1.5
}
],
"unnamed_call_count": 7,
"next_cursor": null,
"has_more": false
}
{"error": "Invalid or missing API key. Send it as \"Authorization: Bearer <your key>\"."}
{"error": "Invalid request payload.", "detail": [{"field": "date_from", "error": "Field required"}]}