I am trying to use the Realtime API by sending a request to the Create session endpoint, as described in the documentation. However, I am encountering the following error:
{
"message": "Unknown parameter: 'client_secret.expires_at'.",
"type": "invalid_request_error",
"param": "client_secret.expires_at",
"code": "unknown_parameter"
}
According to the documentation, it is stated that the
client_secret
parameter can be included in the request body. Below is the curl
command I used:
curl --location 'https://api.openai.com/v1/realtime/sessions' \
--header 'Authorization: Bearer $OPENAI_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-4o-mini-realtime-preview-2024-12-17",
"client_secret": {
"expires_at": {
"seconds": 60
}
}
}'