Authorizations
SambaNova API Key
Body
text prompt and parameters
completions request object
Prompt to send to the model.
"<|begin_of_text|><|start_header_id|>system<|end_header_id|>\nYou are a helpful assistant.<|eot_id|><|start_header_id|>user<|end_header_id|>\ncreate a poem using palindromes<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n"
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 <= 10.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.
-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.
-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
This is not yet supported by our models. 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.
This is not yet supported by our models. 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 <= 20This is not yet supported by our models. How many chat completion choices to generate for each input message.
1 <= x <= 11
This is not yet supported by our models. Modify the likelihood of specified tokens appearing in the completion.
This is not yet supported by our models.
Response
Successful Response
- Completion Response
- Completion Stream Response
ompletion 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.
| Title | Const |
|---|---|
| Object | chat.completion |
Backend configuration that the model runs with.
Usage metrics for the completion, embeddings,transcription or translation request
{
"acceptance_rate": 4.058139324188232,
"completion_tokens": 350,
"completion_tokens_after_first_per_sec": 248.09314856382406,
"completion_tokens_after_first_per_sec_first_ten": 249.67922929952655,
"completion_tokens_after_first_per_sec_graph": 452.5030493415834,
"completion_tokens_per_sec": 238.91966176995348,
"end_time": 1737583289.7345645,
"is_last_response": true,
"prompt_tokens_details": { "cached_tokens": 0 },
"prompt_tokens": 43,
"start_time": 1737583288.264706,
"time_to_first_token": 0.06312894821166992,
"total_latency": 1.4649275719174653,
"total_tokens": 393,
"total_tokens_per_sec": 268.27264878740493
}{ "prompt_tokens": 43, "total_tokens": 393 }