---
title: "Retrieve all credit consumption periods"
method: GET
path: "/consumption/periods"
tags: ["Consumption"]
---

# Retrieve all credit consumption periods

`GET /consumption/periods`

## Request

- Base URL: `https://api.sinay.ai/congestion/api/v1`
- URL: `https://api.sinay.ai/congestion/api/v1/consumption/periods`
- Auth: API key in header `API_KEY`

## Response `200`

The consumption periods

- ConsumptionPeriod[]
  - `id` string, uuid, required: Unique identifier of the consumption period
  - `credits` integer, required: Remaining credits
  - `creditsInitial` integer, required: Credits allocated at the start of the period
  - `periodStart` string, date-time, required: Start of the period
  - `periodEnd` string, date-time, required: End of the period
  - `expired` boolean, required: Whether this period has expired

## Other responses

- `401`: The authentication failed
- `500`: An error occurend on server side
- `default`: default

---

[API](https://skmtc.dev/safecube/apis/congestion-api.md) - [All operations](https://skmtc.dev/safecube/apis/congestion-api/llms.txt) - [OpenAPI document](https://skmtc.dev/safecube/apis/congestion-api/revisions/93b20569de8b?raw)
