← 返回
数据分析 Key 中文

Free Models for OpenClaw and other Agents

Discover, filter, and select free or low-cost AI models from OpenRouter for OpenClaw and other agent workflows based on context, price, and capabilities.
基于上下文、价格和功能,从OpenRouter发现、筛选并选择适用于OpenClaw及其他智能体工作流的免费或低成本AI模型。
qidu
数据分析 clawhub v0.3.0 1 版本 99884.3 Key: 需要
★ 2
Stars
📥 823
下载
💾 12
安装
1
版本
#latest

概述

name: free-models

alias:

  • free-models-for-openclaw
  • free-models-of-openclaw
  • free-models-for-agents

description: Discover free/cheap models from OpenRouter for AI agents (e.g. OpenClaw). Includes model discovery, filtering, and easy model selection for openclaw and other agent workflows.

metadata:

version: 0.2.0

homepage: https://openrouter.ai


free-models-for-agent

Discover free, cheap, and high-value models from OpenRouter for your OpenClaw and other AI agents.

Usage

Find free models

import { discoverFreeModels } from './scripts/free-models.js';

const models = await discoverFreeModels();
// Returns models with $0.00 or very low pricing

Filter by criteria

import { filterModels } from './scripts/free-models.js';

// High context + low price (best for tool calling)
const models = await filterModels({
  minContext: 200000,      // 200k+ tokens
  maxPromptPrice: 0.00001  // Under $0.00001/1M tokens
});

// Specific provider only
const openaiModels = await filterModels({
  author: 'openai',
  minContext: 100000
});

// Name contains filter
const flashModels = await filterModels({
  author: 'google',
  nameContains: 'flash'
});

// All filters combined
const cheapGoogle = await filterModels({
  author: 'google',
  minContext: 500000,
  maxPromptPrice: 0.000001
});

Get best free model for agent

import { getBestFreeModel } from './scripts/free-models.js';

// Best overall (highest context)
const bestModel = await getBestFreeModel();

// Best for reasoning tasks
const reasoningModel = await getBestFreeModel({
  needReasoning: true,
});

// Best for tool calling (high context is key)
const toolModel = await getBestFreeModel({
  preferReasoning: true,
  maxPrice: 0.00001
});

// Best for vision tasks
const visionModel = await getBestFreeModel({
  needVision: true,
});

CLI Usage

User should register and get a access key from https://openrouter.ai/settings/keys

Openclaw should export the key (or string with a prefix "sk-or-") as the value of Environment Variable OPENROUTER_API_KEY before calling the cli.

export OPENROUTER_API_KEY="sk-or-v1-..."
node scripts/free-models.js

Common Free Models

ModelContextPriceBest For
---------------------------------
x-ai/grok-4.1-fast2M$0.0000002/1MTool calling, agents
openai/gpt-5.41M$0.0000025/1MGeneral purpose
google/gemini-3.1-flash-lite1M$0.00000025/1MFast/cheap tasks
google/gemini-2.5-flash1M$0.0000003/1MTool calling
qwen/qwen3.5-flash-02-231M$0.0000001/1MBudget option

API Reference

fetchAllModels()

Returns all available models from OpenRouter.

discoverFreeModels()

Filters and returns only models with $0 or very low pricing (< $0.0001/1M).

filterModels(options)

Filters models by:

  • maxPromptPrice: Maximum prompt price per 1M tokens
  • minContext: Minimum context window (tokens)
  • author or provider: Model provider (e.g., 'anthropic', 'openai', 'google', 'deepseek', 'minimax', 'kimi', 'z.ai')
  • maxCompletionPrice: Maximum completion price per 1M tokens
  • nameContains: Filter by name substring

getBestFreeModel(options)

Returns the best free model based on:

  • needReasoning: Requires strong reasoning capability
  • preferReasoning: Prefers models with reasoning
  • needVision: Requires vision capabilities
  • maxPrice: Maximum price threshold

getModelsByAuthor(author)

Returns all models from a specific provider.

getCheapestModels(limit)

Returns the cheapest models (default: 10).

Resources

  • OpenRouter Models: https://openrouter.ai/models
  • Models API: https://openrouter.ai/api/v1/models

版本历史

共 1 个版本

  • v0.3.0 当前
    2026-03-19 02:47 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 368 📥 140,804
data-analysis

A股量化 AkShare

mbpz
A股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。
★ 166 📥 60,216
developer-tools

Wecom

qidu
通过 Webhook 使用 MCP 协议向企业微信发送消息,支持 Claude Code、Claude Desktop 等 MCP 客户端。
★ 10 📥 7,103