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-nano"
required
The model to use for the request
Array of message objects for the conversation
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-nano",
"messages": [
{
"role": "user",
"content": "Who are you?"
}
],
"stream": false
}'
Response
Unique identifier for the chat completion
Object type, always “chat.completion”
Unix timestamp of when the chat completion was created
The model used for generating the completion
Array of completion choices
The index of this choice in the array
The generated message
The role of the message author, always “assistant”
The content of the message (the image analysis result)
The reason the completion finished. Possible values: “stop”, “length”, “content_filter”
Token usage statistics
Number of tokens in the prompt
Number of tokens in the completion
Total number of tokens used
Error Responses
{
"error": {
"message": "Invalid signature",
"type": "401"
}
}