Model Library
raw JSON → 0.1.23 verified Fri May 01 auth: no python
A Python SDK for interacting with the vals.ai model catalog. Provides model discovery, retrieval, and metadata utilities. Current version 0.1.23, updated irregularly.
pip install model-library Common errors
error ModuleNotFoundError: No module named 'model_library' ↓
cause The package is installed as `model-library` but Python import uses underscores.
fix
Run
pip install model-library and then import as from model_library import ... error ValueError: Missing API key ↓
cause No API key provided or set in environment.
fix
Set VALS_API_KEY environment variable or pass api_key='sk-...' to Model constructor.
Warnings
gotcha Library name uses a hyphen on PyPI but underscores in imports. Use `from model_library import ...` not `from model-library import ...`. ↓
fix Import with underscores: `from model_library import ...`
gotcha API keys must be passed explicitly or set via `VALS_API_KEY` environment variable. No default sandbox key. ↓
fix Set environment variable `VALS_API_KEY` or pass `api_key` argument.
Imports
- Model wrong
from model-library import Modelcorrectfrom model_library import Model
Quickstart
from model_library import Model
model = Model(name='gpt-4o-mini', api_key=os.environ.get('VALS_API_KEY', ''))
print(model.id)