v13

latestOpenAPI 3.1.0MITraw.githubusercontent.com2026-08-0148123138.3 KB
Admin

Create Router

post/v1/admin/routers

Request body

namestring required

Name of the model router.

type'automatic-speech-recognition' | 'image-text-to-text' | 'image-to-text' | 'text-embeddings-inference' | 'text-generation' | 'text-classification' required
aliasesstring[]

Aliases of the model. It will be used to identify the model by users.

load_balancing_strategy'shuffle' | 'least_busy'
cost_prompt_tokensnumber

Cost of a million prompt tokens (decrease user budget)

cost_completion_tokensnumber

Cost of a million completion tokens (decrease user budget)

Example request

{
  "name": "model-router-1",
  "aliases": [
    "model-alias",
    "model-alias-2"
  ]
}

Response

Successful Response

object'router'

Type of the object.

idinteger required

ID of the router.

namestring required

Name of the router.

user_idinteger required

ID of the user that owns the router.

type'automatic-speech-recognition' | 'image-text-to-text' | 'image-to-text' | 'text-embeddings-inference' | 'text-generation' | 'text-classification' required
aliasesstring[] required

Aliases of the model. It will be used to identify the model by users.

load_balancing_strategy'shuffle' | 'least_busy' required
vector_sizeinteger nullable

Dimension of the vectors, if the models are embeddings. Make sure it is the same for all models.

max_context_lengthinteger nullable

Maximum amount of tokens a context could contains. Make sure it is the same for all models.

cost_prompt_tokensnumber required

Cost of a million prompt tokens (decrease user budget)

cost_completion_tokensnumber required

Cost of a million completion tokens (decrease user budget)

providersinteger

Number of providers in the router.

createdinteger required

Time of creation, as Unix timestamp.

updatedinteger required

Time of last update, as Unix timestamp.

Example response

{
  "aliases": [
    "model-alias",
    "model-alias-2"
  ]
}