Index of every page on this site: llms.txt
All skills
elevenlabs avatar

/setup-api-key

@97478d1 official
by elevenlabselevenlabs/skills581 stars
98
Run it yourself

Fix or hand-configure an existing ElevenLabs API key. Use when a key stopped working (401 or invalid_api_key), when an administrator issued the key, when the user's role cannot create keys, or when the user already has a key and needs it in the right place. Checks whether ELEVENLABS_API_KEY is configured and valid, without reading it into the conversation. Not for first-time setup or adding ElevenLabs to a project (use onboarding).

Use this Skill: https://skilld.dev/gh/elevenlabs/skills/setup-api-key

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈113 tokens for metadata: the name and description. ≈838 when used: this file.

Description uses 5.6% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈451 characters, or 5.6%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

ElevenLabs API Key Setup

For a key the user already has, or one that stopped working. For adding ElevenLabs to a project from scratch, use the onboarding skill.

A key the user already has (for example from an administrator): don't sign in for a new one. Tell them to paste it after ELEVENLABS_API_KEY= in the env file of the app that uses it (.env.local, or .env in a Python project), never into this chat, and to tell you when it's done. Then check it (if check finds no key, or ElevenLabs rejects it, and offers to sign in, ask the user to check the paste instead of signing in):

npx -y @elevenlabs/cli@latest onboard check

A key that stopped working: run the same command from the app's folder. It finds the key the app would use (the shell, the env file, or a .env up the tree), checks it with ElevenLabs without printing it, and prints JSON: next is the step (spelled out in instruction; where the list below differs, follow the list), run the exact command, and say what to tell the user (tell them as written). Follow it until the key works; for a rejected key it signs the user in for a new one. What each next means:

  • run: run run. wait: show say, then run run again right away.
  • ask_user, or a fix that needs the user's shell or secrets: ask them what say says, wait for their answer, then run run, unless they said no.
  • write_code: if the app already reads ELEVENLABS_API_KEY (through the SDK or its own requests), don't change its code: after connect, run run; after check, tell the user the key works (not say) and stop. Otherwise make sure the code uses the SDK, then run run; if nothing shows what the app should do with ElevenLabs, ask the user first, and don't pick a product for them.
  • offer_test: ask the question in say; run run only if they say yes.
  • done: tell the user say.

Rules

  • Never open, print or cat the env file, and never echo ELEVENLABS_API_KEY; onboard check verifies the key for you.
  • Never ask for an API key in chat, and never accept one pasted there. If one appears, tell the user to rotate it on the API keys page.
  • Never put the key in code; the SDK reads ELEVENLABS_API_KEY.
  • Don't run the app (or its start script) or make speech to try it until the user says yes. API calls that what they asked for needs, like creating an agent, are fine. Once the code is written, run onboard check before you finish: it verifies the key and the code.
  • For browser or client-side apps, keep the key on the server and issue short-lived tokens where the product supports them.

No npx

If npx isn't available (Node.js isn't installed), install the CLI (or update it if it's already installed: brew upgrade elevenlabs, or run the installer again), then run elevenlabs onboard check instead:

  • macOS or Linux: brew install elevenlabs/tap/elevenlabs, or curl --proto '=https' --tlsv1.2 -LsSf https://github.com/elevenlabs/cli/releases/latest/download/elevenlabs-cli-installer.sh | sh
  • Windows: powershell -ExecutionPolicy ByPass -c "irm https://github.com/elevenlabs/cli/releases/latest/download/elevenlabs-cli-installer.ps1 | iex"

If elevenlabs isn't found after the installer ran, use ~/.cargo/bin/elevenlabs in its place, here and in every run the CLI gives.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts1mo5 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The skill is a configuration utility designed to guide users through setting up an ElevenLabs API key. It follows security best practices by instructing the agent to redact credentials, avoid echoing secrets in the chat, and perform validation through the official ElevenLabs API endpoint.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

  • Runlayer8mo

    1/1 file flagged

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 97478d1. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated last month
Other metadata
compatibility
Requires internet access to elevenlabs.io and api.elevenlabs.io, and Node.js for npx (or the ElevenLabs CLI installed another way).
  • MCP
  • elevenlabs
  • api-key
  • environment
  • setup
  • configuration
  • authentication

README badge

README badge for elevenlabs/skills/setup-api-key

Guides the user through obtaining and configuring an ElevenLabs API key for use with ElevenLabs MCP tools. Checks for an existing key first, validates it against the ElevenLabs API, and walks through creation and `.env` setup if needed.

Generated from the current SKILL.md.

Does this skill work without internet access?
No. The skill requires internet access to elevenlabs.io and api.elevenlabs.io to validate API keys.
What happens if I already have an API key configured?
The skill checks for an existing ELEVENLABS_API_KEY in the environment or .env file first and validates it. If valid, it confirms ElevenLabs is working and asks whether you want to replace it; if invalid or expired, it continues with setup.
Can I paste my API key directly into the chat?
No. The skill explicitly instructs you to save the key locally in your .env file and never paste secrets into chat.
Where should I store the API key?
The skill prefers .env files for local configuration and treats .env as the source of truth during validation.

Generated from the current SKILL.md. These answers refresh after source changes.