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

Overview

This endpoint provides text to video 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:"veo3.1"
required
The model to use for the request
messages
array
required
Prompt parameter
  • content Add “upsample” to the content parameter to enable high-resolution video
  • content Add “aspect_ratio” to the content aspect ratio. 16:9, 9:16

Request Example

curl --location --request POST 'https://gptproto.com/v1/chat/completions' \
--header 'Authorization: sk-xxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
    //Add "upsample" to the content parameter to enable high-resolution video
    "model": "veo3.1",
    "messages": [
        {
            "role": "user",
            "content": "Video of cow and horse dancing aspect_ratio 16:9"
        }
    ],
    "stream": true
}'

Error Responses

{
  "error": {
    "message": "Invalid signature",
    "type": "401"
  }
}