dots.v2.genAi.models.routers.post()
Generated on 13 Nov 2026
from DoTs version
v1.24.0
Usage
client.v2.genAi.models.routers.post(body: ApiCreateModelRouterInputPublic, requestConfiguration?: RequestConfiguration<object>): Promise<undefined | ApiCreateModelRouterOutput>Description
To create a model router, send a POST request to /v2/gen-ai/models/routers.
Parameters
descriptionstring optionalExample:
"My Model Router Description"Model router description
fallbackModelsarray of strings optionalExample:
["example string"]At least one fallback model is required; order defines failover priority
namestring optionalExample:
"my-model-router"Model router name: lowercase, at most 255 characters, only a-z, 0-9, and hyphens
policiesarray of objects optionalRouter policies
Show child properties
customTaskobject optionalTask definition embedded in a model router config.
Show child properties
descriptionstring optionalExample:
"Summarize long-form text"Short task description
namestring optionalExample:
"Custom Summarization"Task name
modelsarray of strings optionalExample:
["example string"]Models assigned to the task
selectionPolicyobject optionalSelection policy preference for choosing among assigned models.
Show child properties
preferstring optionalExample:
"cheapest"One of: none, cheapest, fastest
taskSlugstring optionalExample:
"summarization"Task slug
regionsarray of strings optionalExample:
["example string"]DEPRECATED: this field does not affect deployment and model routers are always
deployed to all regions. Must be omitted or set to ["all"].
Request Sample
Response Example
More Information
See /v2/gen-ai/models/routers in the API reference for additional detail on responses, headers, parameters, and more.