Exposed API key? Revoke it, then check what it did
An exposed API key works for anyone until you revoke it. Rotate to a new key, revoke the old one, then check its last use, its spend, and your jobs.

If an API key is exposed, treat it as stolen: anyone who saw it can use it until you revoke it, and deleting the commit, the chat message, or the screenshot doesn't change that. Revoke it, move your integration to a new key, then check what the key did while it was out.
For a Sume key, that means creating a replacement, deploying it, confirming it with GET /v1/me, and revoking the exposed key in the dashboard, then reviewing the key's last use, its spend, and your jobs and runs. Sume facts come from Authentication, Verifying webhooks, and Jobs and results, read on 2026-09-27, plus current API and dashboard code where noted. Routine rotation is covered in How Sume API keys work.
How do I revoke an exposed API key without breaking my app?
Sume's docs give that order, and say to rotate any key that appears in logs or chat history:
- Create the new key on the API Keys page. The dashboard reveals the full secret only when a key is created, so store it in your secret manager right away.
- Replace the old value wherever it lived, in your secret store rather than in code.
- Call
GET /v1/mewith the new key. It verifies the key and the workspace it resolves to, and returns key metadata such as id, name, prefix, and scopes, never the secret. - Revoke the exposed key. From then on it gets
401, the status Sume uses for a missing, malformed, or revoked key. Current API code caches each key lookup for up to 15 seconds by default, so the old key can keep working that long after you revoke it. - If someone is spending on the key right now, revoke first and accept a short outage in your own app.
curl https://api.sume.com/v1/me \
-H "Authorization: Bearer $SUME_API_KEY"What could someone do with my exposed key?
Spend your money. Sume keys are workspace-scoped, and the docs put it plainly: a key spends your credits, and anyone holding it can run any Format you own, up to your caps.
It can also reach your webhook signing secret: any key carrying account:read can read it from GET /v1/webhooks/signing-secret, and one carrying account:write can rotate it. Whoever holds the secret can sign a fake delivery your receiver would accept, so unless you know the exposed key lacked account:read, rotate the secret too (Webhooks, then Rotate secret). For 24 hours after a rotation Sume signs every delivery with both the new and the old secret; its docs say rotating twice inside that window retires the secret two rotations back (the leaked one) immediately, which is what makes a leak stop. Then deploy the newest secret. First make sure your receiver accepts any sume-v1= entry in the signature header: one that compares the whole header fails every delivery during the window.
How do I see what the exposed key did?
Start in the dashboard, which can tie work to a key; the API can't. Over the API, job and usage rows leave out key ids and prefixes, so there you judge by time: anything between the leak and the revocation that your own systems didn't start is suspect.
In a team workspace, do this from the account that created the exposed key (the API Keys page's Created by column). Current code shows each member only their own jobs, on the Jobs page and over the API, so jobs submitted with another member's key don't appear.
| Where to look | What it shows | Limit |
|---|---|---|
| API Keys page, Last used | The date the key last authenticated a request | Date only; current API code refreshes it at most once every 5 minutes |
| API Keys page, Monthly spend | Captured spend on that key this calendar month | Agent runs and dashboard sessions are recorded without a key |
| Usage page, API key filter | The usage events charged to that key | Keys are listed by prefix, the start of the masked secret |
| Jobs page | Each job's details name the API key prefix that submitted it | In current code, a team member sees only their own jobs |
GET /v1/jobs, GET /v1/usage | Jobs newest first (filter with status); usage rows with job_id | auth_source omits API key ids and prefixes |
GET /v1/formats/{handle}/{slug}/runs | One Format's runs, newest first | There is no cross-Format run list |
Does revoking a key stop jobs it already started?
Revoking refuses the key's next requests. Sume's docs don't describe it canceling anything already accepted, so stop unwanted work yourself, with a new key from the same account as the exposed one:
- A generation job cancels with
POST /v1/jobs/{id}/cancelonly before generation starts. After that the API answers409 job_generation_already_startedand the job runs to completion, so liststatus=queuedjobs first. - A Format run cancels with
POST /v1/format-runs/{run_id}/cancel. Generation it completed before the cancel is still billed. - Routes and responses for each cancel are in How to cancel an AI video generation job or run.
How do I keep API keys from leaking again?
Follow the custody rules in How Sume API keys work: keys stay on servers and in secret stores, never in frontend JavaScript, mobile apps, support tickets, or screenshots. Two habits also limit the next leak:
- Don't paste keys into chat; Sume's MCP quickstart says the same.
- Give each service its own key, so one leak means one revocation and the dashboard's per-key records point at one caller. Can multiple people use the same API key? covers what separate keys do and don't split.
Sources
Related posts
More in Developers
- Free webhook tester: see what a webhook sends before coding
A free webhook tester gives you a public HTTPS URL and shows each request's headers and body. Point Sume's Send test at it to see a signed payload.
- How to automate AI video generation from code
To automate AI video generation, save a working brief as a recipe, start it from code per event, list or schedule, and take each video by webhook.
- How to choose an AI video generation API: 12-point checklist
Choose an AI video generation API by how it handles jobs, retries, webhooks, spend caps, failures, and outputs: a checklist with Sume's answers.
- MCP server needs authentication in Claude Code: how to fix
Claude Code flags an MCP server as needing authentication after a 401 or 403 it can't clear. How to sign in again, and when an API key fits better.
Written by Sume