Provider options
Use any provider's own settings through AllModels with provider_options, from the OpenAI SDK, the ElevenLabs SDK or plain HTTP.
Every provider feature is supported through AllModels. Common settings such as model, voice, language and audio format use the standard fields of whichever API you call. For anything specific to one provider, add it to provider_options. AllModels passes those settings directly to the provider.
provider_options works with the OpenAI SDK, the ElevenLabs SDK and the native AllModels API, for text-to-speech, speech-to-text and realtime.
Text-to-speech
This example sets ElevenLabs voice settings on a text-to-speech request.
const audio = await client.audio.speech.create({
model: "elevenlabs/eleven-turbo-v2-5",
voice: "pNInz6obpgDQGcFmaJgB",
input: "Hello from AllModels.",
response_format: "mp3",
provider_options: { stability: 0.5, similarity_boost: 0.75 }
});Speech-to-text
This example turns on Deepgram smart formatting and speaker diarization.
const transcript = await client.audio.transcriptions.create({
file: createReadStream("call.wav"),
model: "deepgram/nova-3",
response_format: "verbose_json",
provider_options: { smart_format: true, diarize: true }
});Where to put provider_options
| API | Where provider_options goes |
|---|---|
| OpenAI SDK, JavaScript | In the request object, next to the standard fields |
| OpenAI SDK, Python | In extra_body |
| OpenAI realtime transcription | In the session.update event |
| ElevenLabs SDK, JavaScript | In queryParams in the request options |
| ElevenLabs SDK, Python | In additional_body_parameters in request_options |
| ElevenLabs Speech Engine | As stt.provider_options or tts.provider_options |
| Native AllModels API | As provider_options query parameters or in the request body |
The pages for each SDK show full examples: OpenAI and ElevenLabs.
Option names
Use the setting names from the provider's own API documentation. Each model page names its provider. If a standard field covers a setting, such as voice, language, speed or audio format, use the standard field.
Questions
If you have a question about a provider feature or run into a problem with one, email support@allmodels.io.
