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. sora-2
Array of message objects for the conversation
type:text,The positive prompt for the generation.
type:image_url,Optional image reference that guides generation.
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"
},
{
"type": "image_url",
"image_url": {
"url": "https://filesystem.site/cdn/20250612/998IGmUiM2koBGZM3UnZeImbPBNIUL.png"
}
}
]
}
],
"stream": true
}'
Response
{
"choices": [
{
"delta": {
"content": "> ✅ Video generated successfully, [click here](https://static.aiclound.vip/sora/XXXXX83.mp4) to view video~~~\n\n",
"role": "assistant"
},
"index": 0
}
],
"created": 0,
"id": "39a5d-xxxxx",
"model": "sora-2",
"object": "chat.completion.chunk"
}
F&Q
Q: How to control the video duration?
A: Can control the duration.
you need to add a duration flag in the prompt, such as’ duration: 5 seconds’. Sora-2 supports videos of up to 15 seconds.
401 - Invalid signature
403 - Invalid Token
403 - Insufficient balance
500 - Internal server error
503 - Content policy violation
{
"error" : {
"message" : "Invalid signature" ,
"type" : "401"
}
}