API Documentation
Chat Completion Endpoint
Follows the exact schema as OpenAI’s chat completion API. llmOS is still in alpha so every user has 500M tokens per month and can do 100 request per minute.
POST
/
v1
/
chat
/
completions
NB!
Required to fill in ‘content’ and ‘role’ under ‘body’ -> ‘messages’.
Authorization
Bearer authentication header of the form Bearer ‘key’, where ‘key’ is your api key. Use test key or get yours from llmOS dashboard.
Body
ID of the model to use. [“mistral-7b-instruct”]
A list of messages comprising the conversation so far.
The maximum number of tokens to generate in the chat completion.
If set, partial message deltas will be sent, like in ChatGPT.
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.
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.
Up to 4 sequences where the API will stop generating further tokens.
Modify the likelihood of specified tokens appearing in the completion.
Number 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.
How many chat completion choices to generate for each input message.