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

Overview

This endpoint provides text to text functionality.

Authentication

This endpoint requires authentication using a Bearer token.
Authorization
string
default:"sk-***********"
required
Your API key in the format: Bearer YOUR_API_KEY

Request Body

model
string
default:"claude-opus-4"
required
The model to use for the request
messages
array
required
Array of message objects for the conversation
stream
boolean
default:"false"
Whether to stream the response

Request Example

curl -X POST "https://gptproto.com/v1/chat/completions" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "claude-opus-4",
  "messages": [
    {
      "role": "user",
      "content": "Who are you?"
    }
  ],
  "stream": false
}'

Response

Success
200
Successful response
{
  "status": "success"
}

Error Responses

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