Overview
This endpoint provides chat format functionality.
Authentication
This endpoint requires authentication using a Bearer token.
Your API key in the format: Bearer YOUR_API_KEY
Request Body
Whether to stream the response
The model to use for the request
Array of message objects for the conversation
Request Example
curl -X POST "https://gptproto.com/v1/chat/completions" \
-H "Authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"stream": false,
"model": "flux-kontext-pro",
"messages": [
{
"role": "user",
"content": "Draw me a blue cat"
}
]
}'
Response
Error Responses
{
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error",
"code": "invalid_parameters"
}
}