Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
A list of messages comprising the conversation so far.
The name of the model to query.<br> <br> See all of Together AI's chat models
Qwen/Qwen2.5-72B-Instruct-Turbo
, Qwen/Qwen2.5-7B-Instruct-Turbo
, meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo
, meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo
, meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo
"meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo"
The maximum number of tokens to generate.
A list of string sequences that will truncate (stop) inference text output. For example, "</s>" will stop generation as soon as the model generates the given token.
A decimal number from 0-1 that determines the degree of randomness in the response. A temperature less than 1 favors more correctness and is appropriate for question answering or summarization. A value closer to 1 introduces more randomness in the output.
A percentage (also called the nucleus parameter) that's used to dynamically adjust the number of choices for each predicted token based on the cumulative probabilities. It specifies a probability threshold below which all less likely tokens are filtered out. This technique helps maintain diversity and generate more fluent and natural-sounding text.
An integer that's used to limit the number of choices for the next predicted word or token. It specifies the maximum number of tokens to consider at each step, based on their probability of occurrence. This technique helps to speed up the generation process and can improve the quality of the generated text by focusing on the most likely options.
Defined the behavior of the API when max_tokens exceed the maximum context length of the model. When set to 'error', API will return 400 with appropriate error message. When set to 'truncate', override the max_tokens with maximum context length of the model.
truncate
, error
A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition.
If true, stream tokens as Server-Sent Events as the model generates them instead of waiting for the full model response. The stream terminates with data: [DONE]
. If false, return a single JSON object containing the results.
Integer (0 or 1) that controls whether log probabilities of generated tokens are returned. Log probabilities help assess model confidence in token predictions.
0 <= x <= 1
If true, the response will contain the prompt. Can be used with logprobs
to return prompt logprobs.
The number of completions to generate for each prompt.
1 <= x <= 128
A number between 0 and 1 that can be used as an alternative to top_p and top-k.
A number between -2.0 and 2.0 where a positive value increases the likelihood of a model talking about new topics.
A number between -2.0 and 2.0 where a positive value decreases the likelihood of repeating tokens that have already been mentioned.
Adjusts the likelihood of specific tokens appearing in the generated output.
{ "105": 21.4, "1024": -10.5 }
Seed value for reproducibility.
42
none
, auto
An object specifying the format that the model must output.
A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for.
Controls which (if any) function is called by the model. By default uses auto
, which lets the model pick between generating a message or calling a function.
"tool_name"