Skip to main content
POST
/
ai
/
v1
/
chat
/
completions
Post completions
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
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
messages
LlmMessage · object[]
required

Messages to send to the LLM

model
string
default:us.meta.llama3-3-70b-instruct-v1:0

Model to use for generating responses

max_tokens
integer
default:1024

Max tokens to use for generating responses

Required range: x >= 1024
stream
boolean
default:false

Stream response as soon as tokens are generated by the model.

temperature
number
default:0.7

Temperature to use for generating responses

Required range: 0 <= x <= 1
tools
Tool · object[]

List of tools you want the LLM to leverage.

tool_choice
default:none

Which tool your LLM should use among the list.

Available options:
none,
auto,
required

Response

Non-streaming successful response

The response is of type object.

I