OpenAI format
GET
/v1/realtime
package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://api.mirapi.ai/v1/realtime?model=gpt-4o-realtime-preview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}const url = 'https://api.mirapi.ai/v1/realtime?model=gpt-4o-realtime-preview';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.mirapi.ai/v1/realtime?model=gpt-4o-realtime-preview' \ --header 'Authorization: Bearer <token>'Opens a WebSocket connection for realtime conversation.
Note: this is a WebSocket endpoint — connect with the WebSocket protocol.
Example connection URL: wss://api.example.com/v1/realtime?model=gpt-4o-realtime
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”model
string
Example
gpt-4o-realtime-previewModel to use
Responses
Section titled “Responses”WebSocket protocol switch
Bad request
Media typeapplication/json
object
error
object
message
Error message
string
type
Error type
string
param
Related parameter
string
code
Error code
string
Examplegenerated
{ "error": { "message": "example", "type": "example", "param": "example", "code": "example" }}