Retrieve daily usage for a scope
curl --request GET \
--url https://api.writer.com/api/billing/v1/organization/{organizationId}/consumption/daily/{scope} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.writer.com/api/billing/v1/organization/{organizationId}/consumption/daily/{scope}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.writer.com/api/billing/v1/organization/{organizationId}/consumption/daily/{scope}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"currency": "USD",
"generated_at": "2026-10-20T12:00:00Z",
"days": [
{
"date": "2026-10-01",
"cost_in_cents": 95,
"total_tokens": 3600
},
{
"date": "2026-10-02",
"cost_in_cents": 0,
"total_tokens": 0
}
]
}{
"tpe": "<string>",
"errors": [
{
"key": "<string>",
"description": "<string>"
}
]
}{
"tpe": "<string>",
"errors": [
{
"key": "<string>",
"description": "<string>"
}
]
}Observability API
Retrieve daily usage for a scope
Retrieve one row per day of the month, summed across every entity in the scope. Usage that has no entity in the scope, such as usage that isn’t linked to a billing group, isn’t included. With team_id, the user and playbook scopes count only usage in that team.
GET
/
api
/
billing
/
v1
/
organization
/
{organizationId}
/
consumption
/
daily
/
{scope}
Retrieve daily usage for a scope
curl --request GET \
--url https://api.writer.com/api/billing/v1/organization/{organizationId}/consumption/daily/{scope} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.writer.com/api/billing/v1/organization/{organizationId}/consumption/daily/{scope}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.writer.com/api/billing/v1/organization/{organizationId}/consumption/daily/{scope}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"currency": "USD",
"generated_at": "2026-10-20T12:00:00Z",
"days": [
{
"date": "2026-10-01",
"cost_in_cents": 95,
"total_tokens": 3600
},
{
"date": "2026-10-02",
"cost_in_cents": 0,
"total_tokens": 0
}
]
}{
"tpe": "<string>",
"errors": [
{
"key": "<string>",
"description": "<string>"
}
]
}{
"tpe": "<string>",
"errors": [
{
"key": "<string>",
"description": "<string>"
}
]
}Use an organization API key (All teams). An existing legacy team key can read the
team, user, and playbook scopes for its own team only. See Export usage and spend for examples, pagination, and error handling.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your Writer API key. User keys can't read consumption data.
Path Parameters
Query Parameters
Response
Daily series for the scope.
Was this page helpful?