Overview
This endpoint provides chat mode functionality.
Authentication
This endpoint requires authentication using a Bearer token.
Authorization
string
default:"sk-***********"
required
Your API key in the format: YOUR_API_KEY
Request Body
model
string
default:"sora-2"
required
The model to use for the request
Array of message objects for the conversation
- role:user,The role of the message.
- role:assistant,The role of the message.
- role:system,The role of the message.
- type:text,The positive prompt for the generation.
- type:image_url,Optional image reference that guides generation.
Whether to stream the response
Request Example
curl -X POST "https://gptproto.com/v1/chat/completions" \
-H "Authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "sora-2",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "video of cow and horse dancing"
}
]
}
],
"stream": true
}'
Response
Error Responses
{
"error": {
"message": "Invalid signature",
"type": "401"
}
}