Skip to main content

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​

UsageFields and validation
In requestsView fields
In responsesView fields
In webhook payloadsView fields

In requests​

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
temperaturenumber (double) or string (NaN, Infinity, -Infinity)Optional; explicit presenceSampling temperature. Omission inherits the base configuration or provider default; an explicitly supplied zero remains an override.
topPnumber (double) or string (NaN, Infinity, -Infinity)Optional; explicit presenceCumulative token-probability cutoff used for nucleus sampling.
maxOutputTokensinteger (int32)Optional; explicit presenceMaximum output-token count requested from the model provider. Minimum: -2147483648. Maximum: 2147483647.
frequencyPenaltynumber (double) or string (NaN, Infinity, -Infinity)Optional; explicit presenceSampling penalty applied to tokens according to their prior frequency.
presencePenaltynumber (double) or string (NaN, Infinity, -Infinity)Optional; explicit presenceSampling penalty applied to tokens already present in generated content.
stopSequencesArray of stringOptionalStop tokens/sequences (unchanged).
seedstring (int64)Optional; explicit presenceDeterministic control where supported. Pattern: ^-?\d+$.
responseFormatResponseFormatOptionalStructured-output format and schema requested for the model response.
allowParallelToolCallsbooleanOptional; explicit presenceAllow the model to issue multiple tool calls in parallel where supported
modelstringOptionalModel selection Primary model identifier requested for generation.
modelsArray of stringOptionalCandidate models for routing.
systemPromptstringOptional; explicit presenceOptional system prompt prepended as a system message. An explicitly empty value in a per-call override clears the base prompt.
modelRoutingFilterModelRoutingFilterOptionalOptional metadata-based model routing filter. When set, candidate models are filtered by these criteria before routing.
providerProviderPreferencesOptionalProvider/multi-provider routing preferences
reasoningReasoningOptionsOptionalReasoning effort and output options passed to the model provider.
usageUsageOptionsOptionalToken and cost accounting associated with the operation.
transformsArray of stringOptionalProvider transformations requested for the generation input.
toolsArray of ToolDefinitionOptionalTools & tool policy Tool definitions exposed to the model for server-side execution.
toolChoiceToolChoiceOptionalPolicy controlling whether and which tool the model may call.
clientToolsArray of ToolDefinitionOptionalClient-side tools that should be exposed to the model but executed by the client (not the workflow/MCP)
toolPolicyToolExecutionPolicyOptionalPer-run tool execution policy (approvals, ordering, limits, retries, timeouts)
languagePreferencestringOptionalLanguage 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})*$.
timeAwareTimeAwareConfigOptionalTime-aware generation options (current time, message timestamps, file timestamps)
turnContextTurnContextConfigOptionalTurn context configuration for turn-aware generation
mem0MemoryConfigOptionalConfiguration for semantic memory search, context injection and extraction during generation.
requestTimeoutSecondsinteger (int32)OptionalTimeout 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.
fileResolutionFileResolutionConfigOptionalConfiguration for resolving FILE_ID content parts to fresh signed URLs before calling a model provider. When unset, unresolved content is skipped.
clearToolsbooleanOptionalSet 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.
clearClientToolsbooleanOptionalSet 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.
topKinteger (int32)Optional; explicit presenceAdditional provider knobs Minimum: -2147483648. Maximum: 2147483647.
repetitionPenaltynumber (double) or string (NaN, Infinity, -Infinity)Optional; explicit presenceProvider sampling penalty used to discourage repeated output.
logitBiasMap from string to number (double) or string (NaN, Infinity, -Infinity)OptionalPer-token adjustments applied to the provider’s token-selection logits.
topLogprobsinteger (int32)Optional; explicit presenceNumber of top token log probabilities requested from the provider. Minimum: -2147483648. Maximum: 2147483647.
minPnumber (double) or string (NaN, Infinity, -Infinity)Optional; explicit presenceMinimum relative token probability used by supported sampling providers.
topAnumber (double) or string (NaN, Infinity, -Infinity)Optional; explicit presenceAdaptive probability cutoff used by supported sampling providers.
userstringOptional; explicit presenceUser identifier forwarded for provider-side request attribution.
modalitiesArray of string (MODALITY_TEXT, MODALITY_IMAGE, MODALITY_AUDIO) or integer (int32)OptionalOutput modalities (e.g., [TEXT, IMAGE])
pluginsArray of PluginConfigOptionalProvider plugins requested for pre-processing or post-processing.

Values of modalities​

Output media requested from a model that supports that modality.

ValueNo.FormMeaning
MODALITY_TEXT1CanonicalRequest generated text output.
MODALITY_IMAGE2CanonicalRequest generated image output where the model supports it.
MODALITY_AUDIO3CanonicalRequest 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 toRuleRequirement
languagePreferenceMinimum length2
languagePreferencePattern^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$

In responses​

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
temperaturenumber (double) or string (NaN, Infinity, -Infinity)Optional; explicit presenceSampling temperature. Omission inherits the base configuration or provider default; an explicitly supplied zero remains an override.
topPnumber (double) or string (NaN, Infinity, -Infinity)Optional; explicit presenceCumulative token-probability cutoff used for nucleus sampling.
maxOutputTokensinteger (int32)Optional; explicit presenceMaximum output-token count requested from the model provider. Minimum: -2147483648. Maximum: 2147483647.
frequencyPenaltynumber (double) or string (NaN, Infinity, -Infinity)Optional; explicit presenceSampling penalty applied to tokens according to their prior frequency.
presencePenaltynumber (double) or string (NaN, Infinity, -Infinity)Optional; explicit presenceSampling penalty applied to tokens already present in generated content.
stopSequencesArray of stringOptionalStop tokens/sequences (unchanged).
seedstring (int64)Optional; explicit presenceDeterministic control where supported. Pattern: ^-?\d+$.
responseFormatResponseFormatOptionalStructured-output format and schema requested for the model response.
allowParallelToolCallsbooleanOptional; explicit presenceAllow the model to issue multiple tool calls in parallel where supported
modelstringOptionalModel selection Primary model identifier requested for generation.
modelsArray of stringOptionalCandidate models for routing.
systemPromptstringOptional; explicit presenceOptional system prompt prepended as a system message. An explicitly empty value in a per-call override clears the base prompt.
modelRoutingFilterModelRoutingFilterOptionalOptional metadata-based model routing filter. When set, candidate models are filtered by these criteria before routing.
providerProviderPreferencesOptionalProvider/multi-provider routing preferences
reasoningReasoningOptionsOptionalReasoning effort and output options passed to the model provider.
usageUsageOptionsOptionalToken and cost accounting associated with the operation.
transformsArray of stringOptionalProvider transformations requested for the generation input.
toolsArray of ToolDefinitionOptionalTools & tool policy Tool definitions exposed to the model for server-side execution.
toolChoiceToolChoiceOptionalPolicy controlling whether and which tool the model may call.
clientToolsArray of ToolDefinitionOptionalClient-side tools that should be exposed to the model but executed by the client (not the workflow/MCP)
toolPolicyToolExecutionPolicyOptionalPer-run tool execution policy (approvals, ordering, limits, retries, timeouts)
languagePreferencestringOptionalLanguage preference (BCP-47), e.g., "en-US", "es-ES" (presence-aware)
timeAwareTimeAwareConfigOptionalTime-aware generation options (current time, message timestamps, file timestamps)
turnContextTurnContextConfigOptionalTurn context configuration for turn-aware generation
mem0MemoryConfigOptionalConfiguration for semantic memory search, context injection and extraction during generation.
requestTimeoutSecondsinteger (int32)OptionalTimeout 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.
fileResolutionFileResolutionConfigOptionalConfiguration for resolving FILE_ID content parts to fresh signed URLs before calling a model provider. When unset, unresolved content is skipped.
clearToolsbooleanOptionalSet 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.
clearClientToolsbooleanOptionalSet 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.
topKinteger (int32)Optional; explicit presenceAdditional provider knobs Minimum: -2147483648. Maximum: 2147483647.
repetitionPenaltynumber (double) or string (NaN, Infinity, -Infinity)Optional; explicit presenceProvider sampling penalty used to discourage repeated output.
logitBiasMap from string to number (double) or string (NaN, Infinity, -Infinity)OptionalPer-token adjustments applied to the provider’s token-selection logits.
topLogprobsinteger (int32)Optional; explicit presenceNumber of top token log probabilities requested from the provider. Minimum: -2147483648. Maximum: 2147483647.
minPnumber (double) or string (NaN, Infinity, -Infinity)Optional; explicit presenceMinimum relative token probability used by supported sampling providers.
topAnumber (double) or string (NaN, Infinity, -Infinity)Optional; explicit presenceAdaptive probability cutoff used by supported sampling providers.
userstringOptional; explicit presenceUser identifier forwarded for provider-side request attribution.
modalitiesArray of string (MODALITY_TEXT, MODALITY_IMAGE, MODALITY_AUDIO) or integer (int32)OptionalOutput modalities (e.g., [TEXT, IMAGE])
pluginsArray of PluginConfigOptionalProvider plugins requested for pre-processing or post-processing.

Values of modalities​

Output media requested from a model that supports that modality.

ValueNo.FormMeaning
MODALITY_TEXT1CanonicalRequest generated text output.
MODALITY_IMAGE2CanonicalRequest generated image output where the model supports it.
MODALITY_AUDIO3CanonicalRequest 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 toRuleRequirement
languagePreferenceMinimum length2
languagePreferencePattern^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$

In webhook payloads​

Webhook JSON uses protobuf field names (snake_case).

FieldTypePresenceMeaning
temperaturenumber (double) or string (NaN, Infinity, -Infinity)Optional; explicit presenceSampling temperature. Omission inherits the base configuration or provider default; an explicitly supplied zero remains an override.
top_pnumber (double) or string (NaN, Infinity, -Infinity)Optional; explicit presenceCumulative token-probability cutoff used for nucleus sampling.
max_output_tokensinteger (int32)Optional; explicit presenceMaximum output-token count requested from the model provider. Minimum: -2147483648. Maximum: 2147483647.
frequency_penaltynumber (double) or string (NaN, Infinity, -Infinity)Optional; explicit presenceSampling penalty applied to tokens according to their prior frequency.
presence_penaltynumber (double) or string (NaN, Infinity, -Infinity)Optional; explicit presenceSampling penalty applied to tokens already present in generated content.
stop_sequencesArray of stringOptionalStop tokens/sequences (unchanged).
seedstring (int64)Optional; explicit presenceDeterministic control where supported. Pattern: ^-?\d+$.
response_formatResponseFormatOptionalStructured-output format and schema requested for the model response.
allow_parallel_tool_callsbooleanOptional; explicit presenceAllow the model to issue multiple tool calls in parallel where supported
modelstringOptionalModel selection Primary model identifier requested for generation.
modelsArray of stringOptionalCandidate models for routing.
system_promptstringOptional; explicit presenceOptional system prompt prepended as a system message. An explicitly empty value in a per-call override clears the base prompt.
model_routing_filterModelRoutingFilterOptionalOptional metadata-based model routing filter. When set, candidate models are filtered by these criteria before routing.
providerProviderPreferencesOptionalProvider/multi-provider routing preferences
reasoningReasoningOptionsOptionalReasoning effort and output options passed to the model provider.
usageUsageOptionsOptionalToken and cost accounting associated with the operation.
transformsArray of stringOptionalProvider transformations requested for the generation input.
toolsArray of ToolDefinitionOptionalTools & tool policy Tool definitions exposed to the model for server-side execution.
tool_choiceToolChoiceOptionalPolicy controlling whether and which tool the model may call.
client_toolsArray of ToolDefinitionOptionalClient-side tools that should be exposed to the model but executed by the client (not the workflow/MCP)
tool_policyToolExecutionPolicyOptionalPer-run tool execution policy (approvals, ordering, limits, retries, timeouts)
language_preferencestringOptionalLanguage preference (BCP-47), e.g., "en-US", "es-ES" (presence-aware)
time_awareTimeAwareConfigOptionalTime-aware generation options (current time, message timestamps, file timestamps)
turn_contextTurnContextConfigOptionalTurn context configuration for turn-aware generation
mem0MemoryConfigOptionalConfiguration for semantic memory search, context injection and extraction during generation.
request_timeout_secondsinteger (int32)OptionalTimeout 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_resolutionFileResolutionConfigOptionalConfiguration for resolving FILE_ID content parts to fresh signed URLs before calling a model provider. When unset, unresolved content is skipped.
clear_toolsbooleanOptionalSet 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_toolsbooleanOptionalSet 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_kinteger (int32)Optional; explicit presenceAdditional provider knobs Minimum: -2147483648. Maximum: 2147483647.
repetition_penaltynumber (double) or string (NaN, Infinity, -Infinity)Optional; explicit presenceProvider sampling penalty used to discourage repeated output.
logit_biasMap from string to number (double) or string (NaN, Infinity, -Infinity)OptionalPer-token adjustments applied to the provider’s token-selection logits.
top_logprobsinteger (int32)Optional; explicit presenceNumber of top token log probabilities requested from the provider. Minimum: -2147483648. Maximum: 2147483647.
min_pnumber (double) or string (NaN, Infinity, -Infinity)Optional; explicit presenceMinimum relative token probability used by supported sampling providers.
top_anumber (double) or string (NaN, Infinity, -Infinity)Optional; explicit presenceAdaptive probability cutoff used by supported sampling providers.
userstringOptional; explicit presenceUser identifier forwarded for provider-side request attribution.
modalitiesArray of string (MODALITY_TEXT, MODALITY_IMAGE, MODALITY_AUDIO) or integer (int32)OptionalOutput modalities (e.g., [TEXT, IMAGE])
pluginsArray of PluginConfigOptionalProvider plugins requested for pre-processing or post-processing.

Values of modalities​

Output media requested from a model that supports that modality.

ValueNo.FormMeaning
MODALITY_TEXT1CanonicalRequest generated text output.
MODALITY_IMAGE2CanonicalRequest generated image output where the model supports it.
MODALITY_AUDIO3CanonicalRequest 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 toRuleRequirement
language_preferenceMinimum length2
language_preferencePattern^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$

Where used​

ReferenceRelationship
Create an agent profilePOST /api/v1/agent-profiles/create
Import a prompt libraryPOST /api/v1/agent-profiles/import
Update an agent profilePOST /api/v1/agent-profiles/update
Append a message without generatingPOST /api/v1/llm/append-message
Create a new conversation threadPOST /api/v1/llm/create-thread
Send a message to a conversationPOST /api/v1/llm/send-message
Send a message and wait for the resultPOST /api/v1/llm/send-message-sync
Update context management settingsPOST /api/v1/llm/update-context-management-settings
Update default generation configPOST /api/v1/llm/update-default-generation-config
Update the caller's default generation configPOST /api/v1/enduser/update-generation-config
Get an agent profilePOST /api/v1/agent-profiles/get
List agent profilesPOST /api/v1/agent-profiles/list
Withdraw your rating on a messagePOST /api/v1/llm/delete-message-rating
Get full conversation statePOST /api/v1/llm/conversation-state
Rate an assistant messagePOST /api/v1/llm/rate-message
Submit client-side tool results and wait for the next segmentPOST /api/v1/llm/submit-client-tool-results-sync
Get the caller's end-user profilePOST /api/v1/enduser/get
Generation configurationAPI JSON uses JSON field names (camelCase).
llm.generation_startedWebhook JSON uses protobuf field names (snake_case).
llm.message_publishedWebhook JSON uses protobuf field names (snake_case).
AgentProfileNested in model
AgentProfileNested in model
CompactionConfigNested in model
CompactionConfigNested in model
EndUserStateNested in model
GenerationContextNested in model
GenerationContextNested in model
GenerationContextNested in model
LLMGenerationStartedEventNested in model
SourcePromptTemplateNested in model

Download the public reference contract.

Document: DOC-API-MODEL-generation-config.