Skip to main content

CLI and programmatically fetcher for open router current free models with advanced filtering.

Project description

OpenRouter Free Scanner

A simple command-line tool and Python library to fetch, filter, and save a list of free models from OpenRouter.ai.

Installation

pip install .

Command-Line Usage

To display the list of free models in the console:

openrouter-free-scanner

To save the list of free models to a JSON file named free_models.json:

openrouter-free-scanner -o

Advanced Usage

  • --limit <N>: Limit the number of models returned.
  • --name <string>: Filter models by name.
  • --min-context-length <N>: Filter by minimum context length.
  • --provider <string>: Filter by provider.
  • --sort-by <field>: Sort models by a specific field (e.g., name, context_length).
  • --reverse: Reverse the sort order.

Example: Get the top 5 free models with the longest context length:

openrouter-free-scanner --limit 5 --sort-by context_length --reverse

Programmatic Usage

You can also use this package as a library in your Python code:

import openrouterfreescanner

# Get only free models
free_models = openrouterfreescanner.get_free_models()

# Get free models, including routers
free_models_with_routers = openrouterfreescanner.get_free_models(exclude_routers=False)

# Filter free models by name
gemma_models = openrouterfreescanner.filter_models(free_models, name="gemma")

# Filter free models by provider and context length
filtered_models = openrouterfreescanner.filter_models(free_models, provider="google", min_context_length=8000)

# Sort free models by context length in descending order
sorted_models = openrouterfreescanner.sort_models(free_models, sort_by="context_length", reverse=True)

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

openrouterfreescanner-1.0.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

openrouterfreescanner-1.0.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file openrouterfreescanner-1.0.0.tar.gz.

File metadata

  • Download URL: openrouterfreescanner-1.0.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for openrouterfreescanner-1.0.0.tar.gz
Algorithm Hash digest
SHA256 0a6eab90a5dc01cc60cc4a6b519b4cfc30aa8ee04c4dbdb19e882aff9381b31e
MD5 f490e8bc39820a4eb96ebd8fdff2792e
BLAKE2b-256 7fb620aaec428d39b7ca64bdc99d8d9f781a53d20e90d14d2f00325670848fbc

See more details on using hashes here.

File details

Details for the file openrouterfreescanner-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for openrouterfreescanner-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 08ad16b1f0acc9163bcfba0a7cfd0b080a64ca97faadb96b67f7ba698bbb7bcd
MD5 a1f7c6323c219c550de798a0cc38dd4b
BLAKE2b-256 034c82c679b292baf95b9d161de2b78fda37d4af8508274131da12624d0b99f2

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