ElevenAPI quickstart
By the end of this guide you will have ElevenLabs set up in your project and can make your first text to speech request. There are two ways to get there: let your coding agent do the setup, or do it by hand.
For guides covering other capabilities — streaming, voice cloning, speech-to-text — see the Tutorials section.
Set up with your coding agent
You do not need an account or an API key before you start. Paste this into your coding agent:
The ElevenLabs CLI takes it from there and tells your agent each step. Your browser opens once so you can sign in or create an account and click Authorize. The key is saved in your project’s env file (.env.local, or .env in a Python project) and kept out of git; it is never shown in the chat. The agent then asks what you’d like to build, installs the SDK, adds the code to your app, and asks whether to send a test request.
If your agent runs somewhere your browser cannot reach, such as a remote machine over SSH or a
cloud sandbox, the CLI asks you to create a
key yourself and paste it into the env
file, then continues. The command needs Node.js for npx. Without it,
install the ElevenLabs CLI with Homebrew (macOS
and Linux) or Scoop (Windows), or update it if you already have it (brew upgrade elevenlabs,
scoop update elevenlabs), and ask your agent to run elevenlabs onboard init instead.
Set up by hand
Create an API key
Create an API key in the dashboard here, which you’ll use to securely access the API.
Store the key as a managed secret and pass it to the SDKs either as an environment variable via an .env file, or directly in your app’s configuration depending on your preference.