airescues / grok / Grok hub

Grok by xAI

Your xAI API key leaked: shut it off, replace it, cap the spend

xAI asks you to treat API keys like passwords or credit card details. If one may be compromised, log in to the xAI console, check you are on the right team, disable or delete the key and create a new one.

Turn the key off

  1. Log in to the xAI console first and make sure you are on the right team.
  2. In the API Keys table, choose Disable key to deactivate it temporarily, or Delete key to remove it permanently.
  3. Then click Create API Key and update your applications with the new one.

When xAI spots the leak first

  • Leaked keys found by GitHub Secret Scanning are disabled by xAI, and you are notified by email.
  • Team admins can view an audit log of user interactions.
  • By default, API requests and responses are stored encrypted for 30 days for auditing in case of suspected abuse.

How far a leaked key can spend

  1. With the default invoiced billing limit of $0, xAI uses only your prepaid credits.
  2. Once the month’s invoiced amount reaches the invoiced billing limit, requests get no response until you raise the limit.
  3. Prepaid credits aren’t refunded unless the law in your region requires it.
An illustrative billing month for the xAI API: the shaded part is prepaid credits being used; a key leaks early in the month, you disable it, and at the end a marker shows where requests stop once the invoiced billing limit is reached.
With the default $0 invoiced limit only prepaid credits are spent, and requests stop at the invoiced limit. Illustration, not real data.

The key and your Grok account

  • One xAI account serves Grok and the API, but the two are billed separately.
  • Deleting that account removes your API access too.
  • One email can have several xAI accounts under different sign-in methods; you manage the sign-in methods of each at accounts.x.ai.

If the console login itself may be exposed

  • xAI emails you whenever someone logs in to your xAI account; the location in that email is only an IP-based approximation.
  • A login that wasn’t you: reset your password and clear your login sessions at accounts.x.ai.
  • Add a multi-factor authentication method, as xAI recommends for every user, and generate recovery codes on the accounts.x.ai Security page.
  • Keep those codes: xAI can’t remove or reset MFA unless you have them.
  • A third-party app reaching a «Studio» view with your Grok credentials: revoke and change those credentials.

Usage run up on a leaked key

  1. xAI API credits are non-refundable.
  2. Compromised usage generally can’t be refunded if the purchase location matches your usual location.
  3. A large invoice you don’t recognise: check the purchase date and your subscription history before disputing.
  4. For billing matters you can reply to your receipt email.
never share a key An API key is as sensitive as a password or card number — don’t paste it into a chat, an email or a site that promises to «unlock» your account. Scam sites use xAI’s name and logo.

Next for Grok

Sources — xAI help pages, checked October 2026

AIRescues explains the official ways back into your own AI account. We are not ChatGPT, Claude, Gemini, Grok or DeepSeek and cannot open any account for you.

Facts are checked against each platform’s help pages; every guide shows the month it was checked.

How we check About Responsible use