Current collected state Current
Observed since 21 Oct, 11:23 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
A collection of AI model specifications across different providers
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.
pip install aimodels.dev
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}")
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]: ...
@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
@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
MIT
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.3.13 | 12 Aug 2025 | 3 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 11:23 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:7c440777d40ee33d8f26449ddce67641ccf3fd3579a54f0d76eb8f769cb72250