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

# Get My Discounts

> Get your active discounts and time remaining

```
GET /v1/discounts/my-discounts
```

Returns information about your currently active discounts, including the discount percentage and time remaining until the discount expires or rotates.

<Info>
  VoidAI offers daily rotating discounts on select models. Discounts typically rotate at 6 PM CET.
</Info>

## Response

<ResponseField name="discounts" type="array">
  Array of active discount objects.

  <Expandable title="Discount object">
    <ResponseField name="model" type="string">
      The model ID this discount applies to.
    </ResponseField>

    <ResponseField name="percentage" type="number">
      The discount percentage (e.g., 20 for 20% off).
    </ResponseField>

    <ResponseField name="expires_at" type="integer">
      Unix timestamp when this discount expires.
    </ResponseField>

    <ResponseField name="time_remaining" type="string">
      Human-readable time remaining (e.g., "5h 23m").
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="next_rotation" type="integer">
  Unix timestamp of the next discount rotation.
</ResponseField>

## Examples

### Check Your Discounts

<CodeGroup>
  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.voidai.app/v1/discounts/my-discounts",
      headers={"Authorization": "Bearer sk-voidai-your_key_here"}
  )

  data = response.json()

  if data["discounts"]:
      print("Your active discounts:")
      for discount in data["discounts"]:
          print(f"  {discount['model']}: {discount['percentage']}% off")
          print(f"    Time remaining: {discount['time_remaining']}")
  else:
      print("No active discounts")
  ```

  ```typescript TypeScript theme={null}
  const response = await fetch('https://api.voidai.app/v1/discounts/my-discounts', {
    headers: {
      'Authorization': 'Bearer sk-voidai-your_key_here'
    }
  });

  const data = await response.json();

  if (data.discounts.length > 0) {
    console.log('Your active discounts:');
    for (const discount of data.discounts) {
      console.log(`  ${discount.model}: ${discount.percentage}% off`);
      console.log(`    Time remaining: ${discount.time_remaining}`);
    }
  } else {
    console.log('No active discounts');
  }
  ```

  ```bash cURL theme={null}
  curl https://api.voidai.app/v1/discounts/my-discounts \
    -H "Authorization: Bearer sk-voidai-your_key_here"
  ```
</CodeGroup>

## Response Example

```json theme={null}
{
  "discounts": [
    {
      "model": "claude-3-5-sonnet",
      "percentage": 25,
      "expires_at": 1701716400,
      "time_remaining": "5h 23m"
    },
    {
      "model": "gpt-4o",
      "percentage": 15,
      "expires_at": 1701716400,
      "time_remaining": "5h 23m"
    }
  ],
  "next_rotation": 1701716400
}
```

## No Active Discounts

```json theme={null}
{
  "discounts": [],
  "next_rotation": 1701716400
}
```

<Tip>
  Plan your high-volume workloads around your discount schedule to maximize savings!
</Tip>
