Skip to main content
POST
/
chat
/
completions
curl --request POST \
  --url https://http.llm.model-cluster.on-prem.clusters.yotta-uat.cluster.s9t.link/chat/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'id: <id>' \
  --data '
{
  "model": "gemma3",
  "messages": [
    {
      "role": "user",
      "content": "what is 2+2?"
    }
  ],
  "stream": true,
  "max_tokens": 1024
}
'
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1699014493,
"model": "gemma3",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "2 + 2 equals 4. This is a basic arithmetic operation where we add two numbers together."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 12,
"completion_tokens": 24,
"total_tokens": 36
}
}

Authorizations

Authorization
string
header
required

JWT token for authentication - Use your API token as the Bearer token

Headers

id
string
default:e68343f3-7d0b-4b37-af9a-b0ad2c7eefc7
required

Model UUID for the request (Gemma3 model identifier)

Body

application/json
messages
object[]
required

Array of messages in the conversation

model
enum<string>
default:gemma3
required

Model identifier for Gemma3

Available options:
gemma3
stream
boolean
default:false

Whether to stream the response

temperature
number
default:0.7

Sampling temperature (0.0 to 2.0)

Required range: 0 <= x <= 2
max_tokens
integer
default:1024

Maximum number of tokens to generate

Required range: 1 <= x <= 8192
top_p
number
default:0.95

Nucleus sampling parameter

Required range: 0 <= x <= 1
top_k
integer
default:40

Top-k sampling parameter

Required range: 1 <= x <= 100
stop
string[] | null

Sequences where the API will stop generating

frequency_penalty
number
default:0

Frequency penalty to reduce repetition

Required range: -2 <= x <= 2
presence_penalty
number
default:0

Presence penalty to encourage topic diversity

Required range: -2 <= x <= 2
repetition_penalty
number
default:1

Repetition penalty specific to Gemma models

Required range: 0.1 <= x <= 2

Response

Successful chat completion

  • Option 1
  • Option 2

Response for non-streaming chat completion

id
string

Unique identifier for the completion

Example:

"chatcmpl-abc123"

object
enum<string>

Object type

Available options:
chat.completion
Example:

"chat.completion"

created
integer

Unix timestamp of when the completion was created

Example:

1699014493

model
string

The model used for completion

Example:

"gemma3"

choices
object[]
usage
object