Catalog PyPI
PACKAGE EXPLORERView in registry

aimodels.dev

PyPI

A collection of AI model specifications across different providers

aianthropicllmmachine-learningmistralmodelsopen-sourceopenaispecifications
Versions collected1
Direct dependencies3From release 0.3.13
Last observed21 Oct, 11:23 UTC

README

Version 0.3.13 documentation

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

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.3.1312 Aug 20253

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
mitkury/aimodels

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 11:23 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:7c440777d40ee33d8f26449ddce67641ccf3fd3579a54f0d76eb8f769cb72250