{"id":17946342,"url":"https://github.com/elevenlabs/elevenlabs-js","last_synced_at":"2026-03-05T12:04:25.521Z","repository":{"id":218059901,"uuid":"730770074","full_name":"elevenlabs/elevenlabs-js","owner":"elevenlabs","description":"The official JavaScript (Node) library for the ElevenLabs API.","archived":false,"fork":false,"pushed_at":"2026-02-27T21:27:49.000Z","size":7870,"stargazers_count":393,"open_issues_count":19,"forks_count":69,"subscribers_count":23,"default_branch":"main","last_synced_at":"2026-02-28T00:45:20.793Z","etag":null,"topics":["artificial-intelligence","conversational-ai","javascript","node","text-to-speech","typescript"],"latest_commit_sha":null,"homepage":"https://elevenlabs.io","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elevenlabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-12-12T16:26:11.000Z","updated_at":"2026-02-27T20:42:05.000Z","dependencies_parsed_at":"2024-01-19T14:20:16.699Z","dependency_job_id":"4dbb9ffe-8639-407a-809c-2c0edf29c9ff","html_url":"https://github.com/elevenlabs/elevenlabs-js","commit_stats":null,"previous_names":["elevenlabs/elevenlabs-js"],"tags_count":103,"template":false,"template_full_name":null,"purl":"pkg:github/elevenlabs/elevenlabs-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elevenlabs%2Felevenlabs-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elevenlabs%2Felevenlabs-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elevenlabs%2Felevenlabs-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elevenlabs%2Felevenlabs-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elevenlabs","download_url":"https://codeload.github.com/elevenlabs/elevenlabs-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elevenlabs%2Felevenlabs-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30123737,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T11:11:57.947Z","status":"ssl_error","status_checked_at":"2026-03-05T11:11:29.001Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artificial-intelligence","conversational-ai","javascript","node","text-to-speech","typescript"],"created_at":"2024-10-29T07:01:43.084Z","updated_at":"2026-03-05T12:04:25.498Z","avatar_url":"https://github.com/elevenlabs.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","Voice \u0026 Realtime Agents"],"sub_categories":[],"readme":"# ElevenLabs JS Library\n\n![LOGO](https://github.com/elevenlabs/elevenlabs-python/assets/12028621/21267d89-5e82-4e7e-9c81-caf30b237683)\n\n[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-SDK%20generated%20by%20Fern-brightgreen)](https://buildwithfern.com/?utm_source=fern-elevenlabs/elevenlabs-python/readme)\n[![Discord](https://badgen.net/badge/black/ElevenLabs/icon?icon=discord\u0026label)](https://discord.gg/elevenlabs)\n[![Twitter](https://badgen.net/badge/black/elevenlabsio/icon?icon=twitter\u0026label)](https://twitter.com/elevenlabsio)\n[![npm shield](https://img.shields.io/npm/v/elevenlabs)](https://www.npmjs.com/package/@elevenlabs/elevenlabs-js)\n\n\u003e **Note:** This is the Node.js library for ElevenLabs. For the browser SDK, visit [`@elevenlabs/client`](https://www.npmjs.com/package/@elevenlabs/client). For the React SDK, check out [`@elevenlabs/react`](https://www.npmjs.com/package/@elevenlabs/react).\n\nThe official Node SDK for [ElevenLabs](https://elevenlabs.io/). ElevenLabs brings the most compelling, rich and lifelike voices to creators and developers in just a few lines of code.\n\n## 📖 API \u0026 Docs\n\nCheck out the [HTTP API documentation](https://elevenlabs.io/docs/api-reference).\n\n## ⚙️ Install\n\n```bash\nnpm install @elevenlabs/elevenlabs-js\n# or\nyarn add @elevenlabs/elevenlabs-js\n```\n\n### Main Models\n\n1. **Eleven Multilingual v2** (`eleven_multilingual_v2`)\n    - Excels in stability, language diversity, and accent accuracy\n    - Supports 29 languages\n    - Recommended for most use cases\n\n2. **Eleven Flash v2.5** (`eleven_flash_v2_5`)\n    - Ultra-low latency\n    - Supports 32 languages\n    - Faster model, 50% lower price per character\n\n3. **Eleven Turbo v2.5** (`eleven_turbo_v2_5`)\n    - Good balance of quality and latency\n    - Ideal for developer use cases where speed is crucial\n    - Supports 32 languages\n\nFor more detailed information about these models and others, visit the [ElevenLabs Models documentation](https://elevenlabs.io/docs/models).\n\n```ts\nimport { ElevenLabsClient, play } from \"@elevenlabs/elevenlabs-js\";\n\nconst elevenlabs = new ElevenLabsClient({\n    apiKey: \"YOUR_API_KEY\", // Defaults to process.env.ELEVENLABS_API_KEY\n});\n\nconst audio = await elevenlabs.textToSpeech.convert(\"Xb7hH8MSUJpSbSDYk0k2\", {\n    text: \"Hello! 你好! Hola! नमस्ते! Bonjour! こんにちは! مرحبا! 안녕하세요! Ciao! Cześć! Привіт! வணக்கம்!\",\n    modelId: \"eleven_multilingual_v2\",\n});\n\nawait play(audio);\n```\n\n\u003cdetails\u003e \u003csummary\u003e Play \u003c/summary\u003e\n\n\u003ci\u003e Don't forget to unmute the player! \u003c/i\u003e\n\n[audio (3).webm](https://github.com/elevenlabs/elevenlabs-python/assets/12028621/778fd3ed-0a3a-4d66-8f73-faee099dfdd6)\n\n\u003c/details\u003e\n\n⚠️ elevenlabs-js requires [MPV](https://mpv.io/) and [ffmpeg](https://ffmpeg.org/) to play audio.\n\n## 🗣️ Voices\n\nList all your available voices with `search()`.\n\n```ts\nimport { ElevenLabsClient } from \"@elevenlabs/elevenlabs-js\";\n\nconst elevenlabs = new ElevenLabsClient({\n    apiKey: \"YOUR_API_KEY\", // Defaults to process.env.ELEVENLABS_API_KEY\n});\n\nconst voices = await elevenlabs.voices.search();\n```\n\nFor information about the structure of the voices output, please refer to the [official ElevenLabs API documentation for Get Voices](https://elevenlabs.io/docs/api-reference/get-voices).\n\n## 🚿 Streaming\n\nStream audio in real-time, as it's being generated.\n\n```ts\nconst audioStream = await elevenlabs.textToSpeech.stream(\"JBFqnCBsd6RMkjVDRZzb\", {\n    text: \"This is a... streaming voice\",\n    modelId: \"eleven_multilingual_v2\",\n});\n\nstream(audioStream);\n```\n\n## Retries\n\nThis Node SDK is instrumented with automatic retries with exponential backoff. A request will be\nretried as long as the request is deemed retry-able and the number of retry attempts has not grown larger\nthan the configured retry limit (default: 2).\n\nA request is deemed able to retry when any of the following HTTP status codes is returned:\n\n- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)\n- [409](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/409) (Conflict)\n- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)\n- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)\n\nUse the `maxRetries` request option to configure this behavior.\n\n```ts\nconst response = await elevenlabs.voices.search(\n    {},\n    {\n        maxRetries: 2, // Set the maximum number of retries\n    },\n);\n```\n\n## Timeouts\n\nThe SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to\nconfigure this behavior.\n\n```ts\nconst response = await elevenlabs.voices.search(\n    {},\n    {\n        timeoutInSeconds: 30, // override timeout to 30s\n    },\n);\n```\n\n## Runtime compatibility\n\nThe SDK defaults to `node-fetch` but will use the global fetch client if present. The SDK\nworks in the following runtimes:\n\nThe following runtimes are supported:\n\n- Node.js 15+\n- Vercel\n- Cloudflare Workers\n- Deno v1.25+\n- Bun 1.0+\n\n## Elevenlabs Namespace\n\nAll of the ElevenLabs models are nested within the `ElevenLabs` namespace.\n\n![Alt text](assets/namespace.png)\n\n## Languages Supported\n\nExplore [all models \u0026 languages](https://elevenlabs.io/docs/models).\n\n## Contributing\n\nWhile we value open-source contributions to this SDK, this library is generated programmatically. Additions made directly to this library would have to be moved over to our generation code, otherwise they would be overwritten upon the next generated release. Feel free to open a PR as a proof of concept, but know that we will not be able to merge it as-is. We suggest opening an issue first to discuss with us!\n\nOn the other hand, contributions to the README are always very welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felevenlabs%2Felevenlabs-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felevenlabs%2Felevenlabs-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felevenlabs%2Felevenlabs-js/lists"}