> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codex.io/llms.txt
> Use this file to discover all available pages before exploring further.

# ApiUsage

> Usage for an account in its current billing period. Usage values are base-10 integer strings. ApiUsage type reference: every field and its type.

## GraphQL

```
type ApiUsage {
  unit: ApiUsageUnit!
  periodStart: Int!
  periodEnd: Int!
  used: String!
  limit: String
  remaining: String
  percentUsed: Float
  breakdown: ApiUsageBreakdown!
  updatedAt: Int
}

enum ApiUsageUnit {
  COMPUTE_UNITS
  REQUESTS
}

type ApiUsageBreakdown {
  query: String!
  mutation: String!
  subscription: String!
  webhook: String!
}
```

### Used By

**Returned by**

* [apiUsage](https://docs.codex.io/api-reference/queries/apiusage.md): Usage for the caller's account in the current billing period, compared with the plan quota. Free to call, and callable when the account is over its limit. Numbers are aggregated by the usage pipeline, not updated per request; see `updatedAt`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.