Learn how to use the REST API for inference.
RedPajama-INCITE-7B-Instruct
model to find the capital of France. For the full API reference, go to API Reference.
curl
installed in your machine. Then launch your terminal and define your Together API key.
curl
Requestapi.together.xyz/v1/chat/completions
with a JSON-formatted object that contains the model
(model we want to query), messages
(content to send to the model), and additional parameters such as temperature
(randomness of the result) and max_tokens
(max number of output tokens).
output
key contains the output of the model. The choices
array contains the N-best responses from the model. In this example, the API returned one choice with the completion, “Paris”.
stream_tokens: true
.