AuthorizationBearer <token>
Bearer token authentication using API keys
In: header
messagesarray<ChatMessage>
List of messages in the conversation.
stream?boolean
If true, response will be streamed.
Default
false
temperature?number
Sampling temperature to use, between 0 and 2.
Default
1
Range
0 <= value <= 2
model?string
Model to use for completion.
Default
"unli-auto"
Response Body
curl -X POST "https://api.unli.dev/v1/chat/completions" \
-H "Content-Type: application/json" \
-d '{
"stream": false,
"model": "unli-auto",
"temperature": 0.1,
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "hi gpt"
}
]
}
]
}'
{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "Hello! How can I help you today?",
"padding": "abcdefghijklmnopq",
"role": "assistant"
}
}
],
"id": "chatcmpl-C4pf0fiNNxFd6tJ2PKPH5K2t17Ahj",
"usage": {
"completion_tokens": 10,
"prompt_tokens": 10,
"prompt_tokens_details": {
"cached_tokens": 0
},
"total_tokens": 20
},
"model": "unli-auto",
"system_fingerprint": "fp_ffd5ba9d2e"
}