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

# Create Router

`POST /v1/admin/routers`

## Request

- The document declares no server URL.
- Auth: HTTP bearer

## Request body

- CreateRouterBody
  - `name` string, required: Name of the model router.
  - `type` 'automatic-speech-recognition' | 'image-to-text' | 'text-classification' | 'text-embeddings-inference' | 'text-generation', 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-to-text' | 'text-classification' | 'text-embeddings-inference' | 'text-generation', 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
  - `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

## Changes

- **2026-09-29** `2f7a4a0aac8f`: 1 info
  - endpoint added
- **2026-09-29** `da70d9cd1957`: 1 breaking
  - api path removed without deprecation
- **2026-09-21** `5fdbd3614b8c`: 1 breaking, 1 info
  - removed the enum value `image-text-to-text` of the request property `type`
  - removed the `image-text-to-text` enum value from the `type` response property for the response status `201`
- **2026-09-02** `b40c3f5c7bfe`: 2 warning
  - removed the optional property `max_context_length` from the response with the `201` status
  - removed the optional property `vector_size` from the response with the `201` status
- **2026-03-10** `ef3add9564c0`: 1 breaking, 14 info
  - the `name` response property's minLength was decreased from `1` to `0` for the response status `201`
  - added the optional property `max_context_length` to the response with the `201` status
  - added the optional property `object` to the response with the `201` status
  - added the optional property `providers` to the response with the `201` status
  - …11 more

[Operation history](https://skmtc.dev/betagouv/apis/opengatellm/changes/v1/admin/routers/post.md)

---

[API](https://skmtc.dev/betagouv/apis/opengatellm.md) - [All operations](https://skmtc.dev/betagouv/apis/opengatellm/llms.txt) - [OpenAPI document](https://skmtc.dev/betagouv/apis/opengatellm/revisions/2f7a4a0aac8f?raw)
