Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
model name
"meta-llama/Llama-2-70b-chat-hf"
conversation messages: (user,assistant,tool)*,user including one system message anywhere
whether to stream the output via SSE or return the full response
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic
0 <= x <= 2An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
x <= 1Float that represents the minimum probability for a token to be considered, relative to the probability of the most likely token. Must be in [0, 1]. Set to 0 to disable this.
0 <= x <= 1Sample from the best k (number of) tokens. 0 means off
x >= 0The maximum number of tokens to generate in the chat completion.
The total length of input tokens and generated tokens is limited by the model's context length. If explicitly set to None it will be the model's max context length minus input length or 16384, whichever is smaller.
0 <= x <= 1000000up to 16 sequences where the API will stop generating further tokens
number of sequences to return
1 <= x <= 4Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
-2 <= x <= 2Positive values penalize new tokens based on how many times they appear in the text so far, increasing the model's likelihood to talk about new topics.
-2 <= x <= 2A list of tools the model may call. Currently, only functions are supported as a tool.
Controls which (if any) function is called by the model. none means the model will not call a function and instead generates a message. auto means the model can pick between generating a message or calling a function. required means the model must call a function. defined tool means the model must call that specific tool. none is the default when no functions are present. auto is the default if functions are present.
The format of the response. Currently, only json is supported.
Alternative penalty for repetition, but multiplicative instead of additive (> 1 penalize, < 1 encourage)
0.01 <= x <= 5A unique identifier representing your end-user, which can help monitor and detect abuse. Avoid sending us any identifying information. We recommend hashing user identifiers.
Seed for random number generator. If not provided, a random seed is used. Determinism is not guaranteed.
-9223372036854776000 <= x < 18446744073709552000Whether to return log probabilities of the output tokens or not.If true, returns the log probabilities of each output token returned in the content of message.
streaming options
Constrains effort on reasoning for reasoning models. Currently supported values are none, low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Setting to none disables reasoning entirely if the model supports.
low, medium, high, none Reasoning configuration.
A key to identify prompt cache for reuse across requests. If provided, the prompt will be cached and can be reused in subsequent requests with the same key.
Chat template kwargs.
Successful Response