---
title: "Usage Api Token"
method: GET
path: "/payment/usage/{api_token}"
tags: ["Billing"]
---

# Usage Api Token

`GET /payment/usage/{api_token}`

## Path parameters

- `api_token` string, required

## Query parameters

- `from` string, required — start of period in YYYY.MM, current(-N), unix_timestamp (in seconds, UTC) format
- `to` string, nullable — end of period (if missing a single month marked by from is return), same format as from

## Cookies

- `session` unknown

## Response `200`

Successful Response

- UsageOut
  - `months` UsageMonth[], required
    - `period` string, required — YYYY.MM formatted period
    - `interval` TimeInterval, required — Inclusive, in ms
      - `fr` integer
      - `to` integer
    - `items` UsageItem[], required
      - `model` ModelMeta, required
        - `provider` string, required
        - `model_name` string, required
        - `task` string, required
        - `plan_id` string, nullable
        - `private` boolean
        - `contract` string, nullable — bare-metal contract description, shown like on invoices
      - `units` integer, required — billed seconds or tokens
      - `rate` number, required — rate in cents/sec or cents per token
      - `cost` integer, required — model cost in cents
      - `pricing_type` string, required — pricing type
      - `interval` TimeInterval, required — Inclusive, in ms
        - `fr` integer
        - `to` integer
      - `discount` DiscountMeta
        - `name` string, required
        - `description` string, nullable — description of the discount, only for display purposes
    - `total_cost` integer, required — total cost for all items in cents
    - `invoice_id` string — Stripe Invoice ID, or EMPTY|NOT_FINAL
  - `initial_month` string, required — The first month for this account

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/deepinfra/apis/deepinfra-api.md) · [All operations](https://skmtc.net/deepinfra/apis/deepinfra-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/deepinfra/deepinfra-api/versions/51b817b3f80f/schema)
