cURL
: "${KARTA_API_KEY:?Set your API key}"
curl --fail-with-body --get 'https://api.getkarta.ai/public/v1/billing/transactions' \
-H "Authorization: Bearer $KARTA_API_KEY" \
--data-urlencode 'start_date=2026-09-01' \
--data-urlencode 'end_date=2026-09-07'import json
import os
from urllib.parse import urlencode
from urllib.request import Request, urlopen
query = urlencode({"start_date": "2026-09-01", "end_date": "2026-09-07"})
request = Request(
f"https://api.getkarta.ai/public/v1/billing/transactions?{query}",
headers={"Authorization": f"Bearer {os.environ['KARTA_API_KEY']}"},
)
with urlopen(request, timeout=30) as response:
print(json.load(response))// Run on your server.
const { KARTA_API_KEY } = process.env;
if (!KARTA_API_KEY) throw new Error("Set your API key");
const query = new URLSearchParams({
start_date: "2026-09-01",
end_date: "2026-09-07",
});
const response = await fetch(
`https://api.getkarta.ai/public/v1/billing/transactions?${query}`,
{ headers: { "Authorization": `Bearer ${KARTA_API_KEY}` } }
);
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
console.log(await response.json());{
"transactions": [
{
"id": "123456",
"entry_type": "debit",
"amount": 1.5,
"feature": "voice",
"request_id": "example-request-001",
"created_at": "2026-09-01T10:00:00.000Z"
}
],
"pagination": {
"total": 1,
"limit": 50,
"offset": 0
}
}Billing
List transactions
List your credit and debit transactions.
GET
/
billing
/
transactions
cURL
: "${KARTA_API_KEY:?Set your API key}"
curl --fail-with-body --get 'https://api.getkarta.ai/public/v1/billing/transactions' \
-H "Authorization: Bearer $KARTA_API_KEY" \
--data-urlencode 'start_date=2026-09-01' \
--data-urlencode 'end_date=2026-09-07'import json
import os
from urllib.parse import urlencode
from urllib.request import Request, urlopen
query = urlencode({"start_date": "2026-09-01", "end_date": "2026-09-07"})
request = Request(
f"https://api.getkarta.ai/public/v1/billing/transactions?{query}",
headers={"Authorization": f"Bearer {os.environ['KARTA_API_KEY']}"},
)
with urlopen(request, timeout=30) as response:
print(json.load(response))// Run on your server.
const { KARTA_API_KEY } = process.env;
if (!KARTA_API_KEY) throw new Error("Set your API key");
const query = new URLSearchParams({
start_date: "2026-09-01",
end_date: "2026-09-07",
});
const response = await fetch(
`https://api.getkarta.ai/public/v1/billing/transactions?${query}`,
{ headers: { "Authorization": `Bearer ${KARTA_API_KEY}` } }
);
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
console.log(await response.json());{
"transactions": [
{
"id": "123456",
"entry_type": "debit",
"amount": 1.5,
"feature": "voice",
"request_id": "example-request-001",
"created_at": "2026-09-01T10:00:00.000Z"
}
],
"pagination": {
"total": 1,
"limit": 50,
"offset": 0
}
}Filter by
request_id or a date range. Results are returned newest first.
For the next page, increase offset by limit until you reach pagination.total. See the billing guide.