---
title: "Create Provider"
method: POST
path: "/v1/admin/providers"
tags: ["Admin"]
---

# Create Provider

`POST /v1/admin/providers`

## Request

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

## Request body

- CreateProviderBody
  - `type` 'albert' | 'openai' | 'mistral' | 'tei' | 'vllm', required
  - `url` string, nullable: Model provider API url. The url must only contain the domain name (without `/v1` suffix for example). Depends of the model provider type, the url can be optional (Albert, OpenAI).
  - `key` string, nullable: Model provider API key.
  - `basic_auth` BasicAuth
    - `username` string, required
    - `password` string, required
  - `timeout` integer: Timeout for the model provider requests, after user receive an 503 error (model is too busy).
  - `model_name` string, required: Model name from the model provider.
  - `model_hosting_zone` 'ABW' | 'AFG' | 'AGO' | 'AIA' | 'ALA' | 'ALB' | 'AND' | 'ARE' | 'ARG' | 'ARM' | 'ASM' | 'ATA' | 'ATF' | 'ATG' | 'AUS' | 'AUT' | 'AZE' | 'BDI' | 'BEL' | 'BEN' | 'BES' | 'BFA' | 'BGD' | 'BGR' | 'BHR' | 'BHS' | 'BIH' | 'BLM' | 'BLR' | 'BLZ' | 'BMU' | 'BOL' | 'BRA' | 'BRB' | 'BRN' | 'BTN' | 'BVT' | 'BWA' | 'CAF' | 'CAN' | 'CCK' | 'CHE' | 'CHL' | 'CHN' | 'CIV' | 'CMR' | 'COD' | 'COG' | 'COK' | 'COL' | 'COM' | 'CPV' | 'CRI' | 'CUB' | 'CUW' | 'CXR' | 'CYM' | 'CYP' | 'CZE' | 'DEU' | 'DJI' | 'DMA' | 'DNK' | 'DOM' | 'DZA' | 'ECU' | 'EGY' | 'ERI' | 'ESH' | 'ESP' | 'EST' | 'ETH' | 'FIN' | 'FJI' | 'FLK' | 'FRA' | 'FRO' | 'FSM' | 'GAB' | 'GBR' | 'GEO' | 'GGY' | 'GHA' | 'GIB' | 'GIN' | 'GLP' | 'GMB' | 'GNB' | 'GNQ' | 'GRC' | 'GRD' | 'GRL' | 'GTM' | 'GUF' | 'GUM' | 'GUY' | 'HKG' | 'HMD' | 'HND' | 'HRV' | 'HTI' | 'HUN' | 'IDN' | 'IMN' | 'IND' | 'IOT' | 'IRL' | 'IRN' | 'IRQ' | 'ISL' | 'ISR' | 'ITA' | 'JAM' | 'JEY' | 'JOR' | 'JPN' | 'KAZ' | 'KEN' | 'KGZ' | 'KHM' | 'KIR' | 'KNA' | 'KOR' | 'KWT' | 'LAO' | 'LBN' | 'LBR' | 'LBY' | 'LCA' | 'LIE' | 'LKA' | 'LSO' | 'LTU' | 'LUX' | 'LVA' | 'MAC' | 'MAF' | 'MAR' | 'MCO' | 'MDA' | 'MDG' | 'MDV' | 'MEX' | 'MHL' | 'MKD' | 'MLI' | 'MLT' | 'MMR' | 'MNE' | 'MNG' | 'MNP' | 'MOZ' | 'MRT' | 'MSR' | 'MTQ' | 'MUS' | 'MWI' | 'MYS' | 'MYT' | 'NAM' | 'NCL' | 'NER' | 'NFK' | 'NGA' | 'NIC' | 'NIU' | 'NLD' | 'NOR' | 'NPL' | 'NRU' | 'NZL' | 'OMN' | 'PAK' | 'PAN' | 'PCN' | 'PER' | 'PHL' | 'PLW' | 'PNG' | 'POL' | 'PRI' | 'PRK' | 'PRT' | 'PRY' | 'PSE' | 'PYF' | 'QAT' | 'REU' | 'ROU' | 'RUS' | 'RWA' | 'SAU' | 'SDN' | 'SEN' | 'SGP' | 'SGS' | 'SHN' | 'SJM' | 'SLB' | 'SLE' | 'SLV' | 'SMR' | 'SOM' | 'SPM' | 'SRB' | 'SSD' | 'STP' | 'SUR' | 'SVK' | 'SVN' | 'SWE' | 'SWZ' | 'SXM' | 'SYC' | 'SYR' | 'TCA' | 'TCD' | 'TGO' | 'THA' | 'TJK' | 'TKL' | 'TKM' | 'TLS' | 'TON' | 'TTO' | 'TUN' | 'TUR' | 'TUV' | 'TWN' | 'TZA' | 'UGA' | 'UKR' | 'UMI' | 'URY' | 'USA' | 'UZB' | 'VAT' | 'VCT' | 'VEN' | 'VGB' | 'VIR' | 'VNM' | 'VUT' | 'WLF' | 'WOR' | 'WSM' | 'YEM' | 'ZAF' | 'ZMB' | 'ZWE'
  - `model_total_params` integer: Total params of the model in billions of parameters for carbon footprint computation. For more information, see https://ecologits.ai
  - `model_active_params` integer: Active params of the model in billions of parameters for carbon footprint computation. For more information, see https://ecologits.ai
  - `router_id` integer, required: ID of the model to create the provider for (router ID, eg. 123).

## Response `201`

Successful Response

- CreateProviderResponse
  - `id` integer, required: Provider ID.
  - `router_id` integer, required: ID of the router that owns the provider.
  - `user_id` integer, required: ID of the user that owns the provider.
  - `type` 'albert' | 'openai' | 'mistral' | 'tei' | 'vllm', required
  - `url` string, nullable: Provider API url. The url must only contain the domain name (without `/v1` suffix for example).
  - `key` string, nullable: Provider API key.
  - `basic_auth` BasicAuth
    - `username` string, required
    - `password` string, required
  - `timeout` integer, required: Timeout for the provider requests, after user receive an 500 error (model is too busy).
  - `model_name` string, required: Model name from the model provider.
  - `model_hosting_zone` 'ABW' | 'AFG' | 'AGO' | 'AIA' | 'ALA' | 'ALB' | 'AND' | 'ARE' | 'ARG' | 'ARM' | 'ASM' | 'ATA' | 'ATF' | 'ATG' | 'AUS' | 'AUT' | 'AZE' | 'BDI' | 'BEL' | 'BEN' | 'BES' | 'BFA' | 'BGD' | 'BGR' | 'BHR' | 'BHS' | 'BIH' | 'BLM' | 'BLR' | 'BLZ' | 'BMU' | 'BOL' | 'BRA' | 'BRB' | 'BRN' | 'BTN' | 'BVT' | 'BWA' | 'CAF' | 'CAN' | 'CCK' | 'CHE' | 'CHL' | 'CHN' | 'CIV' | 'CMR' | 'COD' | 'COG' | 'COK' | 'COL' | 'COM' | 'CPV' | 'CRI' | 'CUB' | 'CUW' | 'CXR' | 'CYM' | 'CYP' | 'CZE' | 'DEU' | 'DJI' | 'DMA' | 'DNK' | 'DOM' | 'DZA' | 'ECU' | 'EGY' | 'ERI' | 'ESH' | 'ESP' | 'EST' | 'ETH' | 'FIN' | 'FJI' | 'FLK' | 'FRA' | 'FRO' | 'FSM' | 'GAB' | 'GBR' | 'GEO' | 'GGY' | 'GHA' | 'GIB' | 'GIN' | 'GLP' | 'GMB' | 'GNB' | 'GNQ' | 'GRC' | 'GRD' | 'GRL' | 'GTM' | 'GUF' | 'GUM' | 'GUY' | 'HKG' | 'HMD' | 'HND' | 'HRV' | 'HTI' | 'HUN' | 'IDN' | 'IMN' | 'IND' | 'IOT' | 'IRL' | 'IRN' | 'IRQ' | 'ISL' | 'ISR' | 'ITA' | 'JAM' | 'JEY' | 'JOR' | 'JPN' | 'KAZ' | 'KEN' | 'KGZ' | 'KHM' | 'KIR' | 'KNA' | 'KOR' | 'KWT' | 'LAO' | 'LBN' | 'LBR' | 'LBY' | 'LCA' | 'LIE' | 'LKA' | 'LSO' | 'LTU' | 'LUX' | 'LVA' | 'MAC' | 'MAF' | 'MAR' | 'MCO' | 'MDA' | 'MDG' | 'MDV' | 'MEX' | 'MHL' | 'MKD' | 'MLI' | 'MLT' | 'MMR' | 'MNE' | 'MNG' | 'MNP' | 'MOZ' | 'MRT' | 'MSR' | 'MTQ' | 'MUS' | 'MWI' | 'MYS' | 'MYT' | 'NAM' | 'NCL' | 'NER' | 'NFK' | 'NGA' | 'NIC' | 'NIU' | 'NLD' | 'NOR' | 'NPL' | 'NRU' | 'NZL' | 'OMN' | 'PAK' | 'PAN' | 'PCN' | 'PER' | 'PHL' | 'PLW' | 'PNG' | 'POL' | 'PRI' | 'PRK' | 'PRT' | 'PRY' | 'PSE' | 'PYF' | 'QAT' | 'REU' | 'ROU' | 'RUS' | 'RWA' | 'SAU' | 'SDN' | 'SEN' | 'SGP' | 'SGS' | 'SHN' | 'SJM' | 'SLB' | 'SLE' | 'SLV' | 'SMR' | 'SOM' | 'SPM' | 'SRB' | 'SSD' | 'STP' | 'SUR' | 'SVK' | 'SVN' | 'SWE' | 'SWZ' | 'SXM' | 'SYC' | 'SYR' | 'TCA' | 'TCD' | 'TGO' | 'THA' | 'TJK' | 'TKL' | 'TKM' | 'TLS' | 'TON' | 'TTO' | 'TUN' | 'TUR' | 'TUV' | 'TWN' | 'TZA' | 'UGA' | 'UKR' | 'UMI' | 'URY' | 'USA' | 'UZB' | 'VAT' | 'VCT' | 'VEN' | 'VGB' | 'VIR' | 'VNM' | 'VUT' | 'WLF' | 'WOR' | 'WSM' | 'YEM' | 'ZAF' | 'ZMB' | 'ZWE'
  - `model_total_params` integer: Total params of the model in billions of parameters for carbon footprint computation. If not provided, the active params will be used if provided, else carbon footprint will not be computed. For more information, see https://ecologits.ai
  - `model_active_params` integer: Active params of the model in billions of parameters for carbon footprint computation. If not provided, the total params will be used if provided, else carbon footprint will not be computed. For more information, see https://ecologits.ai
  - `created` integer, nullable: Time of creation, as Unix timestamp.
  - `updated` integer, nullable: Time of last update, as Unix timestamp.

## Other responses

- `400`: Inconsistent max context length for {model_name}. Expected: {expected_length}. Actual: {actual_length}<br>Inconsistent vector size for {model_name}. Expected: {expected_size}. Actual: {actual_size}<br>Invalid model provider type {input_type} for {expected_type} router.
- `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.
- `404`: Model {name} not found.<br>Model router {router_id} not found.
- `409`: Model provider {model_name} for url {url} already exists for router {router_id}.
- `422`: Validation Error
- `424`: Model provider {name} not reachable ({status_code}): {detail}<br>Model provider {name} returned an invalid response: {detail}

## Changes

- **2026-09-29** `2f7a4a0aac8f`: 1 info
  - endpoint added
- **2026-09-29** `da70d9cd1957`: 1 breaking
  - api path removed without deprecation
- **2026-09-21** `5fdbd3614b8c`: 4 warning
  - removed the request property `qos_limit`
  - removed the request property `qos_metric`
  - removed the optional property `qos_limit` from the response with the `201` status
  - removed the optional property `qos_metric` from the response with the `201` status
- **2026-09-02** `b40c3f5c7bfe`: 1 breaking
  - removed the enum value `normalized_latency` of the request property `qos_metric/anyOf[subschema #1: Metric]/`
- **2026-06-17** `bb2cc02e42b8`: 2 info
  - added the new optional request property `basic_auth`
  - added the optional property `basic_auth` to the response with the `201` status

[Operation history](https://skmtc.dev/betagouv/apis/opengatellm/changes/v1/admin/providers/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)
