# Unexpected API key usage

**URL:** <https://community.perplexity.ai/t/unexpected-api-key-usage/594>\
**Category:** Bug Reports\
**Created:** [June 26, 2025, 9:50pm UTC](https://community.perplexity.ai/t/unexpected-api-key-usage/594 "2025-06-26T21:50:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SomethingRandom](https://sea1.discourse-cdn.com/flex001/user_avatar/community.perplexity.ai/somethingrandom/32/334_2.png) [@SomethingRandom](https://community.perplexity.ai/u/SomethingRandom)\
**Post date:** [June 26, 2025, 9:50pm UTC](https://community.perplexity.ai/t/unexpected-api-key-usage/594/1 "2025-06-26T21:50:19Z")

</div>

## 🐛 Describe the Bug

Starting June 18th, there were API charges of $27 per day.

Before that, API keys were not used.

## ✅ Expected Behavior

Not to be charged for API calls that were not issued.

## ❌ Actual Behavior

Was charged 27 / day. I disabled auto pay.

## 🔄 Steps to Reproduce

I don’t know why this happened, so I cannot replicate it.

 ![image](https://us1.discourse-cdn.com/flex001/uploads/sonar1/original/1X/14f5a41c471430cd5c485f5b2e969b84088393b6.png)

## 📌 API Request & Response (if applicable)

## 🌍 Environment

- **API Version:** [e.g., sonar-3.1]
- **SDK (if applicable):** [e.g., Python SDK v0.5]
- **Operating System:** [e.g., MacOS, Linux, Windows]

## 📎 Logs or Screenshots (if applicable)

Add any logs or screenshots that can help debug the issue.

## 📝 Additional Context

Add any other context about the problem here.

---

<div class="post-metadata">

**Author:** ![Kesku](https://sea1.discourse-cdn.com/flex001/user_avatar/community.perplexity.ai/kesku/32/898_2.png) [@Kesku](https://community.perplexity.ai/u/Kesku)\
**Post date:** [April 7, 2026, 2:41pm UTC](https://community.perplexity.ai/t/unexpected-api-key-usage/594/2 "2026-04-07T14:41:53Z")

</div>

Hey @SomethingRandom — unexpected charges are something we take seriously. A few things to do immediately:

1. **Rotate your API key** — Go to [console.perplexity.ai](https://console.perplexity.ai), delete the current key, and generate a new one. If the charges stop, it means the old key was compromised.

2. **Check your usage dashboard** — The console shows which endpoints/models were called and when.

3. **Email api@perplexity.ai** — Reference this thread and include your account email. The billing team can investigate the charges, identify the source of the requests, and issue a refund if the usage was unauthorized.

If you had the API key stored in a public repo, a `.env` file that was committed, or any third-party service, that is likely the source of the leak. Always treat API keys like passwords.

Apologies for the delayed response.
