ElevenLabs API SDKs for JavaScript, Python, Ruby, Go, Java, and PHP on RunAPI.
The ElevenLabs API SDK packages JavaScript, Python, Ruby, Go, Java, and PHP clients for ElevenLabs on RunAPI. Use it for text-to-speech and dialogue generation workflows when your app needs typed request builders, predictable task polling, file upload helpers, account helpers, and consistent RunAPI errors.
ElevenLabs is listed in the RunAPI model catalog at https://runapi.ai/models/elevenlabs. Active variant pages below carry pricing, rate-limit, and commercial-usage details. The public elevenlabs-sdk repository groups the non-PHP language packages, examples, CI, and release tags for this model. The PHP package is released from a split Composer repository.
Retired sound effects and transcription
sound-effect-v2 and speech-to-text were retired on 2026-10-14. Valid new requests return HTTP 410 before task creation or balance deduction. Neither old ID maps to a replacement. Existing tasks remain queryable with textToSound.get(id) and speechToText.get(id).
Audio Isolation retirement
Audio Isolation was retired on 2026-10-09. New isolate_audio requests return HTTP 410 before a task is created or any balance is deducted. The model name audio-isolation does not map to another model. Existing isolation task IDs remain queryable through the SDK task-status lookup.
Install
npm install @runapi.ai/elevenlabs
pip install runapi-elevenlabs
gem install runapi-elevenlabs
go get github.com/runapi-ai/elevenlabs-sdk/go@latestGradle:
dependencies {
implementation("ai.runapi:runapi-elevenlabs:0.2.0")
}Maven:
<dependency>
<groupId>ai.runapi</groupId>
<artifactId>runapi-elevenlabs</artifactId>
<version>0.2.0</version>
</dependency>Use the Java BOM when installing multiple RunAPI Java modules:
dependencies {
implementation(platform("ai.runapi:runapi-bom:0.12.0"))
implementation("ai.runapi:runapi-elevenlabs")
}The PHP package is published from the split Composer repository as runapi-ai/elevenlabs; see https://github.com/runapi-ai/elevenlabs-php for PHP install and examples.
What you can build
- Build apps, agent workflows, batch jobs, and production services around ElevenLabs requests.
- Install only the language package your app needs while keeping one model-specific repository for docs and releases.
- Use
createfor submit-only jobs,getfor status lookup, andrunfor submit-and-poll scripts. - Upload local files, URL files, or base64 files through shared RunAPI file helpers.
- Handle validation, authentication, rate limits, insufficient credits, task failures, and polling timeouts through RunAPI SDK errors.
Java quick start
import ai.runapi.elevenlabs.ElevenLabsClient;
import ai.runapi.elevenlabs.types.TextToSpeechParams;
import ai.runapi.elevenlabs.types.CompletedTextToSpeechResponse;
import ai.runapi.elevenlabs.types.TextToSpeechModel;
ElevenLabsClient client = ElevenLabsClient.builder()
.apiKey(System.getenv("RUNAPI_API_KEY"))
.build();
CompletedTextToSpeechResponse result = client.textToSpeech().run(
TextToSpeechParams.builder()
.model(TextToSpeechModel.TEXT_TO_SPEECH_TURBO_V2_5)
.text("Narrate this sentence in a warm studio voice")
.build()
);Java packages target Java 8 bytecode and are tested on Java 8, 11, 17, and 21. Each model artifact depends on ai.runapi:runapi-core, so application code normally installs only ai.runapi:runapi-elevenlabs.
Task lifecycle
Most media endpoints are asynchronous. create() submits a task and returns its id, get(id) fetches the latest task state, and run(params) creates the task and polls until it reaches a terminal state. In web request handlers, prefer create() plus webhook or later get() polling so the server does not hold a worker open.
Repository layout
-
js/publishes@runapi.ai/elevenlabs. -
python/publishesrunapi-elevenlabs. -
ruby/publishesrunapi-elevenlabs. -
go/publishesgithub.com/runapi-ai/elevenlabs-sdk/go. -
java/publishesai.runapi:runapi-elevenlabsand usesai.runapi:runapi-core.
Public links
- Model page: https://runapi.ai/models/elevenlabs
- SDK docs: https://runapi.ai/docs/resources/sdks
- Product docs: https://runapi.ai/docs/api/elevenlabs/text-to-speech
- SDK repository: https://github.com/runapi-ai/elevenlabs-sdk
- PHP package repository: https://github.com/runapi-ai/elevenlabs-php
- Skill repository: https://github.com/runapi-ai/elevenlabs
- Provider comparison: https://runapi.ai/providers/elevenlabs
- Full catalog: https://runapi.ai/models
Pricing and variants
Use the most specific ElevenLabs variant page for pricing, rate limits, and commercial usage:
- Turbo v2.5 text to speech
- Multilingual v2 text to speech
- Dialogue v3
- Sound effects v2 (retired; historical reference)
- Speech to text (retired; historical reference)
- Audio isolation (retired; historical reference)
Default pricing link for the ElevenLabs SDK: https://runapi.ai/models/elevenlabs/text-to-speech-turbo-v2.5
File storage
RunAPI-generated file URLs are temporary. Download and store generated images, videos, audio, or other files in your own durable storage within 7 days; do not treat returned URLs as long-term assets.
FAQ
Which package should I install for ElevenLabs work?
Install the model package for your language: @runapi.ai/elevenlabs on npm, runapi-elevenlabs on PyPI, runapi-elevenlabs on RubyGems, github.com/runapi-ai/elevenlabs-sdk/go, ai.runapi:runapi-elevenlabs on Maven Central, or runapi-ai/elevenlabs on Packagist. Install core SDK packages only when you are building shared SDK infrastructure.
Where should public links point?
Primary ElevenLabs links point to https://runapi.ai/models/elevenlabs. Pricing and usage-policy links point to variant pages such as https://runapi.ai/models/elevenlabs/text-to-speech-turbo-v2.5. Provider comparisons point to https://runapi.ai/providers/elevenlabs, and broad browsing points to https://runapi.ai/models.
License
Licensed under the Apache License, Version 2.0.