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

# Get Usage

> Retrieve current billing period usage

### Authorization

<ParamField header="Authorization" type="string" required>
  Bearer token. Format: `Bearer synthra_live_abc123def456`
</ParamField>

### Response

<ResponseField name="billingPeriod" type="object">
  Current billing period dates
</ResponseField>

<ResponseField name="requests" type="object">
  API request usage
</ResponseField>

<ResponseField name="tokens" type="object">
  Token usage
</ResponseField>

<ResponseField name="sessions" type="object">
  Session usage
</ResponseField>

<ResponseField name="tier" type="string">
  Current subscription tier
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url https://api.synthra.ai/v1/analytics/usage \
    --header 'Authorization: Bearer synthra_live_abc123def456'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    'https://api.synthra.ai/v1/analytics/usage',
    {
      headers: {
        'Authorization': `Bearer ${process.env.SYNTHRA_API_KEY}`
      }
    }
  );
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://api.synthra.ai/v1/analytics/usage',
      headers={
          'Authorization': f'Bearer {api_key}'
      }
  )
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "billingPeriod": {
      "start": "2024-03-01T00:00:00Z",
      "end": "2024-03-31T23:59:59Z"
    },
    "requests": {
      "used": 8473,
      "limit": 100000,
      "percentage": 8.5
    },
    "tokens": {
      "used": 184729,
      "limit": 10000000,
      "percentage": 1.8
    },
    "sessions": {
      "active": 47,
      "limit": 100,
      "percentage": 47.0
    },
    "tier": "pro"
  }
  ```
</ResponseExample>
