Appearance
Account & Usage API
Get account information and usage statistics.
Get Account
Retrieve your account details and subscription information.
http
GET /api/v1/accountResponse
json
{
"id": "acct_123",
"name": "My Company",
"email": "admin@mycompany.com",
"plan": {
"name": "Pro",
"limits": {
"prompts": 100,
"optimizationsPerMonth": 50,
"conversationsPerMonth": 10000
}
},
"createdAt": "2024-06-15T10:00:00Z"
}Get Usage
Retrieve current usage statistics for the billing period.
http
GET /api/v1/usageResponse
json
{
"period": {
"start": "2025-01-01T00:00:00Z",
"end": "2025-01-31T23:59:59Z"
},
"prompts": {
"used": 23,
"limit": 100
},
"optimizations": {
"used": 12,
"limit": 50,
"running": 2
},
"conversations": {
"used": 1547,
"limit": 10000
},
"tokens": {
"used": 1250000,
"limit": null
}
}Usage Fields
| Field | Description |
|---|---|
prompts.used | Active prompts count |
prompts.limit | Max prompts allowed |
optimizations.used | Optimizations run this period |
optimizations.limit | Max optimizations per period |
optimizations.running | Currently running optimizations |
conversations.used | Conversations logged this period |
conversations.limit | Max conversations per period |
tokens.used | LLM tokens consumed |
tokens.limit | Token limit (null = unlimited) |
Plan Limits
| Plan | Prompts | Optimizations/mo | Conversations/mo | Rate Limit |
|---|---|---|---|---|
| Free | 5 | 10 | 500 | 60/min |
| Pro | 100 | 50 | 10,000 | 300/min |
| Enterprise | Custom | Custom | Custom | Custom |
SDK Usage
typescript
// Get account info
const account = await converra.account.get();
console.log('Plan:', account.plan.name);
// Get usage stats
const usage = await converra.usage.get();
console.log('Optimizations:', `${usage.optimizations.used}/${usage.optimizations.limit}`);
// Check if approaching limits
if (usage.conversations.used > usage.conversations.limit * 0.9) {
console.warn('Approaching conversation limit');
}Error Responses
Limit Exceeded
json
{
"error": {
"code": "LIMIT_EXCEEDED",
"message": "Monthly optimization limit reached",
"details": {
"limit": 50,
"used": 50,
"resetAt": "2025-02-01T00:00:00Z"
}
}
}Status: 429 Too Many Requests
Related
- Settings - Configure account settings
- Authentication - Rate limits and API keys
