xAI Responses API request body parameters.
interface XAIResponsesCreateParamsWhether to process the response asynchronously in the background. Note: Unsupported.
What additional output data to include in the response.
Currently supported: reasoning.encrypted_content.
The input passed to the model. Can be text (string) or an array of message objects.
An alternate way to specify the system prompt.
Cannot be used with previous_response_id.
Whether to return log probabilities of the output tokens.
Max number of tokens that can be generated. Includes both output and reasoning tokens.
Model name for the model to use (e.g., from xAI console).
Whether to allow the model to run parallel tool calls.
The ID of the previous response from the model. Use this to create multi-turn conversations.
Reasoning configuration. Only for reasoning models.
Set parameters for searched data.
Takes precedence over web_search_preview tool.
Service tier for the request. Note: Not supported. Maintained for compatibility.
Whether to store the input message(s) and response.
If set, partial message deltas will be sent as server-sent events.
Sampling temperature between 0 and 2. Higher values make output more random, lower values more deterministic.
Settings for customizing a text response.
Controls which tool is called by the model.
A list of tools the model may call. Maximum of 128 tools.
Number of most likely tokens to return at each token position.
Range: 0-8. Requires logprobs to be true.
Nucleus sampling probability mass. The model considers results of tokens with top_p probability mass.
Truncation strategy. Note: Not supported. Maintained for compatibility.
Unique identifier representing your end-user. Used for monitoring and abuse detection.