Realtime TTS-2 is live. Built for realtime conversation that feels human. Read the Realtime TTS-2 announcement

Authentication

Revoke a leaked API key

Found an Inworld API key that isn't yours, or one you don't remember creating? Send it to Inworld and the key stops working. No account needed.

If you find an Inworld API key that doesn't belong to you, send it to us and we'll revoke it. Once a key is revoked it stops working, for everyone. You don't need an Inworld account to do this, and you don't need to know whose key it is.

Do the same with a key in your own workspace that you don't remember creating, or that you can't account for. You can also delete it yourself in Portal → API Keys.

Why this matters

API keys that unlock AI models are now a popular target. Attackers want them to run LLMs and other AI tools for free, while the key's owner pays the bill. Automated scanners search public code, packages, websites and logs for keys like these, so a leaked key is often found and used quickly.

A leaked key keeps working until someone revokes it. The sooner that happens, the less harm it can do.

When to revoke a key

Revoke a key when:

  • You found it somewhere public: a code repository, a package, an app, a website, a log, or a chat or forum post.
  • Someone sent it to you by mistake.
  • It's in your workspace, but you don't remember creating it or don't know what uses it.

Only send keys you want to stop working. Revoking can't be undone. Anything that still uses the key stops working too, including its owner's own apps, and so do the tokens created from it.

Send the key to Inworld

Send the key to POST /v1/credentials:revoke. The request needs no Authorization header. Holding the key is all the proof needed.

Send each key as you found it. The API accepts:

  • the Base64 credential, as Portal and the Inworld CLI give it out
  • the same value with a Basic or Bearer prefix
  • the key ID and secret joined by a colon: key_id:secret

Replace <leaked-key> below with the key you found.

cURL
curl https://api.inworld.ai/v1/credentials:revoke \
  --request POST \
  --header "Content-Type: application/json" \
  --data '{"credentials": ["<leaked-key>"]}'

Run these from a terminal or a server. Browsers can't call this API.

Limits on what you send

LimitValueIf you go over it
Keys per request1 to 100400. Split a longer list across several requests.
Length of one key1,024 charactersThe key is skipped.
Request body32 KB413. Send fewer keys per request.

The body must be one JSON object with a single field, credentials. Any other field gets a 400. A value that isn't a key in one of the forms above is skipped, and the rest of the list is still checked. The same key sent twice in one request is checked once.

What you get back

When Inworld accepts the request, it answers 202 Accepted with an empty object, {}. The answer is the same whether the key was real, already revoked, or never existed.

This is on purpose. If the answer were different for real keys, anyone could use this API to test keys they had stolen. So we don't share what we found, whose key it was, or what it was used for.

A 202 means Inworld received the keys. In rare cases a key may not be revoked, for example during a brief outage, and the answer can't tell you. Sending the same keys again later is harmless, so if a key matters, send it again after a few minutes.

Any other status means the request wasn't handled and you should send it again:

StatusWhat it meansWhat to do
400The body isn't {"credentials": [...]} with 1 to 100 keys.Fix the body and send it again.
413The body is over 32 KB.Send fewer keys per request.
429Too many requests.Wait as many seconds as the Retry-After header says, then send the request again.
503The API can't take the request right now.Wait as many seconds as the Retry-After header says, then send the request again. If there is no Retry-After header, wait a minute or more.

After a 429 or 503, some keys in the request may already be revoked. Send the whole list again. Sending a revoked key again is harmless.

Report bigger problems

If you found more than a few keys, a database or backup, or a security problem in Inworld itself, email security@inworld.ai. Tell us what you found and where. Revoke the keys with this API first, and don't paste working keys into the email.

If one of your keys stops working

If a key in your workspace stops working and you didn't delete it, someone may have revoked it after finding it somewhere it shouldn't be. Treat the key as leaked:

  1. Create a new key and update the apps that used the old one.
  2. Find out where the old key leaked, and remove it from there.
  3. Check your usage for activity you don't recognize.
A revoked key can't be brought back. Create a new key instead.

Keep your keys safe

  • Keep API keys on your servers. Never put them in apps, browser code, or public repositories. Security best practices shows safe ways to call Inworld from clients.
  • Use a separate key for each environment and integration, so revoking one breaks less. See Managing keys.
  • Rotate keys regularly: create a new key, switch your apps to it, then delete the old one. Rotate right away if a key may have leaked.
  • Give browsers and mobile apps one-time tokens instead of keys. A one-time token works once and expires in minutes.