| Field | Type | Required | Description | Example |
|---|---|---|---|---|
max_tokens |
OptionalNullable[int] | ➖ | The maximum number of tokens to generate in the completion. The token count of your prompt plus max_tokens cannot exceed the model's context length. |
|
stream |
Optional[bool] | ➖ | N/A | |
stop |
Optional[models.AgentsCompletionStreamRequestStop] | ➖ | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | |
random_seed |
OptionalNullable[int] | ➖ | The seed to use for random sampling. If set, different calls will generate deterministic results. | |
messages |
List[models.AgentsCompletionStreamRequestMessages] | ✔️ | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | [ { "role": "user", "content": "Who is the best French painter? Answer in one short sentence." } ] |
response_format |
Optional[models.ResponseFormat] | ➖ | N/A | |
tools |
List[models.Tool] | ➖ | N/A | |
tool_choice |
Optional[models.AgentsCompletionStreamRequestToolChoice] | ➖ | N/A | |
presence_penalty |
Optional[float] | ➖ | presence_penalty determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | |
frequency_penalty |
Optional[float] | ➖ | frequency_penalty penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | |
n |
OptionalNullable[int] | ➖ | Number of completions to return for each request, input tokens are only billed once. | |
prediction |
Optional[models.Prediction] | ➖ | N/A | |
parallel_tool_calls |
Optional[bool] | ➖ | N/A | |
prompt_mode |
OptionalNullable[models.MistralPromptMode] | ➖ | Allows toggling between the reasoning mode and no system prompt. When set to reasoning the system prompt for reasoning models will be used. |
|
agent_id |
str | ✔️ | The ID of the agent to use for this completion. |