API Documentation
Endpoint Examples
Endpoint Examples
/v1/chat/completions
Creates a completion for the chat message
POST
/
v1
/
chat
/
completions
curl --request POST \
--url http://localhost:9000/v1/chat/completions \
--header 'Content-Type: application/json' \
--data '{
"model": "<string>",
"messages": [
{
"role": "system",
"content": "<string>"
}
],
"temperature": 1,
"top_p": 1,
"stream": false
}'
{
"id": "<string>",
"object": "chat.completion",
"created": 123,
"model": "<string>",
"choices": [
{
"index": 123,
"message": {
"role": "assistant",
"content": "<string>"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
}
}
Body
application/json
Response
200 - application/json
OK
Represents a chat completion response returned by model, based on the provided input.
curl --request POST \
--url http://localhost:9000/v1/chat/completions \
--header 'Content-Type: application/json' \
--data '{
"model": "<string>",
"messages": [
{
"role": "system",
"content": "<string>"
}
],
"temperature": 1,
"top_p": 1,
"stream": false
}'
{
"id": "<string>",
"object": "chat.completion",
"created": 123,
"model": "<string>",
"choices": [
{
"index": 123,
"message": {
"role": "assistant",
"content": "<string>"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
}
}
Assistant
Responses are generated using AI and may contain mistakes.