# \ModelsApi
All URIs are relative to *https://api.spatio.app*
[**create_model**](ModelsApi.md#create_model) | **POST** /v1/models | Register a model (admin-only).
[**delete_model**](ModelsApi.md#delete_model) | **DELETE** /v1/models/{id} | Delete a model (admin-only).
[**get_active_model**](ModelsApi.md#get_active_model) | **GET** /v1/models/active | Get the active model for a given provider.
[**get_model**](ModelsApi.md#get_model) | **GET** /v1/models/{id} | Fetch a model.
[**list_models**](ModelsApi.md#list_models) | **GET** /v1/models | List every LLM model the platform knows about.
[**set_active_model**](ModelsApi.md#set_active_model) | **POST** /v1/models/{id}/activate | Set a model as the active default for its provider (admin-only).
[**update_model**](ModelsApi.md#update_model) | **PATCH** /v1/models/{id} | Update a model (admin-only).
## create_model
> std::collections::HashMap<String, serde_json::Value> create_model(request_body)
Register a model (admin-only).
### Parameters
**request_body** | [**std::collections::HashMap<String, serde_json::Value>**](SerdeJson__Value.md) | | [required] |
### Return type
[**std::collections::HashMap<String, serde_json::Value>**](serde_json::Value.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## delete_model
> delete_model(id)
Delete a model (admin-only).
### Parameters
**id** | **String** | | [required] |
### Return type
(empty response body)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## get_active_model
> std::collections::HashMap<String, serde_json::Value> get_active_model(provider)
Get the active model for a given provider.
### Parameters
**provider** | Option<**String**> | | |
### Return type
[**std::collections::HashMap<String, serde_json::Value>**](serde_json::Value.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## get_model
> std::collections::HashMap<String, serde_json::Value> get_model(id)
Fetch a model.
### Parameters
**id** | **String** | | [required] |
### Return type
[**std::collections::HashMap<String, serde_json::Value>**](serde_json::Value.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## list_models
> std::collections::HashMap<String, serde_json::Value> list_models()
List every LLM model the platform knows about.
### Parameters
This endpoint does not need any parameter.
### Return type
[**std::collections::HashMap<String, serde_json::Value>**](serde_json::Value.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## set_active_model
> std::collections::HashMap<String, serde_json::Value> set_active_model(id)
Set a model as the active default for its provider (admin-only).
### Parameters
**id** | **String** | | [required] |
### Return type
[**std::collections::HashMap<String, serde_json::Value>**](serde_json::Value.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## update_model
> std::collections::HashMap<String, serde_json::Value> update_model(id, request_body)
Update a model (admin-only).
### Parameters
**id** | **String** | | [required] |
**request_body** | [**std::collections::HashMap<String, serde_json::Value>**](SerdeJson__Value.md) | | [required] |
### Return type
[**std::collections::HashMap<String, serde_json::Value>**](serde_json::Value.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)