Return caller-owned evaluation runtime and LLM usage.
curl --request GET \
--url https://api.example.com/v1/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/v1/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/v1/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"ok": true
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}Usage
Get Usage
Return hourly or daily evaluation-resource and LLM-inference usage for the caller.
GET
/
v1
/
usage
Return caller-owned evaluation runtime and LLM usage.
curl --request GET \
--url https://api.example.com/v1/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/v1/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/v1/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"ok": true
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}Returns the evaluation runtime and LLM usage shown in the Droyd Usage view. The
default period is the 30 days ending when the request is made.
Use
competition_id to filter evaluation and inference usage, or model to
filter inference usage. The response includes the competitions and models used
in the selected period for building filter controls. Set bucket=hour for an
hourly series or bucket=day for a daily series; day is the default.
Evaluation usage records CPU, memory, and GPU device time consumed in Droyd
sandboxes, plus calculated Droyd sandbox runtime cost. GPU time and cost are
aggregated across chip types. unavailable_runs identifies sandbox runs whose
cost could not be calculated completely.
Authorizations
droydApiKeyBearerdroydApiKeyHeader
A Droyd API key in the Authorization Bearer slot.
Query Parameters
Available options:
hour, day Response
Successful response.
Was this page helpful?
