API reference
Usage limits
Monthly and total usage counters vs subscription tier limits.
Get usage and limits
GET/api/v1/usage-limits
API key or token
Retrieve the user's usage statistics and monthly usage limits.
Parameters
| Name | Type | Description |
|---|---|---|
month | string |
Example request
curl "https://api.cognichem.com/api/v1/usage-limits" \
-H "X-Api-Key: $COGNICHEM_API_KEY"from cognichem_client import CogniChem
client = CogniChem.from_env()
result = client.usage.limits()
print(result)Python SDK pip install cognichem-client (1.1 or later). from_env() reads COGNICHEM_API_KEY.
Responses
Successful Response · application/json · GetUsageLimitsResponse
| Field | Type | Description |
|---|---|---|
usage_limitsrequired | object | A dictionary containing the user's usage limits. |
Errors are RFC 7807 problem details (application/problem+json) with status, title, detail, request_id, and a retryability hint (validation, auth, quota, conflict, upstream, timeout, or terminal). Handling errors
| Status | When |
|---|---|
400 | Invalid input or business rule violation. |
401 | Missing or invalid credentials. |
402 | Wallet cannot cover the Assistant turn hold. |
403 | Authenticated but not allowed to access the resource. |
404 | Resource not found or not owned by the user. |
409 | Conflict (e.g. idempotency key reuse with a different body). |
413 | Request body or workflow spec exceeds size caps. |
422 | Request body or query failed validation. |
429 | Rate limit exceeded. |
500 | Unexpected server error. |
503 | Dependency temporarily unavailable. |