Your usage
Narrowing it
Incremental exports
For a nightly job, keep thesince value the last run returned and pass it back next time. That gives you exactly the rows you haven’t seen, with no overlap to de-duplicate and no gap if a run is late.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Pull your CodeCobra usage into your own reporting, for chargeback or cost tracking.
curl -H "Authorization: Bearer cc_your_key_here" \
"https://codecobra.ai/api/usage"
| Parameter | What it does |
|---|---|
days | Rolling window, in days. Defaults to 30. |
since | An ISO-8601 timestamp. Returns everything from that moment on. |
project_id | Restrict to a single project. |
# Last 7 days
curl -H "Authorization: Bearer $KEY" "https://codecobra.ai/api/usage?days=7"
# Everything since a fixed point
curl -H "Authorization: Bearer $KEY" \
"https://codecobra.ai/api/usage?since=2026-05-01T00:00:00Z"
since and days, since wins and days is ignored. The response tells you which was used: since comes back as the effective lower bound, and days comes back as null whenever since was applied. Check that field rather than assuming your days took effect.since value the last run returned and pass it back next time. That gives you exactly the rows you haven’t seen, with no overlap to de-duplicate and no gap if a run is late.
curl -H "Authorization: Bearer $KEY" \
"https://codecobra.ai/api/public/usage?since=$LAST_RUN"
curl -H "Authorization: Bearer $KEY" \
"https://codecobra.ai/api/public/usage/task/$TASK_ID"
curl -H "Authorization: Bearer $KEY" \
"https://codecobra.ai/api/organizations/$ORG_ID/usage"