Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
current project ID
Body
ID of the model to use.
"meta-llama/Meta-Llama-3.1-70B-Instruct"
The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.
"Say this is a test"
Enable response streaming.
If set to {"include_usage": True}, usage stats will be sent with the last chunk of data
null
Max completion token count
100
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.
How many completions to generate for each prompt.
Include the log probabilities on the logprobs most likely tokens, as well the chosen tokens. So for example, if logprobs is 5, the API will return a list of the 5 most likely tokens. The API will always return the logprob of the sampled token, so there may be up to logprobs+1 elements in the response.
Echo back the prompt in addition to the completion.
Up to 4 sequences where the API will stop generating further tokens.
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.
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.
Modify the likelihood of specified tokens appearing in the completion. Accepts a json object that maps tokens (specified by their token ID in the 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. The exact effect will vary per model, but 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.
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.
To provide extra parameters.
null
The service tier to use for the request. Represents the service tier for requests.
Attributes: Auto: Automatically choose the best available tier for the request (Default or OverLimit). Analyze response to determine which tier was used. Default: Return 429 errors on hitting the rate limit, do not exceed to the OverLimit tier. OverLimit: Indicate that the request was over the user limit. This tier cannot be set by user in the request, but us used in a response for tier=Auto. Flex: Do not consume rate-limit credits, but run with lower priority. May still result in 429 errors in case of if there is no resources to process.
auto, default, over-limit, flex "auto"
"flex"
Response
OK
A unique identifier for the chat completion.
The object type, which is always text_completion.
The Unix timestamp of when the completion was created.
The model used for the chat completion.
A list of completion choices.
Usage statistics for the completion request.
The service tier used for the request. Represents the service tier for requests.
Attributes: Auto: Automatically choose the best available tier for the request (Default or OverLimit). Analyze response to determine which tier was used. Default: Return 429 errors on hitting the rate limit, do not exceed to the OverLimit tier. OverLimit: Indicate that the request was over the user limit. This tier cannot be set by user in the request, but us used in a response for tier=Auto. Flex: Do not consume rate-limit credits, but run with lower priority. May still result in 429 errors in case of if there is no resources to process.
auto, default, over-limit, flex