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
enum AudioModel:
enum AudioResponseFormat:

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
HttpResponse audio().speech().create(params, requestOptions = RequestOptions.none())
POST
/audio/speech
Models
enum SpeechModel:

AudioTranscriptions

Turn audio into text or text into audio.

Create transcription
TranscriptionCreateResponse audio().transcriptions().create(params, requestOptions = RequestOptions.none())
POST
/audio/transcriptions
Models
class Transcription:

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

class TranscriptionDiarized:

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

class TranscriptionDiarizedSegment:

A segment of diarized transcript text with speaker metadata.

enum TranscriptionInclude:
class TranscriptionLanguage:

A language detected in transcribed audio.

class TranscriptionSegment:
class TranscriptionStreamEvent:
union

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.

class TranscriptionTextDeltaEvent:

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.

class TranscriptionTextDoneEvent:

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.

class TranscriptionTextSegmentEvent:

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.

class TranscriptionVerbose:

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

class TranscriptionWord:

AudioTranslations

Turn audio into text or text into audio.

Create translation
Deprecated
TranslationCreateResponse audio().translations().create(params, requestOptions = RequestOptions.none())
POST
/audio/translations
Models
class Translation:
class TranslationVerbose:

AudioVoice Consents

Turn audio into text or text into audio.

Create voice consent
VoiceConsent audio().voiceConsents().create(params, requestOptions = RequestOptions.none())
POST
/audio/voice_consents
Delete voice consent
VoiceConsentDeleted audio().voiceConsents().delete(params = VoiceConsentDeleteParams.none(), requestOptions = RequestOptions.none())
DELETE
/audio/voice_consents/{consent_id}
List voice consents
VoiceConsentListPage audio().voiceConsents().list(params = VoiceConsentListParams.none(), requestOptions = RequestOptions.none())
GET
/audio/voice_consents
Retrieve voice consent
VoiceConsent audio().voiceConsents().retrieve(params = VoiceConsentRetrieveParams.none(), requestOptions = RequestOptions.none())
GET
/audio/voice_consents/{consent_id}
Update voice consent
VoiceConsent audio().voiceConsents().update(params, requestOptions = RequestOptions.none())
POST
/audio/voice_consents/{consent_id}
Models

AudioVoices

Turn audio into text or text into audio.

Create voice
Voice audio().voices().create(params, requestOptions = RequestOptions.none())
POST
/audio/voices
Delete voice
VoiceDeleted audio().voices().delete(params = VoiceDeleteParams.none(), requestOptions = RequestOptions.none())
DELETE
/audio/voices/{voice_id}
Models
class Voice:

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

class VoiceDeleted: