allmodels.ioDocs
API ReferenceOpenAI SDK

OpenAI SDK-compatible transcription

Transcribes an uploaded audio file with the official OpenAI JavaScript or Python SDK. Set `stream=true` only when the selected model supports streaming transcription. Use `provider_options` for provider-specific settings. You can also pass supported options directly as query parameters. If both forms set the same option, `provider_options[<name>]=<value>` takes precedence. Recognized enum and boolean option values are case-insensitive and are normalized to each provider's wire spelling; free-form values such as prompts, keyterms, and voice IDs retain their original case.

POST/oai/audio/transcriptions

Transcribes an uploaded audio file with the official OpenAI JavaScript or Python SDK. Set stream=true only when the selected model supports streaming transcription.

Use provider_options for provider-specific settings. You can also pass supported options directly as query parameters. If both forms set the same option, provider_options[<name>]=<value> takes precedence. Recognized enum and boolean option values are case-insensitive and are normalized to each provider's wire spelling; free-form values such as prompts, keyterms, and voice IDs retain their original case.

Authorization

BearerAuth
AuthorizationBearer <token>

Tenant key supplied as the Authorization Bearer token.

In: header

Query Parameters

provider_order?array<string>

Comma-separated or repeated provider IDs in preferred order. Providers not listed remain eligible.

provider_only?array<string>

Comma-separated or repeated provider IDs. Only these providers may serve the request.

provider_ignore?array<string>

Comma-separated or repeated provider IDs that must not serve the request.

allow_fallbacks?boolean

Set to false to prevent fallback to another provider. Automatic provider retries are not currently supported.

provider_options?||||||||

Provider-specific options in bracket notation, such as provider_options[encoding]=linear16. You can also pass supported options directly as query parameters. If both forms set the same option, the bracketed value takes precedence.

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

Client
Language
import { createReadStream } from "node:fs";import OpenAI from "openai";const client = new OpenAI({  apiKey: process.env.ALLMODELS_API_KEY,  baseURL: "https://api.allmodels.io/oai"});const transcript = await client.audio.transcriptions.create({  file: createReadStream("call.wav"),  model: "deepgram/nova-3",  response_format: "json"});console.log(transcript.text);
{  "text": "string",  "words": [    {      "word": "string",      "start": 0,      "end": 0    }  ],  "segments": [    {      "id": 0,      "seek": 0,      "start": 0,      "end": 0,      "text": "string",      "tokens": [        0      ],      "temperature": 0,      "avg_logprob": 0,      "compression_ratio": 0,      "no_speech_prob": 0,      "type": "string",      "speaker": "string"    }  ],  "property1": null,  "property2": null}
{  "error": {    "message": "string",    "type": "string",    "param": "string",    "code": "string"  }}
{  "error": {    "message": "string",    "type": "string",    "param": "string",    "code": "string"  }}
{  "error": {    "message": "string",    "type": "string",    "param": "string",    "code": "string"  }}
{  "error": {    "message": "string",    "type": "string",    "param": "string",    "code": "string"  }}
{  "error": {    "message": "string",    "type": "string",    "param": "string",    "code": "string"  }}
{  "error": {    "message": "string",    "type": "string",    "param": "string",    "code": "string"  }}

OpenAI SDK-compatible speech POST

Generates speech with the official OpenAI SDK. Set the client's base URL to `https://api.allmodels.io/oai` and use your AllModels API key. Use `stream_format=audio` for audio bytes or `stream_format=sse` for OpenAI speech events. Use `provider_options` for provider-specific settings. You can also pass supported options directly as query parameters. If both forms set the same option, `provider_options[<name>]=<value>` takes precedence. Recognized enum and boolean option values are case-insensitive and are normalized to each provider's wire spelling; free-form values such as prompts, keyterms, and voice IDs retain their original case.

OpenAI SDK-compatible realtime transcription GET

Streams input audio and receives OpenAI realtime transcription events. Set `intent=transcription`; use `/oai/audio/speech` to stream generated speech. Node and Python clients use Bearer authentication. Browser clients can pass `realtime` and `openai-insecure-api-key.<allmodels-key>` as WebSocket subprotocols. Send OpenAI's nested `session.update` before audio. `turn_detection: null`, `server_vad`, and `semantic_vad` translate to portable manual, acoustic, and semantic intent for the selected provider. Unsupported configurations arrive as official OpenAI `error` events. Query-level `provider_options[...]` remains the native override extension. The message-level protocol is documented at [the realtime WebSocket reference](/realtime-reference) (AsyncAPI spec: [/asyncapi.yaml](/asyncapi.yaml)).