---
title: "Get credits burned for proxy usage"
method: POST
path: "/v1/proxy/analytics/credits-burned"
tags: ["Analytics"]
---

# Get credits burned for proxy usage

`POST /v1/proxy/analytics/credits-burned`

## Request

- Base URL: `https://api.platform.soax.com`
- URL: `https://api.platform.soax.com/v1/proxy/analytics/credits-burned`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/soax/apis/soax-api/docs/v1/proxy/analytics/credits-burned/post.ts> (a function with typed inputs; its response is checked against the schema)

Retrieve credits burned per day, broken down by tier. Each item holds one date and a `data` array whose `key` is the tier number (`"1"`, `"2"`, `"3"`) and whose `value` is the credits burned on that tier. The date range may span at most 365 days.

If the API key is restricted to specific packages, results (and any `package_ids` filter) are limited to those packages.

Requires the `proxy:analytics:read` scope.

## Request body

- CreditsRequest: Request model for credits burned breakdown analysis.
  - `from_date` string, date-time, required: Start of the query range (ISO 8601).
  - `to_date` string, date-time, required: End of the query range (ISO 8601). At most 365 days after `from_date`.
  - `package_ids` string[], nullable: Restrict results to these package IDs.

## Response `200`

Successful Response

- CreditsResponseItem[]
  - `date` string, required
  - `data` CreditsDataPoint[], required
    - `key` string, required
    - `value` number, required

## Other responses

- `400`: A parameter value or combination is invalid. Service-level validation errors use the `error` key; endpoint-level checks use `detail`. Read `detail ?? error`.
- `401`: Missing, invalid, or revoked API key.
- `403`: The API key does not carry the scope this endpoint requires.
- `422`: Validation Error
- `429`: Rate limit exceeded (5 requests/second per API key, 500 requests/minute per IP). The response includes `Retry-After` (seconds), `RateLimit-Limit`, `RateLimit-Remaining`, and `RateLimit-Reset` (Unix time) headers — wait `Retry-After` seconds and retry.

---

[API](https://skmtc.dev/soax/apis/soax-api.md) - [All operations](https://skmtc.dev/soax/apis/soax-api/llms.txt) - [OpenAPI document](https://skmtc.dev/soax/apis/soax-api/revisions/2abdaa934277?raw)
