GenerationConfig
Canonical generation configuration
Set the language preference to a BCP-47 tag (for example, "fr" or "pt-BR"). The platform injects a "Respond only in [language]" instruction into every LLM call for this conversation. The instruction is not persisted to history.
See Generation configuration for how settings combine across scopes.
Usage profiles
| Usage | Fields and validation |
|---|---|
| In requests | View fields |
| In responses | View fields |
| In webhook payloads | View fields |
In requests
API JSON uses JSON field names (camelCase).
| Field | Type | Presence | Meaning |
|---|---|---|---|
temperature | number (double) or string (NaN, Infinity, -Infinity) | Optional; explicit presence | Sampling temperature. Omission inherits the base configuration or provider default; an explicitly supplied zero remains an override. |
topP | number (double) or string (NaN, Infinity, -Infinity) | Optional; explicit presence | Cumulative token-probability cutoff used for nucleus sampling. |
maxOutputTokens | integer (int32) | Optional; explicit presence | Maximum output-token count requested from the model provider. Minimum: -2147483648. Maximum: 2147483647. |
frequencyPenalty | number (double) or string (NaN, Infinity, -Infinity) | Optional; explicit presence | Sampling penalty applied to tokens according to their prior frequency. |
presencePenalty | number (double) or string (NaN, Infinity, -Infinity) | Optional; explicit presence | Sampling penalty applied to tokens already present in generated content. |
stopSequences | Array of string | Optional | Stop tokens/sequences (unchanged). |
seed | string (int64) | Optional; explicit presence | Deterministic control where supported. Pattern: ^-?\d+$. |
responseFormat | ResponseFormat | Optional | Structured-output format and schema requested for the model response. |
allowParallelToolCalls | boolean | Optional; explicit presence | Allow the model to issue multiple tool calls in parallel where supported |
model | string | Optional | Model selection Primary model identifier requested for generation. |
models | Array of string | Optional | Candidate models for routing. |
systemPrompt | string | Optional; explicit presence | Optional system prompt prepended as a system message. An explicitly empty value in a per-call override clears the base prompt. |
modelRoutingFilter | ModelRoutingFilter | Optional | Optional metadata-based model routing filter. When set, candidate models are filtered by these criteria before routing. |
provider | ProviderPreferences | Optional | Provider/multi-provider routing preferences |
reasoning | ReasoningOptions | Optional | Reasoning effort and output options passed to the model provider. |
usage | UsageOptions | Optional | Token and cost accounting associated with the operation. |
transforms | Array of string | Optional | Provider transformations requested for the generation input. |
tools | Array of ToolDefinition | Optional | Tools & tool policy Tool definitions exposed to the model for server-side execution. |
toolChoice | ToolChoice | Optional | Policy controlling whether and which tool the model may call. |
clientTools | Array of ToolDefinition | Optional | Client-side tools that should be exposed to the model but executed by the client (not the workflow/MCP) |
toolPolicy | ToolExecutionPolicy | Optional | Per-run tool execution policy (approvals, ordering, limits, retries, timeouts) |
languagePreference | string | Optional | Language preference (BCP-47), e.g., "en-US", "es-ES" (presence-aware) Minimum length: 2. Pattern: ^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$. |
timeAware | TimeAwareConfig | Optional | Time-aware generation options (current time, message timestamps, file timestamps) |
turnContext | TurnContextConfig | Optional | Turn context configuration for turn-aware generation |
mem0 | MemoryConfig | Optional | Configuration for semantic memory search, context injection and extraction during generation. |
requestTimeoutSeconds | integer (int32) | Optional | Timeout for an individual model-provider request, in seconds. Zero selects the 30-second default; other values are clamped to the range 1–600. Minimum: -2147483648. Maximum: 2147483647. |
fileResolution | FileResolutionConfig | Optional | Configuration for resolving FILE_ID content parts to fresh signed URLs before calling a model provider. When unset, unresolved content is skipped. |
clearTools | boolean | Optional | Set to true with an empty tools list in an override to clear inherited tools. An empty list alone inherits the base tools. This directive applies only when merging an override. |
clearClientTools | boolean | Optional | Set to true with an empty client tools list in an override to clear inherited client tools for that turn. An empty list alone inherits the base client tools, and a nonempty list replaces them regardless of this directive. It applies only when merging an override and leaves server tool selection unchanged. |
topK | integer (int32) | Optional; explicit presence | Additional provider knobs Minimum: -2147483648. Maximum: 2147483647. |
repetitionPenalty | number (double) or string (NaN, Infinity, -Infinity) | Optional; explicit presence | Provider sampling penalty used to discourage repeated output. |
logitBias | Map from string to number (double) or string (NaN, Infinity, -Infinity) | Optional | Per-token adjustments applied to the provider’s token-selection logits. |
topLogprobs | integer (int32) | Optional; explicit presence | Number of top token log probabilities requested from the provider. Minimum: -2147483648. Maximum: 2147483647. |
minP | number (double) or string (NaN, Infinity, -Infinity) | Optional; explicit presence | Minimum relative token probability used by supported sampling providers. |
topA | number (double) or string (NaN, Infinity, -Infinity) | Optional; explicit presence | Adaptive probability cutoff used by supported sampling providers. |
user | string | Optional; explicit presence | User identifier forwarded for provider-side request attribution. |
modalities | Array of string (MODALITY_TEXT, MODALITY_IMAGE, MODALITY_AUDIO) or integer (int32) | Optional | Output modalities (e.g., [TEXT, IMAGE]) |
plugins | Array of PluginConfig | Optional | Provider plugins requested for pre-processing or post-processing. |
Values of modalities
Output media requested from a model that supports that modality.
| Value | No. | Form | Meaning |
|---|---|---|---|
MODALITY_TEXT | 1 | Canonical | Request generated text output. |
MODALITY_IMAGE | 2 | Canonical | Request generated image output where the model supports it. |
MODALITY_AUDIO | 3 | Canonical | Request generated audio output where the model supports it. |
Request validation
These rules apply when this value is supplied in a request. Request validation does not guarantee that response fields are present or satisfy the same rules.
| Applies to | Rule | Requirement |
|---|---|---|
languagePreference | Minimum length | 2 |
languagePreference | Pattern | ^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$ |
In responses
API JSON uses JSON field names (camelCase).
| Field | Type | Presence | Meaning |
|---|---|---|---|
temperature | number (double) or string (NaN, Infinity, -Infinity) | Optional; explicit presence | Sampling temperature. Omission inherits the base configuration or provider default; an explicitly supplied zero remains an override. |
topP | number (double) or string (NaN, Infinity, -Infinity) | Optional; explicit presence | Cumulative token-probability cutoff used for nucleus sampling. |
maxOutputTokens | integer (int32) | Optional; explicit presence | Maximum output-token count requested from the model provider. Minimum: -2147483648. Maximum: 2147483647. |
frequencyPenalty | number (double) or string (NaN, Infinity, -Infinity) | Optional; explicit presence | Sampling penalty applied to tokens according to their prior frequency. |
presencePenalty | number (double) or string (NaN, Infinity, -Infinity) | Optional; explicit presence | Sampling penalty applied to tokens already present in generated content. |
stopSequences | Array of string | Optional | Stop tokens/sequences (unchanged). |
seed | string (int64) | Optional; explicit presence | Deterministic control where supported. Pattern: ^-?\d+$. |
responseFormat | ResponseFormat | Optional | Structured-output format and schema requested for the model response. |
allowParallelToolCalls | boolean | Optional; explicit presence | Allow the model to issue multiple tool calls in parallel where supported |
model | string | Optional | Model selection Primary model identifier requested for generation. |
models | Array of string | Optional | Candidate models for routing. |
systemPrompt | string | Optional; explicit presence | Optional system prompt prepended as a system message. An explicitly empty value in a per-call override clears the base prompt. |
modelRoutingFilter | ModelRoutingFilter | Optional | Optional metadata-based model routing filter. When set, candidate models are filtered by these criteria before routing. |
provider | ProviderPreferences | Optional | Provider/multi-provider routing preferences |
reasoning | ReasoningOptions | Optional | Reasoning effort and output options passed to the model provider. |
usage | UsageOptions | Optional | Token and cost accounting associated with the operation. |
transforms | Array of string | Optional | Provider transformations requested for the generation input. |
tools | Array of ToolDefinition | Optional | Tools & tool policy Tool definitions exposed to the model for server-side execution. |
toolChoice | ToolChoice | Optional | Policy controlling whether and which tool the model may call. |
clientTools | Array of ToolDefinition | Optional | Client-side tools that should be exposed to the model but executed by the client (not the workflow/MCP) |
toolPolicy | ToolExecutionPolicy | Optional | Per-run tool execution policy (approvals, ordering, limits, retries, timeouts) |
languagePreference | string | Optional | Language preference (BCP-47), e.g., "en-US", "es-ES" (presence-aware) |
timeAware | TimeAwareConfig | Optional | Time-aware generation options (current time, message timestamps, file timestamps) |
turnContext | TurnContextConfig | Optional | Turn context configuration for turn-aware generation |
mem0 | MemoryConfig | Optional | Configuration for semantic memory search, context injection and extraction during generation. |
requestTimeoutSeconds | integer (int32) | Optional | Timeout for an individual model-provider request, in seconds. Zero selects the 30-second default; other values are clamped to the range 1–600. Minimum: -2147483648. Maximum: 2147483647. |
fileResolution | FileResolutionConfig | Optional | Configuration for resolving FILE_ID content parts to fresh signed URLs before calling a model provider. When unset, unresolved content is skipped. |
clearTools | boolean | Optional | Set to true with an empty tools list in an override to clear inherited tools. An empty list alone inherits the base tools. This directive applies only when merging an override. |
clearClientTools | boolean | Optional | Set to true with an empty client tools list in an override to clear inherited client tools for that turn. An empty list alone inherits the base client tools, and a nonempty list replaces them regardless of this directive. It applies only when merging an override and leaves server tool selection unchanged. |
topK | integer (int32) | Optional; explicit presence | Additional provider knobs Minimum: -2147483648. Maximum: 2147483647. |
repetitionPenalty | number (double) or string (NaN, Infinity, -Infinity) | Optional; explicit presence | Provider sampling penalty used to discourage repeated output. |
logitBias | Map from string to number (double) or string (NaN, Infinity, -Infinity) | Optional | Per-token adjustments applied to the provider’s token-selection logits. |
topLogprobs | integer (int32) | Optional; explicit presence | Number of top token log probabilities requested from the provider. Minimum: -2147483648. Maximum: 2147483647. |
minP | number (double) or string (NaN, Infinity, -Infinity) | Optional; explicit presence | Minimum relative token probability used by supported sampling providers. |
topA | number (double) or string (NaN, Infinity, -Infinity) | Optional; explicit presence | Adaptive probability cutoff used by supported sampling providers. |
user | string | Optional; explicit presence | User identifier forwarded for provider-side request attribution. |
modalities | Array of string (MODALITY_TEXT, MODALITY_IMAGE, MODALITY_AUDIO) or integer (int32) | Optional | Output modalities (e.g., [TEXT, IMAGE]) |
plugins | Array of PluginConfig | Optional | Provider plugins requested for pre-processing or post-processing. |
Values of modalities
Output media requested from a model that supports that modality.
| Value | No. | Form | Meaning |
|---|---|---|---|
MODALITY_TEXT | 1 | Canonical | Request generated text output. |
MODALITY_IMAGE | 2 | Canonical | Request generated image output where the model supports it. |
MODALITY_AUDIO | 3 | Canonical | Request generated audio output where the model supports it. |
Request validation
These rules apply when this value is supplied in a request. Request validation does not guarantee that response fields are present or satisfy the same rules.
| Applies to | Rule | Requirement |
|---|---|---|
languagePreference | Minimum length | 2 |
languagePreference | Pattern | ^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$ |
In webhook payloads
Webhook JSON uses protobuf field names (snake_case).
| Field | Type | Presence | Meaning |
|---|---|---|---|
temperature | number (double) or string (NaN, Infinity, -Infinity) | Optional; explicit presence | Sampling temperature. Omission inherits the base configuration or provider default; an explicitly supplied zero remains an override. |
top_p | number (double) or string (NaN, Infinity, -Infinity) | Optional; explicit presence | Cumulative token-probability cutoff used for nucleus sampling. |
max_output_tokens | integer (int32) | Optional; explicit presence | Maximum output-token count requested from the model provider. Minimum: -2147483648. Maximum: 2147483647. |
frequency_penalty | number (double) or string (NaN, Infinity, -Infinity) | Optional; explicit presence | Sampling penalty applied to tokens according to their prior frequency. |
presence_penalty | number (double) or string (NaN, Infinity, -Infinity) | Optional; explicit presence | Sampling penalty applied to tokens already present in generated content. |
stop_sequences | Array of string | Optional | Stop tokens/sequences (unchanged). |
seed | string (int64) | Optional; explicit presence | Deterministic control where supported. Pattern: ^-?\d+$. |
response_format | ResponseFormat | Optional | Structured-output format and schema requested for the model response. |
allow_parallel_tool_calls | boolean | Optional; explicit presence | Allow the model to issue multiple tool calls in parallel where supported |
model | string | Optional | Model selection Primary model identifier requested for generation. |
models | Array of string | Optional | Candidate models for routing. |
system_prompt | string | Optional; explicit presence | Optional system prompt prepended as a system message. An explicitly empty value in a per-call override clears the base prompt. |
model_routing_filter | ModelRoutingFilter | Optional | Optional metadata-based model routing filter. When set, candidate models are filtered by these criteria before routing. |
provider | ProviderPreferences | Optional | Provider/multi-provider routing preferences |
reasoning | ReasoningOptions | Optional | Reasoning effort and output options passed to the model provider. |
usage | UsageOptions | Optional | Token and cost accounting associated with the operation. |
transforms | Array of string | Optional | Provider transformations requested for the generation input. |
tools | Array of ToolDefinition | Optional | Tools & tool policy Tool definitions exposed to the model for server-side execution. |
tool_choice | ToolChoice | Optional | Policy controlling whether and which tool the model may call. |
client_tools | Array of ToolDefinition | Optional | Client-side tools that should be exposed to the model but executed by the client (not the workflow/MCP) |
tool_policy | ToolExecutionPolicy | Optional | Per-run tool execution policy (approvals, ordering, limits, retries, timeouts) |
language_preference | string | Optional | Language preference (BCP-47), e.g., "en-US", "es-ES" (presence-aware) |
time_aware | TimeAwareConfig | Optional | Time-aware generation options (current time, message timestamps, file timestamps) |
turn_context | TurnContextConfig | Optional | Turn context configuration for turn-aware generation |
mem0 | MemoryConfig | Optional | Configuration for semantic memory search, context injection and extraction during generation. |
request_timeout_seconds | integer (int32) | Optional | Timeout for an individual model-provider request, in seconds. Zero selects the 30-second default; other values are clamped to the range 1–600. Minimum: -2147483648. Maximum: 2147483647. |
file_resolution | FileResolutionConfig | Optional | Configuration for resolving FILE_ID content parts to fresh signed URLs before calling a model provider. When unset, unresolved content is skipped. |
clear_tools | boolean | Optional | Set to true with an empty tools list in an override to clear inherited tools. An empty list alone inherits the base tools. This directive applies only when merging an override. |
clear_client_tools | boolean | Optional | Set to true with an empty client tools list in an override to clear inherited client tools for that turn. An empty list alone inherits the base client tools, and a nonempty list replaces them regardless of this directive. It applies only when merging an override and leaves server tool selection unchanged. |
top_k | integer (int32) | Optional; explicit presence | Additional provider knobs Minimum: -2147483648. Maximum: 2147483647. |
repetition_penalty | number (double) or string (NaN, Infinity, -Infinity) | Optional; explicit presence | Provider sampling penalty used to discourage repeated output. |
logit_bias | Map from string to number (double) or string (NaN, Infinity, -Infinity) | Optional | Per-token adjustments applied to the provider’s token-selection logits. |
top_logprobs | integer (int32) | Optional; explicit presence | Number of top token log probabilities requested from the provider. Minimum: -2147483648. Maximum: 2147483647. |
min_p | number (double) or string (NaN, Infinity, -Infinity) | Optional; explicit presence | Minimum relative token probability used by supported sampling providers. |
top_a | number (double) or string (NaN, Infinity, -Infinity) | Optional; explicit presence | Adaptive probability cutoff used by supported sampling providers. |
user | string | Optional; explicit presence | User identifier forwarded for provider-side request attribution. |
modalities | Array of string (MODALITY_TEXT, MODALITY_IMAGE, MODALITY_AUDIO) or integer (int32) | Optional | Output modalities (e.g., [TEXT, IMAGE]) |
plugins | Array of PluginConfig | Optional | Provider plugins requested for pre-processing or post-processing. |
Values of modalities
Output media requested from a model that supports that modality.
| Value | No. | Form | Meaning |
|---|---|---|---|
MODALITY_TEXT | 1 | Canonical | Request generated text output. |
MODALITY_IMAGE | 2 | Canonical | Request generated image output where the model supports it. |
MODALITY_AUDIO | 3 | Canonical | Request generated audio output where the model supports it. |
Request validation
These rules apply when this value is supplied in a request. Request validation does not guarantee that response fields are present or satisfy the same rules.
| Applies to | Rule | Requirement |
|---|---|---|
language_preference | Minimum length | 2 |
language_preference | Pattern | ^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$ |
Where used
| Reference | Relationship |
|---|---|
| Create an agent profile | POST /api/v1/agent-profiles/create |
| Import a prompt library | POST /api/v1/agent-profiles/import |
| Update an agent profile | POST /api/v1/agent-profiles/update |
| Append a message without generating | POST /api/v1/llm/append-message |
| Create a new conversation thread | POST /api/v1/llm/create-thread |
| Send a message to a conversation | POST /api/v1/llm/send-message |
| Send a message and wait for the result | POST /api/v1/llm/send-message-sync |
| Update context management settings | POST /api/v1/llm/update-context-management-settings |
| Update default generation config | POST /api/v1/llm/update-default-generation-config |
| Update the caller's default generation config | POST /api/v1/enduser/update-generation-config |
| Get an agent profile | POST /api/v1/agent-profiles/get |
| List agent profiles | POST /api/v1/agent-profiles/list |
| Withdraw your rating on a message | POST /api/v1/llm/delete-message-rating |
| Get full conversation state | POST /api/v1/llm/conversation-state |
| Rate an assistant message | POST /api/v1/llm/rate-message |
| Submit client-side tool results and wait for the next segment | POST /api/v1/llm/submit-client-tool-results-sync |
| Get the caller's end-user profile | POST /api/v1/enduser/get |
| Generation configuration | API JSON uses JSON field names (camelCase). |
| llm.generation_started | Webhook JSON uses protobuf field names (snake_case). |
| llm.message_published | Webhook JSON uses protobuf field names (snake_case). |
| AgentProfile | Nested in model |
| AgentProfile | Nested in model |
| CompactionConfig | Nested in model |
| CompactionConfig | Nested in model |
| EndUserState | Nested in model |
| GenerationContext | Nested in model |
| GenerationContext | Nested in model |
| GenerationContext | Nested in model |
| LLMGenerationStartedEvent | Nested in model |
| SourcePromptTemplate | Nested in model |
Download the public reference contract.
Document: DOC-API-MODEL-generation-config.