pub enum Body {
Variant0 {
input: BodyVariant0Input,
instructions: Option<String>,
language_preference: Option<String>,
max_output_tokens: Option<NonZeroU64>,
max_steps: Option<NonZeroU64>,
model: String,
reasoning: Option<ReasoningConfiguration>,
response_format: Option<ResponseFormatConfiguration>,
stream: Option<bool>,
tools: Vec<Map<String, Value>>,
},
Variant1 {
input: BodyVariant1Input,
instructions: Option<String>,
language_preference: Option<String>,
max_output_tokens: Option<NonZeroU64>,
max_steps: Option<NonZeroU64>,
models: Vec<String>,
reasoning: Option<ReasoningConfiguration>,
response_format: Option<ResponseFormatConfiguration>,
stream: Option<bool>,
tools: Vec<Map<String, Value>>,
},
Variant2 {
input: BodyVariant2Input,
instructions: Option<String>,
language_preference: Option<String>,
max_output_tokens: Option<NonZeroU64>,
max_steps: Option<NonZeroU64>,
preset: String,
reasoning: Option<ReasoningConfiguration>,
response_format: Option<ResponseFormatConfiguration>,
stream: Option<bool>,
tools: Vec<Map<String, Value>>,
},
}Expand description
JSON request body for creating an agent response.
Variants§
Variant0
Fields
input: BodyVariant0InputThe input to generate a response for. May be a plain string, or an array of typed items.
max_output_tokens: Option<NonZeroU64>Maximum tokens to generate. Minimum: 1.
max_steps: Option<NonZeroU64>Maximum number of research loop steps. Overrides the preset’s max_steps if provided.
model: StringModel ID in provider/model format. Required if neither models nor preset is provided. Ignored if models is provided.
reasoning: Option<ReasoningConfiguration>response_format: Option<ResponseFormatConfiguration>Variant1
Fields
input: BodyVariant1InputThe input to generate a response for. May be a plain string, or an array of typed items.
max_output_tokens: Option<NonZeroU64>Maximum tokens to generate. Minimum: 1.
max_steps: Option<NonZeroU64>Maximum number of research loop steps. Overrides the preset’s max_steps if provided.
models: Vec<String>Model fallback chain, each in provider/model format. Tried in order until one succeeds. Max 5 models. Takes precedence over model if set.
reasoning: Option<ReasoningConfiguration>response_format: Option<ResponseFormatConfiguration>Variant2
Fields
input: BodyVariant2InputThe input to generate a response for. May be a plain string, or an array of typed items.
max_output_tokens: Option<NonZeroU64>Maximum tokens to generate. Minimum: 1.
max_steps: Option<NonZeroU64>Maximum number of research loop steps. Overrides the preset’s max_steps if provided.
reasoning: Option<ReasoningConfiguration>response_format: Option<ResponseFormatConfiguration>