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: YOUR_API_KEY

Request Body

model
string
default:"gpt-5-mini"
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: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gpt-5-mini",
  "messages": [
    {
      "role": "user",
      "content": "Who are you?"
    }
  ],
  "stream": false
}'

Response

id
string
Unique identifier for the chat completion
object
string
Object type, always “chat.completion”
created
integer
Unix timestamp of when the chat completion was created
model
string
The model used for generating the completion
choices
array
Array of completion choices
usage
object
Token usage statistics

Error Responses

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