Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

Audio

Models
AudioModel = "whisper-1" | "gpt-transcribe" | "gpt-4o-transcribe" | 3 more
AudioResponseFormat = "json" | "text" | "srt" | 3 more

The format of the output, in one of these options: json, text, srt, verbose_json, vtt, or diarized_json. For gpt-4o-transcribe and gpt-4o-mini-transcribe, the only supported format is json. For gpt-4o-transcribe-diarize, the supported formats are json, text, and diarized_json, with diarized_json required to receive speaker annotations.

AudioSpeech

Turn audio into text or text into audio.

Create speech
client.audio.speech.create(body, options?): Response
POST
/audio/speech
Models
SpeechModel = "tts-1" | "tts-1-hd" | "gpt-4o-mini-tts" | "gpt-4o-mini-tts-2025-12-15"

AudioTranscriptions

Turn audio into text or text into audio.

Create transcription
client.audio.transcriptions.create(body, options?): TranscriptionCreateResponse | Stream<TranscriptionStreamEvent>
POST
/audio/transcriptions
Models
Transcription { text, languages, logprobs, usage }

Represents a transcription response returned by model, based on the provided input.

TranscriptionCreateResponse = Transcription { text, languages, logprobs, usage } | TranscriptionDiarized { duration, segments, task, 2 more } | TranscriptionVerbose { duration, language, text, 3 more }

Represents a transcription response returned by model, based on the provided input.

TranscriptionDiarized { duration, segments, task, 2 more }

Represents a diarized transcription response returned by the model, including the combined transcript and speaker-segment annotations.

TranscriptionDiarizedSegment { id, end, speaker, 3 more }

A segment of diarized transcript text with speaker metadata.

TranscriptionInclude = "logprobs"
TranscriptionLanguage { code }

A language detected in transcribed audio.

TranscriptionSegment { id, avg_logprob, compression_ratio, 7 more }
TranscriptionStreamEvent = TranscriptionTextSegmentEvent { id, end, speaker, 3 more } | TranscriptionTextDeltaEvent { delta, type, logprobs, segment_id } | TranscriptionTextDoneEvent { text, type, languages, 2 more }

Emitted when a diarized transcription returns a completed segment with speaker information. Only emitted when you create a transcription with stream set to true and response_format set to diarized_json.

TranscriptionTextDeltaEvent { delta, type, logprobs, segment_id }

Emitted when there is an additional text delta. This is also the first event emitted when the transcription starts. Only emitted when you create a transcription with the Stream parameter set to true.

TranscriptionTextDoneEvent { text, type, languages, 2 more }

Emitted when the transcription is complete. Contains the complete transcription text. Only emitted when you create a transcription with the Stream parameter set to true.

TranscriptionTextSegmentEvent { id, end, speaker, 3 more }

Emitted when a diarized transcription returns a completed segment with speaker information. Only emitted when you create a transcription with stream set to true and response_format set to diarized_json.

TranscriptionVerbose { duration, language, text, 3 more }

Represents a verbose json transcription response returned by model, based on the provided input.

TranscriptionWord { end, start, word }

AudioTranslations

Turn audio into text or text into audio.

Create translation
Deprecated
client.audio.translations.create(body, options?): TranslationCreateResponse
POST
/audio/translations
Models
Translation { text }
TranslationCreateResponse = Translation { text } | TranslationVerbose { duration, language, text, segments }
TranslationVerbose { duration, language, text, segments }

AudioVoice Consents

Turn audio into text or text into audio.

Create voice consent
client.audio.voiceConsents.create(body, options?): VoiceConsent { id, created_at, language, 2 more }
POST
/audio/voice_consents
Delete voice consent
client.audio.voiceConsents.delete(consentID, options?): VoiceConsentDeleted { id, deleted, object }
DELETE
/audio/voice_consents/{consent_id}
List voice consents
client.audio.voiceConsents.list(query?, options?): CursorPage<VoiceConsent { id, created_at, language, 2 more } >
GET
/audio/voice_consents
Retrieve voice consent
client.audio.voiceConsents.retrieve(consentID, options?): VoiceConsent { id, created_at, language, 2 more }
GET
/audio/voice_consents/{consent_id}
Update voice consent
client.audio.voiceConsents.update(consentID, body, options?): VoiceConsent { id, created_at, language, 2 more }
POST
/audio/voice_consents/{consent_id}
Models

AudioVoices

Turn audio into text or text into audio.

Create voice
client.audio.voices.create(body, options?): Voice { id, created_at, name, 3 more }
POST
/audio/voices
Delete voice
client.audio.voices.delete(voiceID, options?): VoiceDeleted { id, deleted, object }
DELETE
/audio/voices/{voice_id}
Models
Voice { id, created_at, name, 3 more }

A custom voice that can be used for audio output. Voices created from text prompts are supported only in Live.

VoiceDeleted { id, deleted, object }