Retrieve a budget
curl --request GET \
--url https://api.orq.ai/v2/budgets/{budget_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.orq.ai/v2/budgets/{budget_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.orq.ai/v2/budgets/{budget_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"budget": {
"budgetId": "<string>",
"limits": {
"amount": 123,
"tokenLimit": 123
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"scope": {
"workspace": {},
"project": {
"projectId": "<string>"
},
"identity": {
"identityExternalId": "<string>"
},
"apiKey": {
"apiKeyId": "<string>"
},
"provider": {
"provider": "<string>"
},
"model": {
"modelId": "<string>"
}
},
"match": {
"cel": "<string>"
},
"rateLimit": {
"requestsPerMinute": 123
},
"isActive": false,
"expiresAt": "2023-11-07T05:31:56Z",
"usage": {
"amount": 123,
"tokens": 123,
"requests": 123
},
"alerts": [
{
"thresholdPercent": 123,
"notifierIds": [
"<string>"
],
"id": "<string>"
}
]
}
}Budgets
Retrieve a budget
Retrieves the metadata for an existing budget by its unique identifier. Returns NotFound when the budget does not exist in the caller’s workspace.
GET
/
v2
/
budgets
/
{budget_id}
Retrieve a budget
curl --request GET \
--url https://api.orq.ai/v2/budgets/{budget_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.orq.ai/v2/budgets/{budget_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.orq.ai/v2/budgets/{budget_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"budget": {
"budgetId": "<string>",
"limits": {
"amount": 123,
"tokenLimit": 123
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"scope": {
"workspace": {},
"project": {
"projectId": "<string>"
},
"identity": {
"identityExternalId": "<string>"
},
"apiKey": {
"apiKeyId": "<string>"
},
"provider": {
"provider": "<string>"
},
"model": {
"modelId": "<string>"
}
},
"match": {
"cel": "<string>"
},
"rateLimit": {
"requestsPerMinute": 123
},
"isActive": false,
"expiresAt": "2023-11-07T05:31:56Z",
"usage": {
"amount": 123,
"tokens": 123,
"requests": 123
},
"alerts": [
{
"thresholdPercent": 123,
"notifierIds": [
"<string>"
],
"id": "<string>"
}
]
}
}Was this page helpful?
⌘I