Skip to main content
POST
/
v1
/
chat
/
completions
Image to Video
curl --request POST \
  --url https://gptproto.com/v1/chat/completions \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "<string>",
  "messages": [
    {
      "role": "<string>",
      "content": [
        {
          "type": "<string>",
          "text": "<string>"
        }
      ]
    }
  ],
  "stream": true
}'
{
  "error": {
    "message": "Invalid signature",
    "type": "401"
  }
}

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
messages
array
required
Array of message objects for the conversation
stream
boolean
default:"true"

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.
{
  "error": {
    "message": "Invalid signature",
    "type": "401"
  }
}