Monthly Usage
curl --request GET \
--url https://text.external-api.pangram.com/usage \
--header 'x-api-key: <api-key>'import requests
url = "https://text.external-api.pangram.com/usage"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"month": "<string>",
"total_requests": 123,
"total_cost_usd": "<string>"
}Account APIs
Monthly Usage
Read one API key’s recorded billable request count and cost for a UTC month
GET
/
usage
Monthly Usage
curl --request GET \
--url https://text.external-api.pangram.com/usage \
--header 'x-api-key: <api-key>'import requests
url = "https://text.external-api.pangram.com/usage"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"month": "<string>",
"total_requests": 123,
"total_cost_usd": "<string>"
}Return recorded external billable usage for the calling API key, across products, for one UTC calendar month. Other keys on the same billing account have separate histories. Replacing a key does not transfer the old key’s usage history.
This read works with zero or negative balances. It does not spend credits or consume inference QPS. Responses use
Use
An unused month returns zero requests and
Cache-Control: no-store.
Query parameter
One UTC calendar month in
YYYY-MM form, such as 2026-10. Defaults to the current UTC month and includes transactions committed so far. Future months are rejected.month to select a UTC calendar month. Use the dashboard for account-wide history.
Examples
curl 'https://text.external-api.pangram.com/usage?month=2026-10' \
--header "x-api-key: $PANGRAM_API_KEY"
from pangram import Pangram
client = Pangram() # Reads PANGRAM_API_KEY.
usage = client.get_usage(month="2026-10") # Omit month for the current UTC month.
Response
{
"month": "2026-10",
"total_requests": 10,
"total_cost_usd": "0.750000"
}
"0.000000" cost. These values represent recorded credit consumption. Use /balance for the available credit balance and decimal arithmetic for USD amounts.
Read limits and errors
This route shares the independent account-read budget with balance and limits calls. RespectRetry-After on 429.
| Status | Meaning |
|---|---|
401 | Missing, malformed, revoked, inactive, or otherwise invalid key/account. |
422 | Invalid/future month or unsupported query parameter. |
429 | Account-read rate or concurrency limit; observe Retry-After. |
503 | Account lookup unavailable or timed out; retry the read later. |