OptionalbackgroundWhether to process the response asynchronously in the background. Note: Unsupported.
OptionalincludeWhat 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.
OptionalinstructionsAn alternate way to specify the system prompt.
Cannot be used with previous_response_id.
OptionallogprobsWhether to return log probabilities of the output tokens.
Optionalmax_Max number of tokens that can be generated. Includes both output and reasoning tokens.
OptionalmetadataMetadata for the request. Note: Not supported. Maintained for compatibility.
OptionalmodelModel name for the model to use (e.g., from xAI console).
Optionalparallel_Whether to allow the model to run parallel tool calls.
Optionalprevious_The ID of the previous response from the model. Use this to create multi-turn conversations.
OptionalreasoningReasoning configuration. Only for reasoning models.
Optionalsearch_Set parameters for searched data.
Takes precedence over web_search_preview tool.
Optionalservice_Service tier for the request. Note: Not supported. Maintained for compatibility.
OptionalstoreWhether to store the input message(s) and response.
If set, partial message deltas will be sent as server-sent events.
OptionaltemperatureSampling temperature between 0 and 2. Higher values make output more random, lower values more deterministic.
OptionaltextSettings for customizing a text response.
Optionaltool_Controls which tool is called by the model.
OptionaltoolsA list of tools the model may call. Maximum of 128 tools.
Optionaltop_Number of most likely tokens to return at each token position.
Range: 0-8. Requires logprobs to be true.
Optionaltop_Nucleus sampling probability mass. The model considers results of tokens with top_p probability mass.
OptionaltruncationTruncation strategy. Note: Not supported. Maintained for compatibility.
OptionaluserUnique identifier representing your end-user. Used for monitoring and abuse detection.
Streaming variant of the request params.