---
title: "Create Router"
method: POST
path: "/v1/admin/routers"
tags: ["Admin"]
---

# Create Router

`POST /v1/admin/routers`

## Request body

- CreateRouterBody
  - `name` string, 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
  - `aliases` string[] — Aliases of the model. It will be used to identify the model by users.
  - `load_balancing_strategy` 'shuffle' | 'least_busy'
  - `cost_prompt_tokens` number — Cost of a million prompt tokens (decrease user budget)
  - `cost_completion_tokens` number — Cost of a million completion tokens (decrease user budget)

## Response `201`

Successful Response

- RouterResponse
  - `object` 'router' — Type of the object.
  - `id` integer, required — ID of the router.
  - `name` string, required — Name of the router.
  - `user_id` integer, 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
  - `aliases` string[], required — Aliases of the model. It will be used to identify the model by users.
  - `load_balancing_strategy` 'shuffle' | 'least_busy', required
  - `vector_size` integer, nullable — Dimension of the vectors, if the models are embeddings. Make sure it is the same for all models.
  - `max_context_length` integer, nullable — Maximum amount of tokens a context could contains. Make sure it is the same for all models.
  - `cost_prompt_tokens` number, required — Cost of a million prompt tokens (decrease user budget)
  - `cost_completion_tokens` number, required — Cost of a million completion tokens (decrease user budget)
  - `providers` integer — Number of providers in the router.
  - `created` integer, required — Time of creation, as Unix timestamp.
  - `updated` integer, required — Time of last update, as Unix timestamp.

## Other responses

- `401` — Invalid authentication scheme.<br>Invalid API key.
- `403` — User has no admin rights.<br>Your account has expired. Please contact support to renew your account.
- `409` — Following aliases already exist: '{router_aliases}'<br>Router {router_name} already exists.
- `422` — Validation Error

---

[API](https://skmtc.net/betagouv/apis/opengatellm.md) · [All operations](https://skmtc.net/betagouv/apis/opengatellm/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/betagouv/opengatellm/revisions/0db3023472ef/schema)
