Skip to main content
POST
/
v1
/
chat
/
completions
sora-2 (text to video)
curl --request POST \
  --url https://api.example.com/v1/chat/completions
This endpoint provides chat mode functionality.
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
}'
{
  "error": {
    "message": "Invalid signature",
    "type": "401"
  }
}

Parameters

ParameterTypeRequiredDefaultDescription
modelstring✅ Yessora-2The model to use for the request. sora-2
messagesarray✅ Yes-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.
contentarray✅ Yes-text , image_url
textstring✅ Yes-* type:text,The positive prompt for the generation. * type:image_url,Optional image reference that guides generation.
image_urlobject✅ Yes-* type:image_url,The URL of the image to use for the generation.
streamboolean❌ NofalseWhether to stream the response