# AI Model Prices: Cost, Speed and Uptime by Provider (`scrapemint/ai-model-prices`) Actor

Keyless pricing for hundreds of large language models: cost per million tokens in and out, cache rates, the cost of a realistic request, context window and modalities, plus every company hosting each model with its measured speed, uptime and its own price.

- **URL**: https://apify.com/scrapemint/ai-model-prices.md
- **Developed by:** [Ken M](https://apify.com/scrapemint) (community)
- **Categories:** Developer tools, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$4.00 / 1,000 model price rows

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/platform/actors/running/actors-in-store#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 Prices: Cost, Speed and Uptime by Provider

What large language models actually cost to run, **in money rather than scientific notation**, and which company hosting each one is cheapest, fastest and most reliable right now.

Hundreds of models across every major vendor. No API key, no account, no browser.

### Modes

- **Models** - one row per model: price per million tokens in and out, cache read and write rates, **the cost of a realistic request**, context window, modalities, tool and reasoning support, knowledge cutoff and retirement date. Cheapest first.
- **Providers** - one row per model per hosting company: its own price, measured latency and throughput, uptime over 5 minutes, 30 minutes and a day, quantisation and maximum output.
- **Compare** - one row per model naming the **cheapest, fastest and most reliable provider**, the price spread between best and worst, and any provider currently degraded.

### Example output

```json
{
  "mode": "models",
  "modelId": "openai/gpt-4.1-nano",
  "inputPricePerMillionTokens": 0.1,
  "outputPricePerMillionTokens": 0.4,
  "requestSizeInputTokens": 10000,
  "requestSizeOutputTokens": 1000,
  "costOfRequestUsd": 0.0014,
  "costPer1000RequestsUsd": 1.4,
  "contextLengthTokens": 1047576,
  "hasTieredPricing": false,
  "costRankCheapestFirst": 7
}
```

### The two things a price list will get wrong

**1. Prices are published per token.** A rate arrives as `0.00000003`. Nobody reasons in those units, so everything here is converted to **cost per million tokens** and to the cost of a request you actually specify — set your own input and output sizes and get an answer in dollars.

**2. Pricing is tiered by prompt length, and the headline rate hides it.** One model in the catalogue charges $0.03 per million below 32,000 tokens, $0.10 above it, and $0.20 above 256,000. Costed at a 300,000 token prompt, the real bill is **6.7 times** what the headline rate implies. The tier that applies to *your* request size is the one used, the threshold is named in `tierAppliedToThisRequest`, and every tier ships in `pricingTiers`.

### Other things worth knowing

- **A missing rate is not a free one.** Only 27 of the models publish an image price and 211 publish a cache read rate. Where a usage type is not priced it stays null and is named in `unpricedUsageTypes`, rather than collapsing to zero and implying that usage is free.
- **Speed is not always measured.** Latency and throughput come back empty for providers the aggregator has not sampled, and `Number(null)` is zero — which would publish a working provider as "0 tokens per second". Unmeasured providers report null with `speedMeasured: false`.
- **The same company can host one model more than once**, at different prices, regions or reliability. Those endpoints are ranked individually rather than collapsed by name, so a cheap endpoint and an expensive one from the same provider both show honestly.
- **Degraded providers are flagged.** A non-zero status from the aggregator sets `isDegraded`, and compare mode lists them.
- **Prices move.** This is a feed to schedule, not a fact to cache. It also reflects one aggregator's catalogue and its listed rates, which can differ from a provider's own direct pricing — stated on every row.
- Provider detail costs one request per model, so those modes expand the cheapest matching models first, up to a limit you set.

### Who this is for

Engineering and product teams choosing a model or a provider, finance and analytics teams modelling inference spend, anyone routing traffic who needs to know which endpoint is cheap *and* actually up, and analysts tracking where model pricing is heading.

### Pricing

**$0.004 per row.** The first 2 rows of every run are free, and note rows (a filter nothing matched, a model with no provider detail) are never charged.

A vendor's full catalogue is usually 20 to 70 rows. Comparing providers across 15 models is 15 rows in compare mode, or roughly 60 to 100 in providers mode.

### Related actors

- **Hugging Face AI Models Scraper** - model metadata, downloads and popularity, which this deliberately does not duplicate.
- **Package Adoption Tracker** - npm and PyPI download trends for the tooling around these models.

### How to run it via API

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapemint~ai-model-prices/runs?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode":"compare","vendors":["anthropic","openai"],"promptTokens":10000,"completionTokens":1000}'
```

Catalogue and provider measurements from OpenRouter.

# Actor input Schema

## `mode` (type: `string`):

models = price and capability per model, cheapest first. providers = every company hosting a model, with its own price, speed and uptime. compare = one row per model naming the cheapest, fastest and most reliable provider and the price spread between them.

## `models` (type: `array`):

Filter by model id or name, for example claude, gpt-4o, llama. Partial matches work. Empty returns the whole catalogue.

## `vendors` (type: `array`):

openai, anthropic, google, meta-llama, mistralai, qwen, deepseek and so on. Empty returns all vendors.

## `promptTokens` (type: `integer`):

Used to price a realistic request. Also decides which pricing tier applies, since long prompts are billed at higher rates.

## `completionTokens` (type: `integer`):

Output tokens for the same costed request.

## `minContextLength` (type: `integer`):

Only return models whose context window is at least this many tokens. 0 disables the filter.

## `maxInputPricePerMillion` (type: `integer`):

Only return models charging at most this much per million input tokens. 0 disables the filter.

## `includeFree` (type: `boolean`):

Models priced at zero for both input and output.

## `includeRetiring` (type: `boolean`):

Some models publish the date they will be withdrawn. Every row carries that date when there is one.

## `expandModels` (type: `integer`):

Providers and compare modes. Provider detail costs one request per model, so the cheapest matching models are expanded first up to this many.

## `maxRows` (type: `integer`):

Cap on rows returned. Controls total cost.

## Actor input object example

```json
{
  "mode": "models",
  "models": [],
  "vendors": [],
  "promptTokens": 10000,
  "completionTokens": 1000,
  "minContextLength": 0,
  "maxInputPricePerMillion": 0,
  "includeFree": true,
  "includeRetiring": true,
  "expandModels": 15,
  "maxRows": 100
}
```

# 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 = {
    "promptTokens": 10000,
    "completionTokens": 1000,
    "maxRows": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapemint/ai-model-prices").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 = {
    "promptTokens": 10000,
    "completionTokens": 1000,
    "maxRows": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("scrapemint/ai-model-prices").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 '{
  "promptTokens": 10000,
  "completionTokens": 1000,
  "maxRows": 100
}' |
apify call scrapemint/ai-model-prices --silent --output-dataset

```

## MCP server setup

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

```

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/oaNeouQHo3m6sSmvA/builds/1lbsliqvoY8T4QJxh/openapi.json
