Skip to main content

ModelRoutingFilter

ModelRoutingFilter defines metadata-based criteria for filtering model candidates. All filters are ANDed — a model must pass every specified filter. Unset/zero-value fields are ignored (no filtering on that dimension).

Unset or zero fields do not filter that dimension. Unknown maximum-output metadata currently passes a minimum-output filter, while an empty modality list fails a required-modality check. A passing metadata check is not proof the provider will honor the eventual request.

maxPromptCost and maxCompletionCost compare per-token catalog prices; unknown/unparseable prices currently pass. They do not cap total tokens, tool costs, retries or aggregate provider spend. Before sending paid traffic, confirm which spending limits are actually enforced for your account; comprehensive spending controls are upcoming. Metadata-based capability filters also do not prove that a provider will honor a parameter on the eventual request.

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
minContextLengthstring (int64)OptionalMinimum context window (tokens). Models below this are excluded. Pattern: ^-?\d+$.
minMaxCompletionTokensstring (int64)OptionalMinimum max completion tokens. Models below this are excluded. Models reporting 0 (unknown) pass through (permissive). Pattern: ^-?\d+$.
requiredInputModalitiesArray of stringOptionalRequired input modalities (e.g., ["image", "audio"]). Model must support ALL listed. Models with empty input_modalities are filtered out (strict).
requiredOutputModalitiesArray of stringOptionalRequired output modalities (e.g., ["image"]). Model must support ALL listed. Models with empty output_modalities are filtered out (strict).
maxPromptCostnumber (double) or string (NaN, Infinity, -Infinity)OptionalMaximum cost per prompt token (e.g., 0.000003). 0 = no limit. Unparseable pricing strings pass through (permissive).
maxCompletionCostnumber (double) or string (NaN, Infinity, -Infinity)OptionalMaximum cost per completion token. 0 = no limit. Unparseable pricing strings pass through (permissive).
excludeModeratedbooleanOptionalExclude models with content moderation enabled.
requiredParametersArray of stringOptionalRequired supported parameters (e.g., ["tools", "response_format"]). Model must support ALL listed.

In responses​

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
minContextLengthstring (int64)OptionalMinimum context window (tokens). Models below this are excluded. Pattern: ^-?\d+$.
minMaxCompletionTokensstring (int64)OptionalMinimum max completion tokens. Models below this are excluded. Models reporting 0 (unknown) pass through (permissive). Pattern: ^-?\d+$.
requiredInputModalitiesArray of stringOptionalRequired input modalities (e.g., ["image", "audio"]). Model must support ALL listed. Models with empty input_modalities are filtered out (strict).
requiredOutputModalitiesArray of stringOptionalRequired output modalities (e.g., ["image"]). Model must support ALL listed. Models with empty output_modalities are filtered out (strict).
maxPromptCostnumber (double) or string (NaN, Infinity, -Infinity)OptionalMaximum cost per prompt token (e.g., 0.000003). 0 = no limit. Unparseable pricing strings pass through (permissive).
maxCompletionCostnumber (double) or string (NaN, Infinity, -Infinity)OptionalMaximum cost per completion token. 0 = no limit. Unparseable pricing strings pass through (permissive).
excludeModeratedbooleanOptionalExclude models with content moderation enabled.
requiredParametersArray of stringOptionalRequired supported parameters (e.g., ["tools", "response_format"]). Model must support ALL listed.

In webhook payloads​

Webhook JSON uses protobuf field names (snake_case).

FieldTypePresenceMeaning
min_context_lengthstring (int64)OptionalMinimum context window (tokens). Models below this are excluded. Pattern: ^-?\d+$.
min_max_completion_tokensstring (int64)OptionalMinimum max completion tokens. Models below this are excluded. Models reporting 0 (unknown) pass through (permissive). Pattern: ^-?\d+$.
required_input_modalitiesArray of stringOptionalRequired input modalities (e.g., ["image", "audio"]). Model must support ALL listed. Models with empty input_modalities are filtered out (strict).
required_output_modalitiesArray of stringOptionalRequired output modalities (e.g., ["image"]). Model must support ALL listed. Models with empty output_modalities are filtered out (strict).
max_prompt_costnumber (double) or string (NaN, Infinity, -Infinity)OptionalMaximum cost per prompt token (e.g., 0.000003). 0 = no limit. Unparseable pricing strings pass through (permissive).
max_completion_costnumber (double) or string (NaN, Infinity, -Infinity)OptionalMaximum cost per completion token. 0 = no limit. Unparseable pricing strings pass through (permissive).
exclude_moderatedbooleanOptionalExclude models with content moderation enabled.
required_parametersArray of stringOptionalRequired supported parameters (e.g., ["tools", "response_format"]). Model must support ALL listed.

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).
GenerationConfigNested in model
GenerationConfigNested in model
GenerationConfigNested in model

Download the public reference contract.

Document: DOC-API-MODEL-model-routing-filter.