Skip to main content

Professional, unified, and enhanced index for LLM models based on OpenRouter with ArtificialAnalysis intelligence.

Project description

LLMIndex

A unified, open-source LLM registry merging OpenRouter (catalog) and ArtificialAnalysis (benchmarks).

Vision

LLMIndex provides a "Single Source of Truth" for LLM metadata and performance tiers. It uses a Git-Ops approach, where the data is updated daily via GitHub Actions and stored in portable JSON and SQLite formats.

Key Features

  • Library-First: Consume as a Python dependency in your own projects.
  • Dual Persistence: Choose between SQLite (for sync/write) and JSON (for read-only low-infra apps).
  • Normalized Registry: Standardized model IDs across providers.
  • Computed Metrics: Intelligence/Cost efficiency scores and performance tiers.
  • Ready for Agents: Designed with "AI-Friendly" documentation.

Installation

# Basic installation (Library only)
pip install openrouter_insights

# With API support (FastAPI + Uvicorn)
pip install "openrouter_insights[api]"

Library Usage

The LLMIndex class is the main entry point for consuming the registry.

Consume from JSON (No database required)

If you just want to query the pre-generated registry file:

import asyncio
from openrouter_insights import LLMIndex

async def main():
    # 'openrouter_insights.json' should be in your project root or provide the full path
    client = LLMIndex(mode="json", path="openrouter_insights.json")
    
    models = await client.get_models(best_for="coding", sort_by="price")
    for m in models:
        print(f"{m.name}: ${m.pricing.input}/1M tokens")

asyncio.run(main())

Consume from SQLite

Use SQLite if you need to run synchronization or prefer a database-backed store:

from openrouter_insights import LLMIndex

client = LLMIndex(mode="sqlite", path="data/openrouter_insights.sqlite")

# Get counts
total = await client.get_count(provider="OpenAI")

# Sync registry (Requires OPENROUTER_API_KEY in ENV)
await client.sync()

Running the API Server

If you installed with [api], you can run the unified registry server:

openrouter_insights  # or uvicorn openrouter_insights.adapters.api.main:app --reload

Documentation

See the docs/ folder for detailed specifications:


Open Source for the AI Community.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openrouter_insights-0.3.0.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openrouter_insights-0.3.0-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

File details

Details for the file openrouter_insights-0.3.0.tar.gz.

File metadata

  • Download URL: openrouter_insights-0.3.0.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.3 CPython/3.12.3 Linux/6.17.0-1008-azure

File hashes

Hashes for openrouter_insights-0.3.0.tar.gz
Algorithm Hash digest
SHA256 4500ff571405373249df2c53f7e619ec94696a0edac385694a998c13e01ec0d1
MD5 b2ed936a8c230a531b43593458adc928
BLAKE2b-256 2f4583f52746649de17215208d463ce9fdd198c0a7b1d004145afcbeafeb019a

See more details on using hashes here.

File details

Details for the file openrouter_insights-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: openrouter_insights-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 20.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.3 CPython/3.12.3 Linux/6.17.0-1008-azure

File hashes

Hashes for openrouter_insights-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e399b69834379448e3ac8bf23dd992319773a23e02583d19e3604bdc52ec7eb
MD5 d3d04a014517a1035c16e133a2ef019d
BLAKE2b-256 87820e267e1968a71fcda678f54febb339889e63269a7e0171addffd1c96dc5c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page