Skip to content

Managing Models

Listing Supported Models

To see all vision and language models supported by MLX:

1
2
3
4
5
import requests

url = "http://localhost:8000/v1/supported_models"
response = requests.get(url)
print(response.json())

Listing Available Models

To see all available models:

1
2
3
4
5
import requests

url = "http://localhost:8000/v1/models"
response = requests.get(url)
print(response.json())

Deleting Models

To remove any models loaded to memory:

1
2
3
4
5
6
7
8
import requests

url = "http://localhost:8000/v1/models"
params = {
   "model_name": "hf-repo-or-path",
}
response = requests.delete(url, params=params)
print(response)