ElevenLabs integration

ElevenLabs API spend alerts and brakes

Costbrake reads ElevenLabs' own hourly spend per product every 5 minutes on Pro and Team, and every 2 minutes for 2 hours after a spike alert. An admin can disable a service account API key or freeze its monthly credit limit at what it has used so far, and Undo puts the key back.

You connect a service account key with just two read permissions; the brakes use a separate workspace admin key. The Free plan checks hourly with email alerts, and brakes come with Pro at $12 a month and Team at $39 a month (see pricing).

ElevenLabs at a glance

Reads
Hourly spend and credits per product from ElevenLabs usage analytics
Key
A service account key with User: Read and Workspace analytics: Read; brakes need a workspace admin key
Setup
Paste the key, or let a coding agent create the service account and key
Free plan
Checks every hour, email alerts, no brakes
Pro and Team
Checks every 5 minutes, Slack, Discord and webhook alerts, brakes
Spike checks
Every 2 minutes for 2 hours after a spike alert
Brakes
Disable service account API key, Freeze credit usage of an API key

Brakes

2 brakes for ElevenLabs

An admin picks a brake, confirms it, and can undo it later. Brakes come with Pro and Team.

  • Admin confirms

    Disable service account API key

    Disables one service account API key, so every request made with it fails until it is re-enabled; other keys keep working.

    UndoRe-enables the key with all its settings unchanged.

    Personal API keys can't be disabled through the API, so only service account keys are listed.

  • Admin confirms

    Freeze credit usage of an API key

    Sets the key's monthly credit limit to what it has already used this month, so its further paid requests fail.

    UndoRestores the key's previous credit limit, or removes the limit if it had none.

    Free calls keep working with the key.

Can you set a hard spending limit on ElevenLabs?

Per key, yes. Every user and service account API key can carry a credit quota, and ElevenLabs fails requests that incur charges once the key reaches its monthly limit. At the account level, a Pay As You Go balance pauses your service when it hits $0 with Auto Top Up off, and legacy usage based billing has a threshold for extra credits.

ControlApplies toWhat happensGap
Key credit quotaOne API keyRequests that incur charges fail once the key reaches its monthly limitSet in advance on each key
Pay As You Go balanceThe accountService pauses when the balance hits $0 and Auto Top Up is offAuto Top Up refills it
Usage based billing thresholdLegacy plans and EnterpriseCaps the extra credits used after the monthly quotaCan be set to Unlimited
Scopes and IP allowlistOne API keyLimits endpoints, and rejects other IPs with HTTP 403No dollar limit
Costbrake brakeOne service account keyDisables the key or freezes its credit limitAn admin starts it

A quota only stops a key after the credits are spent. Costbrake alerts when an hour costs over 3 times its 7-day usual and at least $5 more, so you can act sooner. How do I limit ElevenLabs API spend per key? walks through the key settings.

What Costbrake reads from ElevenLabs

Costbrake reads the workspace's usage analytics: money and credits spent per product, in hourly buckets, re-reading the last 3 hours at every check. The dollars are ElevenLabs' own fiat usage figures, your plan price spread over the credits you use.

If the key can't read workspace analytics, Costbrake tracks only the usage of the key's own user and says so when you connect. A workspace billed in another currency shows those amounts as dollars without conversion, marked as estimated. For plan prices and credits, see How does ElevenLabs pricing work for the API?.

Which ElevenLabs key does Costbrake need?

A service account API key with only two permissions: User: Read and Workspace analytics: Read. Service accounts are for multi-seat workspaces and are managed by workspace admins; on a single-seat plan, use a personal API key with the same two permissions. Workspaces with data residency in the EU, India or Singapore also pick their region.

With agent setup, a coding agent that has a workspace admin key creates a Costbrake service account and a key with those two permissions, then sends the new key without printing it.

The brakes need a workspace admin key with Service accounts: Write, which you add in the Costbrake dashboard. Only service account keys can be disabled or capped through the API, so personal keys can't be braked.

How the ElevenLabs brakes work

  1. An admin turns on the killswitch for the connection and adds the workspace admin key.
  2. Costbrake lists every service account key with the credits it used this month and its limit.
  3. The admin picks a key and a brake, then types the connection's name to confirm.
  4. Costbrake disables the key, or sets its monthly credit limit to the credits it already used.
  5. Undo re-enables the key, or restores its earlier limit, or no limit.

ElevenLabs also disables a key on its own when GitHub finds it committed to a public repository; that key shows a disable_reason of exposed_publicly and has to be rotated.

What Costbrake can't do on ElevenLabs

  • Stop spend on its own. Alerts are automatic; a brake always waits for an admin.
  • Brake personal API keys. Only service account keys can be changed through the API.
  • Stop free calls with the credit freeze.
  • Turn off Auto Top Up or change your plan.

If a key has leaked, disable it first and rotate it after: What to do in the first hour after an API key leaks.

Questions and answers

Can I set a spending limit on an ElevenLabs API key?

Yes. Every user and service account key can carry a credit quota, and ElevenLabs fails requests that incur charges once the key reaches its monthly limit. Costbrake's credit freeze sets that limit to what the key has already used this month.

Why can't Costbrake brake my personal ElevenLabs API key?

Only service account keys can be disabled or capped through the ElevenLabs API. Spend from personal keys still counts in the workspace usage Costbrake alerts on, but you change those keys in the ElevenLabs dashboard yourself.

Which permissions does the Costbrake key need on ElevenLabs?

User: Read and Workspace analytics: Read, on a service account key, or on a personal key for single-seat plans. The brakes use a second key, a workspace admin key with Service accounts: Write.

How often does Costbrake check ElevenLabs spend?

Every 5 minutes on Pro and Team, every 2 minutes for 2 hours after a spike alert, and every hour on Free. Each check re-reads the last 3 hours of ElevenLabs' hourly usage figures.

Does Costbrake stop ElevenLabs spend on its own?

No. Alerts go out automatically, but a brake only runs when an admin of your Costbrake workspace picks a key and types the connection name to confirm.

Sources

Updated

Start with 14 days of Pro, free

Catch the next ElevenLabs spike before the invoice.

14 days of Pro, then Free for 2 accounts. No card needed.