Response
json
{
"id": "id",
"audio": {
"input": {
"format": {
"rate": 24000,
"type": "audio/pcm"
},
"noise_reduction": {
"type": "near_field"
},
"transcription": {
"language": "language",
"languages": [
"string"
],
"model": "whisper-1",
"prompt": "prompt"
},
"turn_detection": {
"prefix_padding_ms": 0,
"silence_duration_ms": 0,
"threshold": 0,
"type": "type"
}
},
"output": {
"format": {
"rate": 24000,
"type": "audio/pcm"
},
"speed": 0,
"voice": "ash"
}
},
"expires_at": 0,
"include": [
"item.input_audio_transcription.logprobs"
],
"instructions": "instructions",
"max_output_tokens": "inf",
"model": "model",
"object": "object",
"output_modalities": [
"text"
],
"tool_choice": "tool_choice",
"tools": [
{
"description": "description",
"name": "name",
"parameters": {},
"type": "function"
}
],
"tracing": "auto",
"turn_detection": {
"prefix_padding_ms": 0,
"silence_duration_ms": 0,
"threshold": 0,
"type": "type"
}
}Example
http
curl -X POST https://api.openai.com/v1/realtime/sessions \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-realtime",
"modalities": ["audio", "text"],
"instructions": "You are a friendly assistant."
}'