All skills
elevenlabs avatar

/setup-api-key

@afa823c official
by elevenlabselevenlabs/skills462 stars
74

Guides users through setting up an ElevenLabs API key for REST API and SDK workflows. Use when the user needs to configure an ElevenLabs API key or when an API or SDK request fails because a key is missing. First checks whether ELEVENLABS_API_KEY is already configured and valid, and only runs full setup when needed.

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

This session only. Nothing lands on disk.

SKILL.md

≈83 tokens always: the name and description. ≈840 when used: this file.

ElevenLabs API Key Setup

Guide the user through obtaining and configuring an ElevenLabs API key.

Workflow

Step 0: Check for an existing API key first

Before asking the user for a key, check for an existing ELEVENLABS_API_KEY:

  1. Check whether ELEVENLABS_API_KEY exists in the current environment. If it does, use that value for this initial check.
  2. Only if it is not in the environment, check .env for ELEVENLABS_API_KEY=<value>.
  3. Do not print, quote, or repeat the key. If you mention it, redact it.
  4. If an existing key is found, validate it:
    GET https://api.elevenlabs.io/v1/user
    Header: xi-api-key: <existing-api-key>
  5. If existing key validation succeeds:
    • Tell the user ElevenLabs is already configured and working
    • Skip the setup flow
    • Ask whether they want to replace/rotate the key; if not, stop
  6. If existing key validation fails:
    • Tell the user the existing key appears invalid or expired
    • Continue to Step 1

Step 1: Request the API key

Tell the user:

To set up ElevenLabs, open the API keys page: https://elevenlabs.io/app/settings/api-keys

(Need an account? Create one at https://elevenlabs.io/app/sign-up first)

If you don't have an API key yet:

  1. Click "Create key"
  2. Name it (or use the default)
  3. Set permission for your key. If you provide a key with "User" permission set to "Read" this skill will automatically verify if your key works
  4. Click "Create key" to confirm
  5. Copy the key immediately - it's only shown once!

Do not paste the key into this chat. Instead, copy/paste it into your local .env file:

ELEVENLABS_API_KEY=your-api-key

If .env already has an ELEVENLABS_API_KEY=... line, replace that line. Tell me when you've saved it, without sharing the key.

Then wait for the user to confirm that the key is saved locally.

Step 2: Validate and configure

After the user says the key is saved:

  1. Re-check both .env and the current environment for ELEVENLABS_API_KEY, but treat .env as the source of truth for this step.
  2. If .env contains a value, validate that value even when the current environment also has a different ELEVENLABS_API_KEY.
  3. If .env does not contain the key:
    • Tell the user .env does not appear to contain ELEVENLABS_API_KEY.
    • Show the expected line again.
    • If the current environment does contain a key, note that this step still requires saving the key in .env.
    • Remind them not to paste the key into chat.
  4. If a .env key is found, validate it:
    GET https://api.elevenlabs.io/v1/user
    Header: xi-api-key: <local-api-key>
  5. If validation fails:
    • Tell the user the local key appears invalid or expired.
    • Remind them of the API keys page.
    • Ask them to replace the .env value and tell you when it is saved.
  6. If validation succeeds, confirm:

    Done. ElevenLabs is configured and the key in .env works.

Safety Rules

  • Never ask the user to paste an API key, token, or secret into chat.
  • Never print or echo API key values from environment variables or .env.
  • Prefer .env or managed secrets over shell history for persistent local configuration.
  • For browser or client-side apps, keep ELEVENLABS_API_KEY on the server and issue short-lived tokens where applicable.

Source: SKILL.md on GitHub

No alerts16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The skill provides a secure workflow for configuring ElevenLabs API keys. it follows industry best practices by instructing users to store keys in local environment files rather than sharing them in chat, and it validates keys directly against the official ElevenLabs API.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer7mo

    1/1 file flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

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

Last checked against GitHub yesterday.

Activeupdated last month
compatibility
Requires internet access to elevenlabs.io and api.elevenlabs.io.
  • 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.