Billing and usage
Operations tagged Billing and usage in the public API.
/v1/billing/subscription
Subscription billing
Subscription billing. Authenticate with a bearer API key that includes the required scope. Resources that belong to another account return 404 NOT_FOUND. Mutations accept Idempotency-Key and emit a webhook event when they succeed.
Required scopebilling:read
Example 200 response
{
"object": "billing_subscription",
"id": 1,
"plan": {
"key": "free",
"name": "Free",
"is_popular": false,
"contact_sales": false,
"price": {
"monthly": 0,
"yearly": 0
},
"purchasable": {
"monthly": false,
"yearly": false
},
"entitlements": {
"message_credits": 50,
"max_agents": 1,
"kb_bytes_per_agent": 409600,
"ai_actions_per_agent": 0,
"instructions_per_agent": 1,
"integrations_enabled": false,
"team_seats": 1,
"ai_model_selection": false
},
"features": []
},
"status": "free",
"interval": null,
"is_subscribed": false,
"is_comp": false,
"on_trial": false,
"trial_ends_at": null,
"cancel_at_period_end": false,
"ends_at": null,
"renews_at": null,
"comp_expires_at": null,
"usage": {
"credits": {
"used": 0,
"limit": 50,
"balance": 0,
"remaining": 50
},
"agents": {
"used": 1,
"limit": 1,
"extra": 0
},
"knowledge": {
"per_agent_limit": 409600,
"pool_limit": 0,
"pool_used": 0,
"extra_packs": 0
},
"seats": {
"used": 1,
"limit": 1
}
}
}curl -X GET https://api.agentency.com/v1/billing/subscription \
-H "Authorization: Bearer <YOUR_KEY>" \
-H "Content-Type: application/json"/v1/billing/plans
Plans billing
Plans billing. Authenticate with a bearer API key that includes the required scope. Resources that belong to another account return 404 NOT_FOUND. Mutations accept Idempotency-Key and emit a webhook event when they succeed.
Required scopebilling:read
curl -X GET https://api.agentency.com/v1/billing/plans \
-H "Authorization: Bearer <YOUR_KEY>" \
-H "Content-Type: application/json"/v1/billing/usage
Retrieve billing usage
Returns the account-wide usage meter for the API key owner. Same payload as GET /v1/usage.
Required scopebilling:read
curl -X GET https://api.agentency.com/v1/billing/usage \
-H "Authorization: Bearer <YOUR_KEY>" \
-H "Content-Type: application/json"/v1/billing/invoices
Invoices billing
Invoices billing. Authenticate with a bearer API key that includes the required scope. Resources that belong to another account return 404 NOT_FOUND. Mutations accept Idempotency-Key and emit a webhook event when they succeed.
Required scopebilling:read
curl -X GET https://api.agentency.com/v1/billing/invoices \
-H "Authorization: Bearer <YOUR_KEY>" \
-H "Content-Type: application/json"/v1/usage
Retrieve account-wide usage
Alias of GET /v1/billing/usage so clients that only hold a billing:read key can read the meter at a stable top-level path.
Required scopebilling:read
Example 200 response
{
"object": "billing_usage",
"id": 1,
"plan": "free",
"credits": {
"used": 0,
"limit": 50,
"balance": 0,
"remaining": 50
},
"knowledge": {
"per_agent_limit": 409600,
"pool_limit": 0,
"pool_used": 0,
"extra_packs": 0
}
}curl -X GET https://api.agentency.com/v1/usage \
-H "Authorization: Bearer <YOUR_KEY>" \
-H "Content-Type: application/json"