Download OpenAPI specification:
OpenGateLLM connect to your models. You can configuration this swagger UI in the configuration file, like hide routes or change the title.
Create a new key for a user.
| name required | string (Name) non-empty Name of the key. |
| user required | integer (User) User ID to create the token for another user (by default, the current user). Required CREATE_USER permission. |
Expires (integer) or Expires (null) (Expires) Expiration time, as Unix timestamp. If None, the key never expires. | |
| property name* additional property | any |
{- "name": "key-1",
- "user": 0,
- "expires": 0
}{- "object": "key",
- "id": 0,
- "name": "string",
- "value": "string",
- "user": 0,
- "expires": 0,
- "created": 0
}User (integer) or User (null) (User) The user ID to filter keys by. | |
| offset | integer (Offset) >= 0 Default: 0 Number of keys to skip. |
| limit | integer (Limit) [ 1 .. 100 ] Default: 10 Maximum number of keys to return. |
| sort_by | string (SortField) Default: "id" Enum: "id" "name" "created" Field to sort by. |
| sort_order | string (SortOrder) Default: "asc" Enum: "asc" "desc" Sort order. |
{- "object": "list",
- "total": 0,
- "offset": 0,
- "limit": 0,
- "data": [
- {
- "object": "key",
- "id": 0,
- "name": "string",
- "value": "string",
- "user": 0,
- "expires": 0,
- "created": 0
}
]
}| name required | string (Name) non-empty Name of the organization. |
| property name* additional property | any |
{- "name": "my-org"
}{- "object": "organization",
- "id": 0,
- "name": "string",
- "users": 0,
- "created": 0,
- "updated": 0
}| offset | integer (Offset) >= 0 Default: 0 The offset of the organizations to get. |
| limit | integer (Limit) [ 1 .. 100 ] Default: 10 The limit of the organizations to get. |
| order_by | string (Order By) Default: "id" Enum: "id" "name" "created" "updated" The field to order the organizations by. |
| order_direction | string (Order Direction) Default: "asc" Enum: "asc" "desc" The direction to order the organizations by. |
{- "object": "list",
- "data": [
- {
- "object": "organization",
- "id": 0,
- "name": "string",
- "users": 0,
- "created": 0,
- "updated": 0
}
]
}| organization_id required | integer (Organization Id) The ID of the organization to delete. |
{- "object": "organization",
- "id": 0,
- "name": "string",
- "users": 0,
- "created": 0,
- "updated": 0
}| type required | string (ProviderType) Enum: "albert" "openai" "mistral" "tei" "vllm" Model provider type. |
Url (string) or Url (null) (Url) Model provider API url. The url must only contain the domain name (without | |
Key (string) or Key (null) (Key) Model provider API key. | |
BasicAuth (object) or null Model provider basic authentication. | |
| timeout | integer (Timeout) Default: 300 Timeout for the model provider requests, after user receive an 503 error (model is too busy). |
| model_name required | string (Model Name) Model name from the model provider. |
| model_hosting_zone | string (HostingZone) Default: "WOR" Enum: "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 hosting zone using ISO 3166-1 alpha-3 code format (e.g., |
| model_total_params | integer (Model Total Params) >= 0 Default: 0 Total params of the model in billions of parameters for carbon footprint computation. For more information, see https://ecologits.ai |
| model_active_params | integer (Model Active Params) >= 0 Default: 0 Active params of the model in billions of parameters for carbon footprint computation. For more information, see https://ecologits.ai |
Metric (string) or null The metric to use for the quality of service policy. If not provided, no QoS policy is applied. | |
Qos Limit (number) or Qos Limit (null) (Qos Limit) The value to use for the quality of service. Depends of the metric, the value can be a percentile, a threshold, etc. | |
| router_id required | integer (Router Id) ID of the model to create the provider for (router ID, eg. 123). |
| property name* additional property | any |
{- "type": "albert",
- "url": "string",
- "key": "string",
- "basic_auth": {
- "username": "string",
- "password": "string"
}, - "timeout": 300,
- "model_name": "string",
- "model_hosting_zone": "ABW",
- "model_total_params": 0,
- "model_active_params": 0,
- "qos_metric": "ttft",
- "qos_limit": 0,
- "router_id": 0
}{- "id": 0,
- "router_id": 0,
- "user_id": 0,
- "type": "albert",
- "url": "string",
- "key": "string",
- "basic_auth": {
- "username": "string",
- "password": "string"
}, - "timeout": 1,
- "model_name": "string",
- "model_hosting_zone": "ABW",
- "model_total_params": 0,
- "model_active_params": 0,
- "qos_metric": "ttft",
- "qos_limit": 0,
- "created": 0,
- "updated": 0
}Router Id (integer) or Router Id (null) (Router Id) Filter providers by router ID. | |
| offset | integer (Offset) >= 0 Default: 0 Number of providers to skip. |
| limit | integer (Limit) [ 1 .. 100 ] Default: 10 Maximum number of providers to return. |
| sort_by | string (ProviderSortField) Default: "id" Enum: "id" "model_name" "created" Field to sort by. |
| sort_order | string (SortOrder) Default: "asc" Enum: "asc" "desc" Sort order. |
{- "object": "list",
- "total": 0,
- "offset": 0,
- "limit": 0,
- "data": [
- {
- "object": "provider",
- "id": 0,
- "router_id": 0,
- "user_id": 0,
- "type": "albert",
- "url": "string",
- "timeout": 0,
- "model_name": "string",
- "model_hosting_zone": "ABW",
- "model_total_params": 0,
- "model_active_params": 0,
- "qos_metric": "ttft",
- "qos_limit": 0,
- "created": 0,
- "updated": 0
}
]
}| provider_id required | integer (Provider Id) The ID of the provider to delete. |
{- "object": "provider",
- "id": 0,
- "router_id": 0,
- "user_id": 0,
- "type": "albert",
- "url": "string",
- "timeout": 0,
- "model_name": "string",
- "model_hosting_zone": "ABW",
- "model_total_params": 0,
- "model_active_params": 0,
- "qos_metric": "ttft",
- "qos_limit": 0,
- "created": 0,
- "updated": 0
}| provider_id required | integer (Provider Id) The ID of the provider to update. |
Router Id (integer) or Router Id (null) (Router Id) The ID of the new router to assign to the provider. | |
Timeout (integer) or Timeout (null) (Timeout) Timeout for the model provider requests, after user receive an 500 error (model is too busy). | |
HostingZone (string) or null Model hosting zone using ISO 3166-1 alpha-3 code format (e.g., | |
Model Total Params (integer) or Model Total Params (null) (Model Total Params) 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) or Model Active Params (null) (Model Active Params) 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 | |
QoSMetric (string) or null The metric to use for the quality of service policy. If not provided, no QoS policy is applied. | |
Qos Limit (number) or Qos Limit (null) (Qos Limit) The value to use for the quality of service. Depends of the metric, the value can be a percentile, a threshold, etc. | |
| property name* additional property | any |
{- "router_id": 0,
- "timeout": 0,
- "model_hosting_zone": "ABW",
- "model_total_params": 0,
- "model_active_params": 0,
- "qos_metric": "ttft",
- "qos_limit": 0
}{- "object": "provider",
- "id": 0,
- "router_id": 0,
- "user_id": 0,
- "type": "albert",
- "url": "string",
- "timeout": 0,
- "model_name": "string",
- "model_hosting_zone": "ABW",
- "model_total_params": 0,
- "model_active_params": 0,
- "qos_metric": "ttft",
- "qos_limit": 0,
- "created": 0,
- "updated": 0
}| provider_id required | integer (Provider Id) The ID of the provider to get. |
{- "object": "provider",
- "id": 0,
- "router_id": 0,
- "user_id": 0,
- "type": "albert",
- "url": "string",
- "timeout": 0,
- "model_name": "string",
- "model_hosting_zone": "ABW",
- "model_total_params": 0,
- "model_active_params": 0,
- "qos_metric": "ttft",
- "qos_limit": 0,
- "created": 0,
- "updated": 0
}Name (string) or Name (null) (Name) Name of the role. | |
Array of Permissions (strings) or Permissions (null) (Permissions) List of permissions. | |
Array of Limits (objects) or Limits (null) (Limits) List of limits. | |
| property name* additional property | any |
{- "name": "my-role",
- "permissions": [
- "admin"
], - "limits": [
- {
- "router_id": 0,
- "type": "tpm",
- "value": 0
}
]
}{- "object": "role",
- "id": 0,
- "name": "string",
- "permissions": [
- "admin"
], - "limits": [
- {
- "router_id": 0,
- "type": "tpm",
- "value": 0
}
], - "users": 0,
- "created": 0,
- "updated": 0
}| offset | integer (Offset) >= 0 Default: 0 Number of roles to skip. |
| limit | integer (Limit) [ 1 .. 100 ] Default: 10 Maximum number of roles to return. |
| sort_by | string (SortField) Default: "id" Enum: "id" "name" "created" Field to sort by. |
| sort_order | string (SortOrder) Default: "asc" Enum: "asc" "desc" Sort order. |
{- "object": "list",
- "total": 0,
- "offset": 0,
- "limit": 0,
- "data": [
- {
- "object": "role",
- "id": 0,
- "name": "string",
- "permissions": [
- "admin"
], - "limits": [
- {
- "router_id": 0,
- "type": "tpm",
- "value": 0
}
], - "users": 0,
- "created": 0,
- "updated": 0
}
]
}| role_id required | integer (Role Id) The ID of the role to update. |
Name (string) or Name (null) (Name) Name of the role. | |
Array of Permissions (strings) or Permissions (null) (Permissions) List of permissions. | |
Array of Limits (objects) or Limits (null) (Limits) List of limits. | |
| property name* additional property | any |
{- "name": "my-role",
- "permissions": [
- "admin"
], - "limits": [
- {
- "router_id": 0,
- "type": "tpm",
- "value": 0
}
]
}{- "object": "role",
- "id": 0,
- "name": "string",
- "permissions": [
- "admin"
], - "limits": [
- {
- "router_id": 0,
- "type": "tpm",
- "value": 0
}
], - "users": 0,
- "created": 0,
- "updated": 0
}| role_id required | integer (Role Id) The ID of the role to get. |
{- "object": "role",
- "id": 0,
- "name": "string",
- "permissions": [
- "admin"
], - "limits": [
- {
- "router_id": 0,
- "type": "tpm",
- "value": 0
}
], - "users": 0,
- "created": 0,
- "updated": 0
}| role_id required | integer (Role Id) The ID of the role to delete. |
{- "object": "role",
- "id": 0,
- "name": "string",
- "permissions": [
- "admin"
], - "limits": [
- {
- "router_id": 0,
- "type": "tpm",
- "value": 0
}
], - "users": 0,
- "created": 0,
- "updated": 0
}| name required | string (Name) non-empty Name of the model router. |
| type required | string (ModelType-Input) Enum: "automatic-speech-recognition" "image-text-to-text" "image-to-text" "text-embeddings-inference" "text-generation" "text-classification" Type of the model router. It will be used to identify the model router type. |
| aliases | Array of strings (Aliases) [ items [ 1 .. 64 ] characters ] Aliases of the model. It will be used to identify the model by users. |
| load_balancing_strategy | string (RouterLoadBalancingStrategy) Default: "shuffle" Enum: "shuffle" "least_busy" Routing strategy for load balancing between providers of the model. It will be used to identify the model type. |
| cost_prompt_tokens | number (Cost Prompt Tokens) >= 0 Default: 0 Cost of a million prompt tokens (decrease user budget) |
| cost_completion_tokens | number (Cost Completion Tokens) >= 0 Default: 0 Cost of a million completion tokens (decrease user budget) |
| property name* additional property | any |
{- "name": "model-router-1",
- "type": "automatic-speech-recognition",
- "aliases": [
- "model-alias",
- "model-alias-2"
], - "load_balancing_strategy": "shuffle",
- "cost_prompt_tokens": 0,
- "cost_completion_tokens": 0
}{- "object": "router",
- "id": 0,
- "name": "string",
- "user_id": 0,
- "type": "automatic-speech-recognition",
- "aliases": [
- "model-alias",
- "model-alias-2"
], - "load_balancing_strategy": "shuffle",
- "vector_size": 0,
- "max_context_length": 0,
- "cost_prompt_tokens": 0,
- "cost_completion_tokens": 0,
- "providers": 0,
- "created": 0,
- "updated": 0
}| offset | integer (Offset) >= 0 Default: 0 Number of routers to skip. |
| limit | integer (Limit) [ 1 .. 100 ] Default: 10 Maximum number of routers to return. |
| sort_by | string (SortField) Default: "id" Enum: "id" "name" "created" Field to sort by. |
| sort_order | string (SortOrder) Default: "asc" Enum: "asc" "desc" Sort order. |
{- "object": "list",
- "total": 0,
- "offset": 0,
- "limit": 0,
- "data": [
- {
- "object": "router",
- "id": 0,
- "name": "string",
- "user_id": 0,
- "type": "automatic-speech-recognition",
- "aliases": [
- "model-alias",
- "model-alias-2"
], - "load_balancing_strategy": "shuffle",
- "vector_size": 0,
- "max_context_length": 0,
- "cost_prompt_tokens": 0,
- "cost_completion_tokens": 0,
- "providers": 0,
- "created": 0,
- "updated": 0
}
]
}| router_id required | integer (Router Id) The router ID. |
{- "object": "router",
- "id": 0,
- "name": "string",
- "user_id": 0,
- "type": "automatic-speech-recognition",
- "aliases": [
- "model-alias",
- "model-alias-2"
], - "load_balancing_strategy": "shuffle",
- "vector_size": 0,
- "max_context_length": 0,
- "cost_prompt_tokens": 0,
- "cost_completion_tokens": 0,
- "providers": 0,
- "created": 0,
- "updated": 0
}| router_id required | integer (Router Id) The ID of the router to delete (router ID, eg. 123). |
{- "object": "router",
- "id": 0,
- "name": "string",
- "user_id": 0,
- "type": "automatic-speech-recognition",
- "aliases": [
- "model-alias",
- "model-alias-2"
], - "load_balancing_strategy": "shuffle",
- "vector_size": 0,
- "max_context_length": 0,
- "cost_prompt_tokens": 0,
- "cost_completion_tokens": 0,
- "providers": 0,
- "created": 0,
- "updated": 0
}| router_id required | integer (Router Id) The ID of the router to update (router ID, eg. 123). |
Name (string) or Name (null) (Name) Name of the model router. | |
ModelType (string) or null Type of the model router. It will be used to identify the model router type. | |
Array of Aliases (strings) or Aliases (null) (Aliases) Aliases of the model. It will be used to identify the model by users. | |
RouterLoadBalancingStrategy (string) or null Routing strategy for load balancing between providers of the model. It will be used to identify the model type. | |
Cost Prompt Tokens (number) or Cost Prompt Tokens (null) (Cost Prompt Tokens) Cost of a million prompt tokens (decrease user budget) | |
Cost Completion Tokens (number) or Cost Completion Tokens (null) (Cost Completion Tokens) Cost of a million completion tokens (decrease user budget) | |
| property name* additional property | any |
{- "name": "model-router-1",
- "type": "text-generation",
- "aliases": [
- "model-alias",
- "model-alias-2"
], - "load_balancing_strategy": "least_busy",
- "cost_prompt_tokens": 0,
- "cost_completion_tokens": 0
}{- "object": "router",
- "id": 0,
- "name": "string",
- "user_id": 0,
- "type": "automatic-speech-recognition",
- "aliases": [
- "model-alias",
- "model-alias-2"
], - "load_balancing_strategy": "shuffle",
- "vector_size": 0,
- "max_context_length": 0,
- "cost_prompt_tokens": 0,
- "cost_completion_tokens": 0,
- "providers": 0,
- "created": 0,
- "updated": 0
}| email required | string (Email) [ 1 .. 254 ] characters The user email. |
Name (string) or Name (null) (Name) The user name. | |
| password required | string (Password) [ 6 .. 72 ] characters The user password. |
| role_id required | integer (Role Id) The role ID. |
Organization Id (integer) or Organization Id (null) (Organization Id) The organization ID. | |
Budget (number) or Budget (null) (Budget) The budget. | |
Expires (integer) or Expires (null) (Expires) The expiration timestamp. | |
| priority | integer (Priority) >= 0 Default: 0 The user priority. Higher value means higher priority. |
| property name* additional property | any |
{- "email": "string",
- "name": "string",
- "password": "string",
- "role_id": 0,
- "organization_id": 0,
- "budget": 0,
- "expires": 0,
- "priority": 0
}{- "object": "user",
- "id": 0,
- "email": "string",
- "name": "string",
- "sub": "string",
- "iss": "string",
- "role_id": 0,
- "organization_id": 0,
- "budget": 0,
- "expires": 0,
- "created": 0,
- "updated": 0,
- "priority": 0
}Role Id (integer) or Role Id (null) (Role Id) The ID of the role to filter the users by. | |
Organization Id (integer) or Organization Id (null) (Organization Id) The ID of the organization to filter the users by. | |
Email (string) or Email (null) (Email) Email substring to filter the users by. | |
| offset | integer (Offset) >= 0 Default: 0 Number of users to skip. |
| limit | integer (Limit) [ 1 .. 100 ] Default: 10 Maximum number of users to return. |
| sort_by | string (UserSortField) Default: "id" Enum: "id" "email" "created" "updated" Field to sort by. |
| sort_order | string (SortOrder) Default: "asc" Enum: "asc" "desc" Sort order. |
{- "object": "list",
- "total": 0,
- "offset": 0,
- "limit": 0,
- "data": [
- {
- "object": "user",
- "id": 0,
- "email": "string",
- "name": "string",
- "sub": "string",
- "iss": "string",
- "role_id": 0,
- "organization_id": 0,
- "budget": 0,
- "expires": 0,
- "created": 0,
- "updated": 0,
- "priority": 0
}
]
}| user_id required | integer (User Id) The ID of the user to get. |
{- "object": "user",
- "id": 0,
- "email": "string",
- "name": "string",
- "sub": "string",
- "iss": "string",
- "role_id": 0,
- "organization_id": 0,
- "budget": 0,
- "expires": 0,
- "created": 0,
- "updated": 0,
- "priority": 0
}| user_id required | integer (User Id) The ID of the user to delete. |
{- "object": "user",
- "id": 0,
- "email": "string",
- "name": "string",
- "sub": "string",
- "iss": "string",
- "role_id": 0,
- "organization_id": 0,
- "budget": 0,
- "expires": 0,
- "created": 0,
- "updated": 0,
- "priority": 0
}| user_id required | integer (User Id) The ID of the user to update. |
Email (string) or Email (null) (Email) The new user email. If None, the user email is not changed. | |
Name (string) or Name (null) (Name) The new user name. If None, the user name is not changed. | |
Current Password (string) or Current Password (null) (Current Password) The current user password. | |
Password (string) or Password (null) (Password) The new user password. If None, the user password is not changed. | |
Role Id (integer) or Role Id (null) (Role Id) The new role ID. If None, the user role is not changed. | |
Organization Id (integer) or Organization Id (null) (Organization Id) The new organization ID. If None, the user will be removed from the organization if he was in one. | |
Budget (number) or Budget (null) (Budget) The new budget. If None, the user will have no budget. | |
Expires (integer) or Expires (null) (Expires) The new expiration timestamp. If None, the user will never expire. | |
Priority (integer) or Priority (null) (Priority) The new user priority. Higher value means higher priority. If None, unchanged. | |
| property name* additional property | any |
{- "email": "string",
- "name": "string",
- "current_password": "string",
- "password": "string",
- "role_id": 0,
- "organization_id": 0,
- "budget": 0,
- "expires": 0,
- "priority": 0
}{- "object": "user",
- "id": 0,
- "email": "string",
- "name": "string",
- "sub": "string",
- "iss": "string",
- "role_id": 0,
- "organization_id": 0,
- "budget": 0,
- "expires": 0,
- "created": 0,
- "updated": 0,
- "priority": 0
}| organization required | integer (Organization) The ID of the organization to update. |
Name (string) or Name (null) (Name) The new organization name. | |
| property name* additional property | any |
{- "name": "string"
}{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string",
- "input": null,
- "ctx": { }
}
]
}| file required | string <application/octet-stream> (File) The audio file object (not file name) to transcribe, in one of these formats: mp3 or wav. |
| model required | string (Model) ID of the model to use. Call |
AudioTranscriptionLanguage (string) or null The language of the output audio. If the output language is different than the audio language, the audio language will be translated into the output language. Output language must be supplied in ISO-639-1 format (e.g. en, fr) format. | |
| prompt | string (Prompt) Default: "" An optional text to tell the model what to do with the input audio. |
| response_format | string (AudioTranscriptionsResponseFormat) Default: "json" Enum: "json" "text" "verbose_json" "diarized_json" "srt" "vtt" The format of the transcript output: |
| temperature | number (Temperature) [ 0 .. 1 ] Default: 0 The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit. |
{- "id": "string",
- "text": "string",
- "model": "string",
- "segments": [
- {
- "id": 0,
- "type": "transcript.text.segment",
- "text": "string",
- "start": 0,
- "end": 0,
- "speaker": "string"
}
], - "usage": {
- "prompt_tokens": 0,
- "completion_tokens": 0,
- "total_tokens": 0,
- "cost": 0,
- "impacts": {
- "kWh": 0,
- "kgCO2eq": 0
}
}
}| email required | string (Email) [ 1 .. 254 ] characters The user email. |
| password required | string (Password) [ 1 .. 72 ] characters The user password. |
| property name* additional property | any |
{- "email": "string",
- "password": "string"
}{- "object": "key",
- "id": 0,
- "name": "string",
- "value": "string",
- "user": 0,
- "expires": 0,
- "created": 0
}| sub required | string (Sub) non-empty Subject identifier from the OIDC id_token. |
| iss required | string (Iss) non-empty Issuer identifier from the OIDC id_token. |
| exp required | integer (Exp) Expiration timestamp (seconds since epoch) from the OIDC id_token. |
object (Claims) OIDC claims from the identity provider access token /userinfo endpoint. | |
| property name* additional property | any |
{- "sub": "string",
- "iss": "string",
- "exp": 0,
- "claims": { }
}{- "object": "key",
- "id": 0,
- "name": "string",
- "value": "string",
- "user": 0,
- "expires": 0,
- "created": 0
}Creates a model response for the given chat conversation.
| messages required | Array of any (Messages) A list of messages comprising the conversation so far. |
| model required | string (Model) ID of the model to use. Call |
Frequency Penalty (number) or Frequency Penalty (null) (Frequency Penalty) Default: 0 Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. | |
Logit Bias (object) or Logit Bias (null) (Logit Bias) Modify the likelihood of specified tokens appearing in the completion. Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token. | |
Logprobs (boolean) or Logprobs (null) (Logprobs) Default: false Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the | |
Top Logprobs (integer) or Top Logprobs (null) (Top Logprobs) An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. | |
Presence Penalty (number) or Presence Penalty (null) (Presence Penalty) Default: 0 Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. | |
Max Completion Tokens (integer) or Max Completion Tokens (null) (Max Completion Tokens) An upper bound for the number of tokens that can be generated for a completion. | |
N (integer) or N (null) (N) Default: 1 How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep | |
Response Format (any) or Response Format (null) (Response Format) Setting to | |
Seed (integer) or Seed (null) (Seed) If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same | |
Stop (string) or Array of Stop (strings) or Stop (null) (Stop) Up to 4 sequences where the API will stop generating further tokens. | |
Stream (boolean) or Stream (null) (Stream) Default: false If set, partial message deltas will be sent. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message. | |
Stream Options (any) or Stream Options (null) (Stream Options) Options for streaming response. Only set this when you set | |
Temperature (number) or Temperature (null) (Temperature) What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or | |
Top P (number) or Top P (null) (Top P) An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. | |
(Tools (Array of Tools (objects) or Tools (null))) or Tools (null) (Tools) | |
| tool_choice | any (Tool Choice) Default: "none" Controls which (if any) tool is called by the model. |
Parallel Tool Calls (boolean) or Parallel Tool Calls (null) (Parallel Tool Calls) Default: false Whether to call tools in parallel or sequentially. If true, the model will call tools in parallel. If false, the model will call tools sequentially. If None, the model will call tools in parallel if the model supports it, otherwise it will call tools sequentially. | |
User (string) or User (null) (User) A unique identifier representing the user. | |
| property name* additional property | any |
{- "messages": [
- null
], - "model": "string",
- "frequency_penalty": 0,
- "logit_bias": {
- "property1": 0,
- "property2": 0
}, - "logprobs": false,
- "top_logprobs": 0,
- "presence_penalty": 0,
- "max_completion_tokens": 0,
- "n": 1,
- "response_format": { },
- "seed": 0,
- "stop": "string",
- "stream": false,
- "stream_options": { },
- "temperature": 0,
- "top_p": 0,
- "tools": [
- { }
], - "tool_choice": "none",
- "parallel_tool_calls": false,
- "user": "string"
}{- "id": "string",
- "choices": [
- {
- "finish_reason": "stop",
- "index": 0,
- "logprobs": {
- "content": [
- {
- "token": "string",
- "bytes": [
- 0
], - "logprob": 0,
- "top_logprobs": [
- {
- "token": "string",
- "bytes": [
- 0
], - "logprob": 0
}
]
}
], - "refusal": [
- {
- "token": "string",
- "bytes": [
- 0
], - "logprob": 0,
- "top_logprobs": [
- {
- "token": "string",
- "bytes": [
- 0
], - "logprob": 0
}
]
}
]
}, - "message": {
- "content": "string",
- "refusal": "string",
- "role": "assistant",
- "annotations": [
- {
- "type": "url_citation",
- "url_citation": {
- "end_index": 0,
- "start_index": 0,
- "title": "string",
- "url": "string"
}
}
], - "audio": {
- "id": "string",
- "data": "string",
- "expires_at": 0,
- "transcript": "string"
}, - "function_call": {
- "arguments": "string",
- "name": "string"
}, - "tool_calls": [
- {
- "id": "string",
- "function": {
- "arguments": "string",
- "name": "string"
}, - "type": "function"
}
]
}
}
], - "created": 0,
- "model": "string",
- "object": "chat.completion",
- "service_tier": "auto",
- "system_fingerprint": "string",
- "usage": {
- "prompt_tokens": 0,
- "completion_tokens": 0,
- "total_tokens": 0,
- "cost": 0,
- "carbon": {
- "kWh": {
- "min": 0,
- "max": 0
}, - "kgCO2eq": {
- "min": 0,
- "max": 0
}
}, - "impacts": {
- "kWh": 0,
- "kgCO2eq": 0
}, - "requests": 0
}
}| model required | string (Model) non-empty ID of the model to use. Call |
(Input (Array of Input (integers) or Array of Input (integers) or Input (string) or Array of Input (strings))) or Input (null) (Input) Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (call | |
Dimensions (integer) or Dimensions (null) (Dimensions) The number of dimensions the resulting output embeddings should have. | |
| encoding_format | string (EncodingFormat) Default: "float" Enum: "float" "base64" The format of the output embeddings. |
| property name* additional property | any |
{- "model": "string",
- "input": [
- 0
], - "dimensions": 0,
- "encoding_format": "float"
}{- "data": [
- {
- "embedding": [
- 0
], - "index": 0,
- "object": "embedding"
}
], - "model": "string",
- "object": "list",
- "usage": {
- "prompt_tokens": 0,
- "completion_tokens": 0,
- "total_tokens": 0,
- "cost": 0,
- "impacts": {
- "kWh": 0,
- "kgCO2eq": 0
}
}, - "id": "string"
}Create a new API key for the authenticated user.
| name required | string (Name) non-empty Name of the key. |
Expires (integer) or Expires (null) (Expires) Expiration time, as Unix timestamp. If None, uses the configured maximum key lifetime when set, otherwise the key never expires. | |
| property name* additional property | any |
{- "name": "key-1",
- "expires": 0
}{- "object": "key",
- "id": 0,
- "name": "string",
- "value": "string",
- "user": 0,
- "expires": 0,
- "created": 0
}Get all your keys.
| offset | integer (Offset) >= 0 Default: 0 Number of keys to skip. |
| limit | integer (Limit) [ 1 .. 100 ] Default: 10 Maximum number of keys to return. |
| sort_by | string (SortField) Default: "id" Enum: "id" "name" "created" Field to sort by. |
| sort_order | string (SortOrder) Default: "asc" Enum: "asc" "desc" Sort order. |
{- "object": "list",
- "total": 0,
- "offset": 0,
- "limit": 0,
- "data": [
- {
- "object": "key",
- "id": 0,
- "name": "string",
- "value": "string",
- "user": 0,
- "expires": 0,
- "created": 0
}
]
}Create a new API key for the authenticated user.
| name required | string (Name) non-empty Name of the key. |
Expires (integer) or Expires (null) (Expires) Expiration time, as Unix timestamp. If None, uses the configured maximum key lifetime when set, otherwise the key never expires. | |
| property name* additional property | any |
{- "name": "key-1",
- "expires": 0
}{- "object": "key",
- "id": 0,
- "name": "string",
- "value": "string",
- "user": 0,
- "expires": 0,
- "created": 0
}Get all your keys.
| offset | integer (Offset) >= 0 Default: 0 Number of keys to skip. |
| limit | integer (Limit) [ 1 .. 100 ] Default: 10 Maximum number of keys to return. |
| sort_by | string (SortField) Default: "id" Enum: "id" "name" "created" Field to sort by. |
| sort_order | string (SortOrder) Default: "asc" Enum: "asc" "desc" Sort order. |
{- "object": "list",
- "total": 0,
- "offset": 0,
- "limit": 0,
- "data": [
- {
- "object": "key",
- "id": 0,
- "name": "string",
- "value": "string",
- "user": 0,
- "expires": 0,
- "created": 0
}
]
}Get one of your API keys by ID.
| key_id required | integer (Key Id) The ID of the key to get. |
{- "object": "key",
- "id": 0,
- "name": "string",
- "value": "string",
- "user": 0,
- "expires": 0,
- "created": 0
}Get one of your API keys by ID.
| key_id required | integer (Key Id) The ID of the key to get. |
{- "object": "key",
- "id": 0,
- "name": "string",
- "value": "string",
- "user": 0,
- "expires": 0,
- "created": 0
}Delete an API key.
| key_id required | integer (Key Id) The ID of the key to delete. |
{- "object": "key",
- "id": 0,
- "name": "string",
- "value": "string",
- "user": 0,
- "expires": 0,
- "created": 0
}{- "object": "userInfo",
- "id": 0,
- "email": "string",
- "name": "string",
- "organization_id": 0,
- "budget": 0,
- "permissions": [
- "admin"
], - "limits": [
- {
- "router_id": 0,
- "type": "tpm",
- "value": 0
}
], - "expires": 0
}Update information about the current user.
| name required | string (Name) non-empty The user name. |
| email required | string (Email) [ 1 .. 254 ] characters The user email. |
Current Password (string) or Current Password (null) (Current Password) The current user password. If None, the password is not changed and | |
Password (string) or Password (null) (Password) The new user password. Required when | |
| property name* additional property | any |
{- "name": "string",
- "email": "string",
- "current_password": "string",
- "password": "string"
}{- "status_code": 0,
- "detail": "string",
- "headers": {
- "property1": "string",
- "property2": "string"
}
}{- "object": "userInfo",
- "id": 0,
- "email": "string",
- "name": "string",
- "organization_id": 0,
- "budget": 0,
- "permissions": [
- "admin"
], - "limits": [
- {
- "router_id": 0,
- "type": "tpm",
- "value": 0
}
], - "expires": 0
}Update information about the current user.
| name required | string (Name) non-empty The user name. |
| email required | string (Email) [ 1 .. 254 ] characters The user email. |
Current Password (string) or Current Password (null) (Current Password) The current user password. If None, the password is not changed and | |
Password (string) or Password (null) (Password) The new user password. Required when | |
| property name* additional property | any |
{- "name": "string",
- "email": "string",
- "current_password": "string",
- "password": "string"
}{- "status_code": 0,
- "detail": "string",
- "headers": {
- "property1": "string",
- "property2": "string"
}
}Lists the currently available models and provides basic information.
{- "object": "list",
- "data": [
- {
- "object": "model",
- "id": "string",
- "type": "text-generation",
- "aliases": [
- "model-alias",
- "model-alias-2"
], - "created": 0,
- "owned_by": "string",
- "max_context_length": 0,
- "costs": {
- "prompt_tokens": 0,
- "completion_tokens": 0
}
}
]
}Get a model by name and provide basic information.
| model required | string (Model) The name of the model to get. |
{- "object": "model",
- "id": "string",
- "type": "text-generation",
- "aliases": [
- "model-alias",
- "model-alias-2"
], - "created": 0,
- "owned_by": "string",
- "max_context_length": 0,
- "costs": {
- "prompt_tokens": 0,
- "completion_tokens": 0
}
}Extracts text from files using Mistral Document AI pipeline
ResponseFormat (object) or null Specify the format that the model must output for the bounding boxes. By default it will use | |
required | DocumentURLChunk (object) or ImageURLChunk (object) (Document) Document to run OCR on. |
ResponseFormat (object) or null Specify the format that the model must output for the document. By default it will use | |
Document Annotation Prompt (string) or Document Annotation Prompt (null) (Document Annotation Prompt) Optional prompt to guide the model in extracting structured output from the entire document. A document_annotation_format must be provided. | |
| extract_footer | boolean (Extract Footer) Default: false Whether to extract the footer of the document. |
| extract_header | boolean (Extract Header) Default: false Whether to extract the header of the document. |
Image Limit (integer) or Image Limit (null) (Image Limit) Max images to extract | |
Image Min Size (integer) or Image Min Size (null) (Image Min Size) Minimum height and width of image to extract | |
Include Image Base64 (boolean) or Include Image Base64 (null) (Include Image Base64) Include image URLs in response | |
Model (string) or Model (null) (Model) The model to use for the OCR, call | |
Array of Pages (integers) or Pages (null) (Pages) Specific pages to process. Accepts a list of integers or a string of comma-separated numbers and ranges (e.g. '0,1,2' or '0-5' or '0,2-4'). Page numbers start from 0. | |
Table Format (string) or Table Format (null) (Table Format) Format for table extraction: 'markdown' (default) or 'html'. | |
| property name* additional property | any |
{- "bbox_annotation_format": {
- "type": "text",
- "json_schema": {
- "name": "string",
- "schema": { },
- "strict": false,
- "description": "string"
}
}, - "document": {
- "document_name": "string",
- "document_url": "string",
- "type": "document_url"
}, - "document_annotation_format": {
- "type": "text",
- "json_schema": {
- "name": "string",
- "schema": { },
- "strict": false,
- "description": "string"
}
}, - "document_annotation_prompt": "string",
- "extract_footer": false,
- "extract_header": false,
- "image_limit": 0,
- "image_min_size": 0,
- "include_image_base64": true,
- "model": "string",
- "pages": [
- 0
], - "table_format": "markdown"
}{- "document_annotation": "string",
- "id": "string",
- "model": "string",
- "pages": [
- {
- "dimensions": {
- "dpi": 0,
- "height": 0,
- "width": 0
}, - "footer": "string",
- "header": "string",
- "hyperlinks": [ ],
- "images": [
- {
- "bottom_right_x": 0,
- "bottom_right_y": 0,
- "id": "string",
- "image_annotation": "string",
- "image_base64": "string",
- "top_left_x": 0,
- "top_left_y": 0
}
], - "index": 0,
- "markdown": "string",
- "tables": [ ]
}
], - "usage": {
- "prompt_tokens": 0,
- "completion_tokens": 0,
- "total_tokens": 0,
- "cost": 0,
- "impacts": {
- "kWh": 0,
- "kgCO2eq": 0
}
}, - "usage_info": {
- "doc_size_bytes": 0,
- "pages_processed": 0
}
}| query required | string (Query) non-empty The search query to use for the reranking. |
| documents required | Array of strings (Documents) [ items non-empty ] |
| model required | string (Model) non-empty The model to use for the reranking, call |
Top N (integer) or Top N (null) (Top N) The number of top results to return. If set to None, all results will be returned. | |
| property name* additional property | any |
{- "query": "string",
- "documents": [
- "string"
], - "model": "string",
- "top_n": 1
}{- "object": "list",
- "id": "string",
- "results": [
- {
- "relevance_score": 0,
- "index": 0
}
], - "model": "string",
- "usage": {
- "prompt_tokens": 0,
- "completion_tokens": 0,
- "total_tokens": 0,
- "cost": 0,
- "impacts": {
- "kWh": 0,
- "kgCO2eq": 0
}
}
}Get usage for the current user.
| offset | integer (Offset) >= 0 Default: 0 Number of usages to skip. |
| limit | integer (Limit) [ 1 .. 100 ] Default: 10 Maximum number of usages to return. |
Start Time (integer) or Start Time (null) (Start Time) Start time as Unix timestamp (if not provided, will be set to 30 days ago). | |
End Time (integer) or End Time (null) (End Time) End time as Unix timestamp (if not provided, will be set to now). | |
EndpointUsage (string) or Endpoint (null) (Endpoint) The endpoint to get usage for. |
{- "object": "list",
- "total": 0,
- "offset": 0,
- "limit": 0,
- "data": [
- {
- "object": "usage",
- "model": "string",
- "key": "string",
- "endpoint": "string",
- "usage": {
- "prompt_tokens": 0,
- "completion_tokens": 0,
- "total_tokens": 0,
- "cost": 0,
- "impacts": {
- "kWh": 0,
- "kgCO2eq": 0
}
}, - "created": 0
}
]
}Get usage for the current user.
| offset | integer (Offset) >= 0 Default: 0 Number of usages to skip. |
| limit | integer (Limit) [ 1 .. 100 ] Default: 10 Maximum number of usages to return. |
Start Time (integer) or Start Time (null) (Start Time) Start time as Unix timestamp (if not provided, will be set to 30 days ago). | |
End Time (integer) or End Time (null) (End Time) End time as Unix timestamp (if not provided, will be set to now). | |
EndpointUsage (string) or Endpoint (null) (Endpoint) The endpoint to get usage for. |
{- "object": "list",
- "total": 0,
- "offset": 0,
- "limit": 0,
- "data": [
- {
- "object": "usage",
- "model": "string",
- "key": "string",
- "endpoint": "string",
- "usage": {
- "prompt_tokens": 0,
- "completion_tokens": 0,
- "total_tokens": 0,
- "cost": 0,
- "impacts": {
- "kWh": 0,
- "kgCO2eq": 0
}
}, - "created": 0
}
]
}