latestOpenAPI 3.1.02026-08-197104501.1 MB
8fbaab4fc7c5
chat/completions
Chat Completion
Follows the exact same API spec as OpenAI's Chat API https://platform.openai.com/docs/api-reference/chat
curl -X POST http://localhost:4000/v1/chat/completions
-H "Content-Type: application/json"
-H "Authorization: Bearer sk-1234"
-d '{
"model": "gpt-4o",
"messages": [
{
"role": "user",
"content": "Hello!"
}
]
}'
post/engines/{model}/chat/completions
Path parameters
modelstring nullable required
Request body
Example request
{
"messages": [
{
"role": "user",
"content": "Hello, how are you?"
}
]
}Response
Successful Response
{"stackTrail":"paths:/engines/{model}/chat/completions:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}