# AI Model Pricing API – 400+ LLM Token Costs & Arbitrage (`robinworld/ai-model-pricing-token-arbitrage`) Actor

Scrapes real-time prompt/completion token pricing, context lengths, and latency benchmarks across 400+ LLMs (OpenAI, DeepSeek, Claude, Gemini) on OpenRouter.

- **URL**: https://apify.com/robinworld/ai-model-pricing-token-arbitrage.md
- **Developed by:** [Robin world](https://apify.com/robinworld) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## 🤖 AI Model Pricing & Token Arbitrage Radar

[![Pricing: Pay-Per-Event](https://img.shields.io/badge/Pricing-Pay--Per--Event%20\($0.0030\)-green.svg)](https://apify.com)
[![Free Trial](https://img.shields.io/badge/Free%20Trial-$5%20Monthly%20Credits-blue.svg)](https://apify.com)
[![Formats](https://img.shields.io/badge/Export-JSON%20|%20CSV%20|%20Excel-orange.svg)](https://apify.com)

> 🎁 **Free Trial Available**: Every Apify account receives **$5.00 in free monthly usage credits**. You can test this Actor and extract up to **1,600+ model pricing records completely FREE** without spending a single dollar!

Real-time programmatic intelligence tracking token pricing, context window limits, and cost arbitrage opportunities across **400+ LLMs (OpenAI, DeepSeek, Anthropic Claude, Google Gemini, Meta Llama 3, Mistral, Qwen, and Groq)**.

***

### 💡 Why Use This Instead of Expensive SaaS?

| Comparison Metric | Manual Model Research / Expensive SaaS | **This Apify Actor** |
| :--- | :--- | :--- |
| **Typical Tool** | Enterprise AI Observability ($150 ~ $500/mo) | **Serverless Pay-Per-Event API** |
| **Pricing Model** | Heavy Monthly Subscription | **Pay only $0.003 per model record** |
| **Commitment** | Fixed monthly cost | **Zero commitment — test free with $5 credit** |
| **Cost Efficiency** | High fixed overhead | **Save 90%+ by dynamically routing to cheaper LLMs** |
| **Integration** | Manual checking across 10+ provider docs | **1-click JSON API / Python / LangChain integration** |

***

### 🎯 Key Use Cases

- **Dynamic AI Routing**: Route simple user queries to ultra-budget models (e.g. DeepSeek / Llama 3.1 8B at $0.05/M) and complex tasks to frontier models (Claude 3.5 Sonnet / GPT-4o), cutting corporate AI bills by 70%~90%.
- **AI Agent Builders**: Equip your LangChain, LlamaIndex, or AutoGen multi-agent system with real-time model cost discovery tools.
- **Cost Benchmark Reports**: Generate automated daily/weekly LLM pricing tracking reports for your tech blog or SaaS dashboard.

***

### 📥 Input Parameters

| Field | Type | Description | Default |
| :--- | :---: | :--- | :---: |
| `provider_filter` | String | Filter by provider (`all`, `openai`, `deepseek`, `anthropic`, `meta-llama`, `google`) | `all` |
| `max_prompt_price_per_m` | Number | Max input token price in USD per 1M tokens | `100.0` |
| `min_context_length` | Integer | Minimum required context window (tokens) | `8192` |
| `sort_by` | String | Sort order: `lowest_prompt_price`, `highest_context` | `lowest_prompt_price` |
| `max_items` | Integer | Max model records to extract | `50` |

***

### 📤 Sample Output (JSON)

```json
{
  "model_id": "deepseek/deepseek-chat",
  "model_name": "DeepSeek-V3",
  "provider": "deepseek",
  "prompt_price_per_m": 0.14,
  "completion_price_per_m": 0.28,
  "context_length": 64000,
  "tokenizer": "DeepSeek",
  "description": "DeepSeek-V3 is a strong open-weight MoE model offering frontier-grade reasoning at a fraction of GPT-4 cost.",
  "is_free": false,
  "cost_tier": "Ultra-Budget (< $0.50/M)",
  "arbitrage_recommendation": "Top Arbitrage Candidate: 90%+ cheaper than GPT-4 with massive 64k+ context window.",
  "openrouter_url": "https://openrouter.ai/models/deepseek/deepseek-chat",
  "scraped_at": "2026-09-08T04:30:00Z"
}
```

***

### 💻 1-Click Code Integration (Python)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")
run_input = {
    "provider_filter": "all",
    "max_prompt_price_per_m": 1.0,
    "min_context_length": 32000,
    "sort_by": "lowest_prompt_price",
    "max_items": 20
}
run = client.actor("robinworld/ai-model-pricing-token-arbitrage").call(run_input=run_input)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"[{item['provider']}] {item['model_name']} - ${item['prompt_price_per_m']}/M (Context: {item['context_length']:,})")
```

***

### 🔄 Integrations & Export Workflows

- 📊 **Spreadsheets**: 1-click export to **Google Sheets, Excel, or CSV**.
- ⚡ **No-Code Automation**: Trigger workflows in **Make.com, Zapier, or n8n**.
- 🤖 **AI Agents**: Direct tool integration for **LangChain, CrewAI, and Claude MCP**.

***

### ❓ Frequently Asked Questions (FAQ)

**Q: Do I need API keys for individual LLM providers?**\
A: No! This Actor queries public registry index feeds, so no provider keys or proxies are required.

**Q: How fresh is the pricing data?**\
A: Live real-time pricing directly fetched from verified provider registries on every run.

**Q: How do I test this for free?**\
A: Just click "Start" with default inputs! Your Apify monthly free credits cover your testing completely.

***

### ⭐ Feedback & Community Support

If you find this Actor valuable, please leave a **5-star review on the Apify Store**! For custom provider requests, open an issue in the **Issues** tab.

# Actor input Schema

## `provider_filter` (type: `string`):

Filter models by provider prefix (e.g. 'all', 'openai', 'anthropic', 'deepseek', 'meta-llama', 'google').

## `max_prompt_price_per_m` (type: `number`):

Filter models with prompt token cost equal to or below this price in USD (e.g. 1.0 for budget models).

## `min_context_length` (type: `integer`):

Filter models with at least this context window size (e.g. 32000, 128000).

## `sort_by` (type: `string`):

Sort order of extracted models.

## `max_items` (type: `integer`):

Maximum number of model pricing records to return.

## Actor input object example

```json
{
  "provider_filter": "all",
  "max_prompt_price_per_m": 100,
  "min_context_length": 8192,
  "sort_by": "lowest_prompt_price",
  "max_items": 50
}
```

# Actor output Schema

## `results` (type: `string`):

Direct link to dataset containing 400+ LLM token prices and specs

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("robinworld/ai-model-pricing-token-arbitrage").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("robinworld/ai-model-pricing-token-arbitrage").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call robinworld/ai-model-pricing-token-arbitrage --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,robinworld/ai-model-pricing-token-arbitrage"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/YyI0PcQB80rndvbA1/builds/0HiHhRbil1sdMhedx/openapi.json
