AIModels
A collection of AI model specifications across different providers. This package provides normalized data about AI models, including their capabilities, context windows, and pricing information.
Installation
pip install aimodels.dev
Usage
from aimodels import models
# Find models by capability
chat_models = models.can("chat")
vision_models = models.can("img-in")
reasoning_models = models.can("reason")
# Fluent API (equivalent to the capability filters above)
fluent_chat = models.canChat()
fluent_multimodal = models.canChat().canSee()
# Find models with multiple capabilities
multimodal_models = models.can("chat", "img-in")
audio_models = models.can("audio-in", "audio-out")
full_stack_models = models.can("chat", "fn-out", "json-out")
# Find models by provider
openai_models = models.from_provider("openai")
# Find models by creator
meta_models = models.from_creator("meta")
# Find models by context window
large_context_models = models.with_min_context(32768)
# Find specific model
model = models.id("gpt-4")
print(model.context.total) # Context window size
print(model.providers) # ['openai']
# Get pricing information (via provider pricing table)
provider = models.get_provider("openai")
if provider and provider.pricing:
pricing = provider.pricing.get("gpt-4")
if isinstance(pricing, dict) and pricing.get("type") == "token":
print(f"Input: ${pricing['input']}/1M tokens")
print(f"Output: ${pricing['output']}/1M tokens")
# Get provider information
if provider:
print(f"Name: {provider.name}")
print(f"Website: {provider.websiteUrl}")
print(f"API: {provider.apiUrl}")
Features
- Comprehensive database of AI models from major providers (OpenAI, Anthropic, Mistral, etc.)
- Normalized data structure for easy comparison
- Model capabilities (chat, img-in, img-out, function-out, etc.)
- Context window information
- Creator and provider associations
- Type hints with full type safety
- Zero dependencies
- Regular updates with new models
Types
Model
class Model:
"""Represents an AI model with its capabilities and specifications."""
id: str
name: str
capabilities: List[str]
providerIds: List[str]
creatorId: Optional[str]
context: ModelContext
def can(self, *caps: str) -> bool: ...
def canChat(self) -> bool: ...
def canReason(self) -> bool: ...
def canRead(self) -> bool: ...
def canWrite(self) -> bool: ...
def canSee(self) -> bool: ...
def canGenerateImages(self) -> bool: ...
def canHear(self) -> bool: ...
def canSpeak(self) -> bool: ...
def canOutputJSON(self) -> bool: ...
def canCallFunctions(self) -> bool: ...
def canGenerateEmbeddings(self) -> bool: ...
# Convenience aliases
@property
def providers(self) -> List[str]: ...
@property
def creator(self) -> Optional[str]: ...
ModelContext
@dataclass
class ModelContext:
"""Context window information for a model."""
total: Optional[int] = None
max_output: Optional[int] = None
sizes: Optional[List[str]] = None
qualities: Optional[List[str]] = None
type: Optional[str] = None
unit: Optional[str] = None
dimensions: Optional[int] = None
output_is_fixed: Optional[Union[int, bool]] = None
extended: Optional[Dict[str, Any]] = None
embedding_type: Optional[str] = None
normalized: Optional[bool] = None
Provider
@dataclass
class Provider:
"""Provider information (merged with organization fields to match JS Provider)."""
id: str
name: str
websiteUrl: Optional[str] = None
country: Optional[str] = None
founded: Optional[int] = None
apiUrl: Optional[str] = None
apiDocsUrl: Optional[str] = None
isLocal: Optional[int] = None
pricing: Dict[str, Dict[str, Any]] | None = None
License
MIT
Metadata
Release files for aimodels.dev 0.3.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aimodels_dev-0.3.13.tar.gz | 7.8 kB | Without provenance | Details for aimodels_dev-0.3.13.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aimodels_dev-0.3.13-py3-none-any.whl | Python 3 | none | any | Details for aimodels_dev-0.3.13-py3-none-any.whl |
Total release size: 15.3 kB
Release files / aimodels_dev-0.3.13.tar.gz
| Download URL | aimodels_dev-0.3.13.tar.gz |
|---|---|
| Size | 7.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ef1c65a238bc061f30ede3aeca488958bf7055df08c6da4dd4d792663bd3be8
|
|
BLAKE2b-256 checksum How to use checksums |
9f6adf8ef4d181323f2c4f114fb18b9a26debdc52eeebc29ba2990f12a7ac552
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.6
|
Release files / aimodels_dev-0.3.13-py3-none-any.whl
| Download URL | aimodels_dev-0.3.13-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a737a3a39c6e0e92e33d89e1ee8774a99046889a61194e683b51cf6499c8a4a
|
|
BLAKE2b-256 checksum How to use checksums |
43445a3f48fab43d63c142528fe0e94d9051f46334151930c0aafafc024b0c42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.6
|
Security for aimodels.dev 0.3.13
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.