---
stable_id: skills/skills-sh-elevenlabs-skills-text-to-speech
type: skills
title: skills-sh-elevenlabs-skills-text-to-speech
summary: >-
  # Installation

  ## JavaScript / TypeScript

  ```bash

  npm install @elevenlabs/elevenlabs-js

  ```

  > **Important:** Always use `@elevenlabs/elevenlabs-js`. The old `elevenlabs`
  npm package (v1.x) is deprecated and should not be used.

  ```javascript

  import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";

  // Option 1: Environment variable (recommended)

  // Set ELEVENLABS_API_KEY in your environment
tags:
  - skills-sh
  - skills-sh-all-time
source_url: https://raw.githubusercontent.com/elevenlabs/skills/HEAD/text-to-speech/references/installation.md
license: ""
upstream_ref: https://skills.sh/elevenlabs/skills/text-to-speech
github_stars: null
github_forks: null
github_is_organization: null
retrieved_at: 2026-06-11T08:32:03.799Z
content_sha256: 22b2794655c2c30986771476f6a261b33e61e5e6b6fd784023a2c2d52eb63588
---
