Unexpected API key usage

:bug: Describe the Bug

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

Before that, API keys were not used.

:white_check_mark: Expected Behavior

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

:cross_mark: Actual Behavior

Was charged 27 / day. I disabled auto pay.

:counterclockwise_arrows_button: Steps to Reproduce

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

:pushpin: API Request & Response (if applicable)

:globe_showing_europe_africa: Environment

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

:paperclip: Logs or Screenshots (if applicable)

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

:memo: Additional Context

Add any other context about the problem here.

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, 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.