Skip to main content

Module model_api

Module model_api 

Source
Expand description

Model Management API Endpoints

Provides RESTful API endpoints for:

  • Listing available and installed models
  • Searching for models
  • Downloading/installing models
  • Removing/uninstalling models
  • Getting download progress
  • Hardware recommendations

Structs§

ActiveModelResponse
Response for the currently active/loaded model
DatabaseInfo
Database information
DownloadedModelInfo
Information about a downloaded model
HardwareInfoResponse
Hardware information response
HardwareRecommendationsResponse
Response with hardware recommendations
HfAccessParams
Query parameters for the HF access-check endpoint
HfAccessResponse
Response body for the HF access-check endpoint
InstallModelRequest
Request to install/download a model
InstallModelResponse
Response for model installation
InstalledEngineInfo
Information about an installed engine
OpenRouterCatalogParams
Query parameters for the OpenRouter catalog endpoint
OpenRouterCatalogResponse
Paginated response for the OpenRouter catalog
OpenRouterQuotaResponse
Response body for the OpenRouter quota endpoint
RefreshModelsRequest
Request to refresh the dynamic model catalog
RefreshModelsResponse
Response after refreshing the model catalog
SearchModelsRequest
Request to search for models
SearchModelsResponse
Response containing search results
StorageMetadataResponse
Storage metadata response
StoragePaths
Storage paths on the system
StorageStats
Storage usage statistics
SwitchModelRequest
Request to switch to a different model
SwitchModelResponse
Response after switching model
SystemMetricsResponse
Live system metrics response
UpdatePreferencesRequest
Request to update user preferences

Enums§

ModelSourceSpecifier
Specify where to download a model from

Functions§

cancel_download
Cancel an ongoing download
check_hf_access
GET /models/hf/access?repo_id=…&filename=…&hf_token=…
get_active_downloads
Get all downloads (active and completed)
get_active_model
Get the currently active/loaded model info from the running server config
get_download_progress
Get download progress for a specific download
get_hardware_info
Get current hardware info and storage usage
get_hardware_recommendations
Get hardware recommendations
get_recommended_models
Get recommended models based on current hardware and preferences
get_storage_metadata
Get comprehensive local storage metadata
get_system_metrics
Get live system metrics including CPU/GPU usage
install_model
Install/download a model
list_models
Get list of all models (installed and available) Filters out OpenRouter and HuggingFace models if no verified key exists
list_models_by_mode
Get models filtered by mode (online/offline)
openrouter_catalog
GET /models/openrouter/catalog
openrouter_quota
GET /models/openrouter/quota
pause_download
Pause an ongoing download
refresh_models
Refresh the dynamic model catalog from remote sources (OpenRouter, Hugging Face).
remove_model
Remove/uninstall a model
resume_download
Resume a paused download
search_models
Search for models by name, description, or tags
switch_model
Switch to a different model by ID
update_preferences
Update user preferences for model recommendations