ApiProxy

Update the AI Routing config of an AI API Proxy

Changed on

Permission: API_MANAGEMENT or AI_DEVELOPMENT × MANAGE. Replaces the AiRouting config of an AI proxy (name-based). Provider references may be given by name in all six provider slots: llmProviderRefName on the routing, semanticEmbeddingProviderRefName for the semantic-embedding provider, classifierProviderRefName for the LLM route classifier, and llmProviderRefName on the conditional-route variants, the N-primary pool entries and the failover entries — each resolved to an id within the project. When a name sidecar is blank the raw provider id in the body is preserved (null-safe). Deployed environments are marked redeploy-required.

put/apiops/projects/{projectName}/apiProxies/{apiProxyName}/ai-routing/

Request

Path parameters

projectNamestring required

Project name

apiProxyNamestring required

AI API Proxy name

Request body

connectTimeoutSecondsinteger
streamTimeoutSecondsinteger
maxResponseBytesinteger
maxChunksinteger
retryCountinteger
connectionPoolManagementType'GENERAL' | 'CUSTOM' | 'NONE'
customConnectionPoolSizeinteger
idleConnectionTimeoutinteger
llmProviderRefstring
llmProviderRefNamestring
modelIdstring
timeoutSecondsinteger
streamingboolean
clientStreamPresentBehavior'USE_CLIENT' | 'OVERWRITE'
clientModelPresentBehavior'USE_CLIENT' | 'OVERWRITE' | 'ERROR'
clientModelAbsentBehavior'KEEP_ABSENT' | 'ADD_ROUTING_MODEL' | 'ERROR'
contextWindowAction'REJECT' | 'TRUNCATE' | 'PASS'
contextKeepTurnsinteger
contextRagAction'KEEP' | 'TRIM_END'
contextLastUserMessageAction'KEEP' | 'TRIM_MIDDLE'
failoverStrategy'SEQUENTIAL' | 'CONDITIONAL' | 'PRIORITY_STRICT' | 'ROUND_ROBIN'
enumAiRoutingAlgorithm'ROUND_ROBIN' | 'WEIGHTED' | 'RANDOM' | 'LRU' | 'LEAST_COST' | 'LEAST_LATENCY' | 'PREFIX_AFFINITY'
leastCostOutputRationumber double
affinityKeyHeaderstring
affinityLoadFactornumber double
semanticEmbeddingProviderRefstring
semanticEmbeddingProviderRefNamestring
semanticEmbeddingModelIdstring
classifierProviderRefstring
classifierProviderRefNamestring
classifierModelIdstring
classifierTimeoutMsinteger
classifierDecisionMode'STANDARD' | 'REASONING'
classifierReasoningBudgetinteger
classifierMaxInputCharsinteger
classifierInstructionsstring
retryDelayType'NO_DELAY' | 'FIXED' | 'EXPONENTIAL'
retryFixedDelayMsinteger
retryInitialDelayMsinteger
retryMaxDelayMsinteger
retryBackoffMultipliernumber double
failoverStatusCodeListinteger[]
failoverRetryCountinteger
trySiblingPoolTargetsboolean
circuitBreakerEnabledboolean
errorWindowinteger
errorThresholdValueinteger
enumErrorThresholdType'COUNT' | 'PERCENT'
sleepWindowinteger
halfOpenEnabledboolean
conditionalLatencyThresholdMsinteger
traceMode'NONE' | 'LIVE_TRACE'
enableAiTraceboolean
aiTraceStartTimestring date-time
aiTraceStopTimestring date-time
aiTraceEnvironmentNamestring
aiTraceCustomQueryIdstring
aiTraceMaxDurationSecondsinteger
disableSslValidationboolean
proxyEnabledboolean
proxyHoststring
proxyPortinteger
proxyAuthorizationNeededboolean
proxyUsernamestring
proxyPasswordstring
blockAnonymousRequestsboolean
failoverRetryCountRawinteger
connectTimeoutSecondsRawinteger
streamTimeoutSecondsRawinteger
retryCountRawinteger

Response

successful operation!

status'SUCCESS' | 'FAILURE'
resultMessagestring
resultListstring[]
resultCountinteger
unresolvedReferencesstring[]

Changes

    • info

      added the new optional request property /

    • info

      added the new optional request property /

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new A2A_AGENT_CALL_COUNT_OUT enum value to the request property ///

    • info

      added the new A2A_CONTEXT_ID enum value to the request property ///

    • info

      added the new A2A_TASK_ID enum value to the request property ///

    • info

      added the new A2A_TASK_STATE enum value to the request property ///

    • info

      added the new AI_CACHED_TOKENS enum value to the request property ///

    • info

      added the new AI_COST enum value to the request property ///

    • info

      added the new AI_DEPLOYMENT_TYPE enum value to the request property ///

    • info

      added the new AI_FAILOVER enum value to the request property ///

    • info

      added the new AI_FINISH_REASON enum value to the request property ///

    • info

      added the new AI_GUARDRAIL enum value to the request property ///

    • info

      added the new AI_GUARDRAIL_CATEGORY enum value to the request property ///

    • info

      added the new AI_GUARDRAIL_VERDICT enum value to the request property ///

    • info

      added the new AI_INPUT_TOKENS enum value to the request property ///

    • info

      added the new AI_MODEL enum value to the request property ///

    • info

      added the new AI_OUTPUT_TOKENS enum value to the request property ///

    • info

      added the new AI_PII enum value to the request property ///

    • info

      added the new AI_PROVIDER enum value to the request property ///

    • info

      added the new AI_SEMANTIC_CACHE enum value to the request property ///

    • info

      added the new AI_STREAMING enum value to the request property ///

    • info

      added the new AI_TOTAL_LATENCY enum value to the request property ///

    • info

      added the new AI_TPOT enum value to the request property ///

    • info

      added the new AI_TTFT enum value to the request property ///

    • info

      added the new API_PROXY_GROUP enum value to the request property ///

    • info

      added the new BACKEND_STATUS_CODE enum value to the request property ///

    • info

      added the new CANARY_REQUEST enum value to the request property ///

    • info

      added the new CANARY_STATUS enum value to the request property ///

    • info

      added the new CONTAINS_WORD enum value to the request property ///

    • info

      added the new CORRELATION_ID enum value to the request property ///

    • info

      added the new ENDPOINT enum value to the request property ///

    • info

      added the new MCP_JSONRPC_ID enum value to the request property ///

    • info

      added the new MCP_RESULT_CLASS enum value to the request property ///

    • info

      added the new MCP_TOOL_CALL_COUNT_OUT enum value to the request property ///

    • info

      added the new MCP_TOOL_NAME enum value to the request property ///

    • info

      added the new MIRROR_TRAFFIC enum value to the request property ///

    • info

      added the new RESULT_TYPE enum value to the request property ///

    • info

      added the new ROUTING_ADDRESS enum value to the request property ///

    • info

      added the new ROUTING_FAILOVER_COUNT enum value to the request property ///

    • info

      added the new ROUTING_FAILURE_REASON enum value to the request property ///

    • info

      added the new ROUTING_RETRY_COUNT enum value to the request property ///

    • info

      endpoint added