Get a routing config
/v1/configs/{slug}Get a routing config.
Answers the config with its full target tree, conditions and settings.
Requires a key of the organization with access to the config's workspace: a workspace key (member or admin) for that workspace, or an organization admin key. 403 without it; 404 when the organization has no config with this slug.
Authorization
AuthorizationBearer va_A platform API key (
va_...), created under Settings > API keys. Scoped to an organization or one workspace, with an admin or member role. Used by the management API.
Path parameters
slugstringrequiredthe config's slug
Query parameters
organizationstringrequiredthe organization slug
Responses
idstring<uuid>The config's id (UUID).
slugstringThe config's slug: send it in the
x-configheader, and use it to manage the config.namestringThe config's name, unique within the organization.
descriptionstringA free-text description. Absent when none was set.
organizationstringThe slug of the organization the config belongs to.
workspace_idstring<uuid>The workspace the config belongs to (UUID).
strategy_modeenum<string>How a request picks among
targets:SINGLE(the first),LOADBALANCE(at random, byweight),FALLBACK(in order, moving on at a status inon_status_codes) orCONDITIONAL(byconditions).One of
"SINGLE","LOADBALANCE","FALLBACK","CONDITIONAL"on_status_codesinteger<int32>[]For
FALLBACK: the statuses that move on to the next target. Absent: 429, 500, 502, 503 and 504.conditional_default_target_namestringFor
CONDITIONAL: the target used when no condition matches. Absent: none (such a request fails with 424).targetsobject[]The top-level targets in order; nested strategies carry their own
targets.Child attributes
namestringThe target's name, which conditions refer to. Absent when none was set.
virtual_key_slugstringFor a virtual key target: the key's slug. Absent for a nested strategy target.
weightnumber<double>For
LOADBALANCE: the target's share of requests, relative to its siblings. Default 1.order_indexinteger<int32>The target's position among its siblings (the
FALLBACKorder).strategy_modeenum<string>For a nested strategy target:
SINGLE,LOADBALANCE,FALLBACKorCONDITIONAL. Absent for a virtual key target.One of
"SINGLE","LOADBALANCE","FALLBACK","CONDITIONAL"on_status_codesinteger<int32>[]For a nested
FALLBACKtarget: the statuses that move on to its next target. Absent: the default.conditional_default_target_namestringFor a nested
CONDITIONALtarget: the target used when no condition matches.conditionsobject[]For a nested
CONDITIONALtarget: its rules, incondition_order. Empty otherwise.Child attributes
condition_orderinteger<int32>requiredThe rule's position: lower numbers are tried first.
querymap<string, object>requiredWhat the request must match: field paths (
metadata.*,params.*) to operator objects, as described for the rule's request form.then_target_namestringrequiredThe
nameof the target a matching request goes to.idstring<uuid>The rule's id (UUID). Changes whenever the config's targets are replaced by an update.
override_paramsobjectRequest parameters a routing target sets on the requests it receives, in place of the caller's. A field left out keeps the caller's value.
model,temperature,max_tokens,top_pandstopare applied; the other fields are validated and stored but not applied at present.Child attributes
modelstringThe model to call instead of the request's, e.g.
gpt-4o-mini.temperaturenumber<double>The sampling temperature, from 0 to 2.
max_tokensinteger<int32>The most tokens to generate; at least 1.
top_pnumber<double>Nucleus sampling, from 0 to 1.
frequency_penaltynumber<double>From -2 to 2. Stored, not applied at present.
presence_penaltynumber<double>From -2 to 2. Stored, not applied at present.
stopstring[]Stop sequences; a non-empty list replaces the request's.
seedinteger<int32>A sampling seed, at least 0. Stored, not applied at present.
response_format_typeenum<string>json_object,textorjson_schema. Accepted, but neither applied nor returned at present.One of
"json_object","text","json_schema"
cacheobjectResponse cache settings stored with a routing config or target. Requests served through a routing config are not answered from the response cache at present.
Child attributes
modestringThe cache mode:
simple(exact match) orsemantic. Absent: none.max_age_secondsinteger<int32>How long a cached answer stays valid, in seconds. Absent: none.
retryobjectRetries for a routing target's provider calls. A failed call with a listed status is tried again after 1, 2, 4, ... seconds (at most 16), until
attemptscalls have been made.Child attributes
attemptsinteger<int32>requiredHow many calls to make in all, the first one included (
1means no retry). From 1 to 10. Required.on_status_codesinteger<int32>[]The provider HTTP statuses to retry. Empty or absent: 429, 500, 502, 503 and 504.
request_timeout_msinteger<int32>For a virtual key target: the time limit per provider call, in milliseconds. Absent: no limit of its own.
idstring<uuid>The target's id (UUID). Changes whenever the config's targets are replaced by an update.
conditionsobject[]For
CONDITIONAL: the top-level rules, incondition_order. Empty otherwise.Child attributes
condition_orderinteger<int32>requiredThe rule's position: lower numbers are tried first.
querymap<string, object>requiredWhat the request must match: field paths (
metadata.*,params.*) to operator objects, as described for the rule's request form.then_target_namestringrequiredThe
nameof the target a matching request goes to.idstring<uuid>The rule's id (UUID). Changes whenever the config's targets are replaced by an update.
cacheobjectResponse cache settings stored with a routing config or target. Requests served through a routing config are not answered from the response cache at present.
Child attributes
modestringThe cache mode:
simple(exact match) orsemantic. Absent: none.max_age_secondsinteger<int32>How long a cached answer stays valid, in seconds. Absent: none.
retryobjectRetries for a routing target's provider calls. A failed call with a listed status is tried again after 1, 2, 4, ... seconds (at most 16), until
attemptscalls have been made.Child attributes
attemptsinteger<int32>requiredHow many calls to make in all, the first one included (
1means no retry). From 1 to 10. Required.on_status_codesinteger<int32>[]The provider HTTP statuses to retry. Empty or absent: 429, 500, 502, 503 and 504.
request_timeout_msinteger<int32>The stored time limit in milliseconds (applied only on virtual key targets). Absent when none was set.
schema_versioninteger<int32>The version of the config format. Currently always 1.
created_bystringWho created the config: an identifier of the user, or of the API key, that made the request.
created_atstring<date-time>When the config was created (ISO 8601 date-time).
updated_atstring<date-time>When the config last changed (ISO 8601 date-time).