curl --request POST \
--url https://platform.ai.gloo.com/ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "us.meta.llama3-3-70b-instruct-v1:0",
"messages": [
{
"role": "user",
"content": "Hello!"
}
],
"max_tokens": 1024,
"stream": false,
"temperature": 0.7,
"tools": [],
"tool_choice": "none"
}'
{
"id": "chatcmpl-d7007d2f",
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"message": {
"content": "Hello. It's nice to meet you. Is there something I can help you with or would you like to chat?",
"refusal": null,
"role": "assistant",
"annotations": null,
"audio": null,
"function_call": null,
"tool_calls": null
}
}
],
"created": 1752600200,
"model": "us.meta.llama3-3-70b-instruct-v1:0",
"object": "chat.completion",
"service_tier": null,
"system_fingerprint": "fp",
"usage": {
"completion_tokens": 25,
"prompt_tokens": 1707,
"total_tokens": 1732,
"completion_tokens_details": null,
"prompt_tokens_details": null
}
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Non-streaming successful response
The response is of type object
.
curl --request POST \
--url https://platform.ai.gloo.com/ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "us.meta.llama3-3-70b-instruct-v1:0",
"messages": [
{
"role": "user",
"content": "Hello!"
}
],
"max_tokens": 1024,
"stream": false,
"temperature": 0.7,
"tools": [],
"tool_choice": "none"
}'
{
"id": "chatcmpl-d7007d2f",
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"message": {
"content": "Hello. It's nice to meet you. Is there something I can help you with or would you like to chat?",
"refusal": null,
"role": "assistant",
"annotations": null,
"audio": null,
"function_call": null,
"tool_calls": null
}
}
],
"created": 1752600200,
"model": "us.meta.llama3-3-70b-instruct-v1:0",
"object": "chat.completion",
"service_tier": null,
"system_fingerprint": "fp",
"usage": {
"completion_tokens": 25,
"prompt_tokens": 1707,
"total_tokens": 1732,
"completion_tokens_details": null,
"prompt_tokens_details": null
}
}