Documentation Index
Fetch the complete documentation index at: https://sambanova-systems.mintlify.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
SambaNova API Key
Chat prompt and parameters
chat completions request object
A list of messages comprising the conversation so far.
1[
{
"role": "user",
"content": "create a poem using palindromes"
}
]The maximum number of tokens that can be generated in the chat completion. The total length of input tokens and generated tokens is limited by the model's context length.
2048
The maximum number of tokens that can be generated in the chat completion. The total length of input tokens and generated tokens is limited by the model's context length.
2048
What sampling temperature to use, determines the degree of randomness in the response. 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. Is recommended altering this, top_p or top_k but not more than one of these.
0 <= x <= 20.7
Cumulative probability for token choices. An 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. Is recommended altering this, top_k or temperature but not more than one of these.
0 <= x <= 11
Amount limit of token choices. An alternative to sampling with temperature, the model considers the results of the first K tokens with higher probability. So 10 means only the first 10 tokens with higher probability are considered. Is recommended altering this, top_p or temperature but not more than one of these.
1 <= x <= 1005
Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. Not currently implemented; accepted for API compatibility
-2 <= x <= 2Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. Not currently implemented; accepted for API compatibility
-2 <= x <= 2If true, sampling is enabled during output generation. If false, deterministic decoding is used.
Sequences where the API will stop generating tokens. The returned text will not contain the stop sequence.
"\n"
If set, partial message deltas will be sent. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message.
Options for streaming response. Only set this when setting stream as true
Specifies that the model should produce output conforming to a given JSON schema.
{
"type": "json_schema",
"json_schema": {
"name": "User",
"description": "JSON schema for a simple user object",
"strict": false,
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the user"
},
"name": {
"type": "string",
"description": "Full name of the user"
}
},
"required": ["id", "name"]
}
}
}Value specifying the amount of reasoning the model is allowed to do, increasing it will increase the number of output reasoning tokens generated by the model, but will improve quality of the responses. allowed values are 'low', 'medium', 'high'
low, medium, high Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {"type": "function", "function": {"name": "my_function"}} forces the model to call that tool.
none, auto, required Whether to enable parallel function calling during tool use, This is not yet supported by our models.
A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.
128A dictionary of additional keyword arguments to pass into the chat template. Use this to provide extra context or parameters that the model's chat template can process. Keys must be strings; values may be any valid JSON type.
{ "enable_thinking": true }Whether 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.
An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to true if this parameter is used.
0 <= x <= 20How many completions to generate for each prompt.
Note: Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for max_tokens.
1 <= x <= 81
Modify the likelihood of specified tokens appearing in the generation. Accepts a JSON object that maps tokens (specified by their token ID in the model tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. Values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.
If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result.
Determinism is not guaranteed, and you should refer to the system_fingerprint response parameter to monitor changes in the backend.
Successful Response, Returns a ChatCompletionResponse object (non-streaming), or a stream of server-sent ChatCompletionStreamResponse object events ending with a response.completed event (when stream: true).
chat completion response returned by the model
1The Unix timestamp (in seconds) of when the chat completion was created.
A unique identifier for the chat completion.
The model used for the chat completion.
The object type, always chat.completion.
chat.completion "chat.completion"Backend configuration that the model runs with.
Usage metrics for the completion, embeddings,transcription or translation request
{
"completion_tokens": 260,
"completion_tokens_after_first_per_sec": 422.79282728043336,
"completion_tokens_after_first_per_sec_first_ten": 423.6108998455803,
"completion_tokens_after_first_per_sec_graph": 423.6108998455803,
"completion_tokens_per_sec": 314.53312043711406,
"completion_tokens_details": { "reasoning_tokens": 55 },
"end_time": 1776189309.02061,
"is_last_response": true,
"prompt_tokens": 90,
"prompt_tokens_details": { "cached_tokens": 0 },
"start_time": 1776189308.193988,
"stop_reason": "stop",
"time_to_first_token": 0.21402883529663086,
"time_to_first_token_graph": 0.2102978229522705,
"total_latency": 0.8266220092773438,
"total_tokens": 350,
"total_tokens_per_sec": 423.40996981919204
}{ "prompt_tokens": 43, "total_tokens": 393 }