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": {
"budget_id": "<string>",
"scope": {
"workspace": {},
"project": {
"project_id": "<string>"
},
"identity": {
"identity_external_id": "<string>"
},
"api_key": {
"api_key_id": "<string>"
},
"provider": {
"provider": "<string>"
},
"model": {
"model_id": "<string>"
}
},
"match": {
"cel": "<string>"
},
"limits": {
"amount": 123,
"token_limit": 123
},
"rate_limit": {
"requests_per_minute": 123
},
"is_active": true,
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"usage": {
"amount": 123,
"tokens": 123,
"requests": 123
}
}
}Was this page helpful?
⌘I
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": {
"budget_id": "<string>",
"scope": {
"workspace": {},
"project": {
"project_id": "<string>"
},
"identity": {
"identity_external_id": "<string>"
},
"api_key": {
"api_key_id": "<string>"
},
"provider": {
"provider": "<string>"
},
"model": {
"model_id": "<string>"
}
},
"match": {
"cel": "<string>"
},
"limits": {
"amount": 123,
"token_limit": 123
},
"rate_limit": {
"requests_per_minute": 123
},
"is_active": true,
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"usage": {
"amount": 123,
"tokens": 123,
"requests": 123
}
}
}