---
title: ComputePrices API
url: /docs/api
type: reference
version: v1
base_url: https://computeprices.com/api/v1
summary: Free, stable JSON API for cloud GPU and LLM inference pricing. 60 requests/hour with no signup; 5,000/hour with a free key. Includes daily trends and weekly movers.
related:
  - /llms.txt
  - /docs/api.md
  - /api/v1/providers
---

# ComputePrices API

Cloud GPU and LLM inference pricing, catalog, daily trends, and weekly movers — all under `/api/v1/*` as stable JSON.

## Quickstart

No signup, no key. Paste this:

```bash
curl https://computeprices.com/api/v1/gpu-prices
```

That's the whole API for the public tier. You get 60 requests/hour per IP. A [free key](#authentication) lifts the limit to 5,000/hour and extends historical trend windows from 7 to 30 days.

Three things if you're running an agent or automated tool:

- Send a descriptive `User-Agent` header.
- Respect `Retry-After` on `429` responses.
- Read `meta.upgrade_hint` — it names the next-tier features, not just throughput.

A raw markdown copy of this page is at [`/docs/api.md`](/docs/api.md) — curl it directly. For broader site discovery, see [`llms.txt`](https://computeprices.com/llms.txt).

## Tiers

What you get at each tier:

| Capability | Public (no signup) | Free (free key) | Pro | Enterprise |
|---|---|---|---|---|
| Rate limit (per hour) | 60 / IP | 5,000 / key | 15,000 / key | 50,000 / key |
| Latest GPU + LLM prices | ✓ | ✓ | ✓ | ✓ |
| Filters (`provider`, `gpu`/`model`, `pricing_type`) | ✓ | ✓ | ✓ | ✓ |
| GPU / LLM / provider catalog | ✓ | ✓ | ✓ | ✓ |
| Weekly movers | ✓ | ✓ | ✓ | ✓ |
| Trends window cap | 7 days | 30 days | 90 days | 365 days |
| Price indices (weekly) | — | — | v1.1 | v1.1 |
| Provider comparison | — | — | v1.1 | v1.1 |
| Cheapest-per-model aggregates | — | — | v1.1 | v1.1 |
| Historical raw prices (beyond 30d) | — | — | v1.1 | v1.1 |
| Export formats (CSV, NDJSON) | — | — | v1.1 | v1.1 |
| LLM benchmarks (throughput, TTFT) | — | — | v1.2 | v1.2 |
| Provider scrape-health | — | — | — | v1.2 |
| Webhooks on price change | — | — | roadmap | roadmap |
| SLA | — | — | best-effort | 99.9% |

`v1.1` = coming in the next release. `roadmap` = planned, no date.

Rate-limit ratios mirror [GitHub's REST API](https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api) (60/hr unauth → 5,000/hr authed). Feature gates start at pro.

## Authentication

Public-tier requests need nothing — just hit the endpoint:

```bash
curl https://computeprices.com/api/v1/gpu-prices
```

Authenticated requests use a Bearer token:

```bash
curl -H "Authorization: Bearer cp_live_..." \
  https://computeprices.com/api/v1/gpu-prices
```

### Getting a free key

Self-serve is on the roadmap. Until then, email [api@computeprices.com](mailto:api@computeprices.com?subject=Free%20API%20key%20request) with your use case and we'll get you a key. There's no approval hurdle for reasonable use.

## Endpoints

All endpoints return `{ data, meta }`. `meta` always includes `version`, `generated_at`, `tier`, and (when auth or rate-limiting is in play) `rate_limit` and `upgrade_hint`.

### Pricing

#### `GET /api/v1/gpu-prices` · public+

Latest GPU prices across every tracked provider. One row per (provider, GPU, pricing_type, node size).

**Query parameters:**

| Name | Type | Description |
|---|---|---|
| `provider` | slug | Filter to a single provider (e.g. `lambda`, `runpod`). |
| `gpu` | slug | Filter to a single GPU model (e.g. `h100`, `a100-80gb`). |
| `pricing_type` | `on_demand` \| `spot` | Filter by pricing model. |

**Example:**

```bash
curl "https://computeprices.com/api/v1/gpu-prices?gpu=h100&pricing_type=on_demand"
```

**Response:**

```json
{
  "data": [
    {
      "provider": "Lambda",
      "provider_slug": "lambda",
      "provider_url": "https://lambdalabs.com",
      "gpu": "H100 80GB",
      "gpu_slug": "h100",
      "vram_gb": 80,
      "architecture": "Hopper",
      "gpu_count": 1,
      "max_gpus_per_node": 8,
      "price_per_hour_usd": 2.49,
      "total_hourly_usd": 2.49,
      "pricing_type": "on_demand",
      "commitment_months": null,
      "currency": "USD",
      "exchange_rate_to_usd": 1,
      "source_url": "https://lambdalabs.com/pricing",
      "last_updated": "2026-04-20T10:15:30Z"
    }
  ],
  "meta": {
    "count": 1,
    "generated_at": "2026-04-20T12:00:00Z",
    "version": "v1",
    "tier": "public",
    "rate_limit": { "limit": 60, "remaining": 58, "reset": 1714827060, "window_seconds": 3600 },
    "upgrade_hint": "A free API key lifts your limit..."
  }
}
```

#### `GET /api/v1/llm-prices` · public+

Latest LLM inference prices. Per-1M-token input/output pricing, modalities, knowledge cutoff.

**Query parameters:**

| Name | Type | Description |
|---|---|---|
| `provider` | slug | Filter to a single provider. |
| `model` | slug | Filter to a single model (e.g. `claude-3-5-sonnet`, `gpt-4o`). |
| `pricing_type` | `standard` \| `batch` | Filter by pricing model. |

**Example:**

```bash
curl "https://computeprices.com/api/v1/llm-prices?model=claude-3-5-sonnet"
```

### Catalog

#### `GET /api/v1/gpus` · public+

List of every GPU model we track, with specs (VRAM, architecture, TFLOPs, memory bandwidth).

```bash
curl https://computeprices.com/api/v1/gpus
```

#### `GET /api/v1/gpus/{slug}` · public+

Single GPU model with full specs.

```bash
curl https://computeprices.com/api/v1/gpus/h100
```

#### `GET /api/v1/llm-models` · public+

List of tracked LLM models with creator, context window, modalities, and knowledge cutoff.

```bash
curl https://computeprices.com/api/v1/llm-models
```

#### `GET /api/v1/llm-models/{slug}` · public+

Single LLM model detail.

```bash
curl https://computeprices.com/api/v1/llm-models/claude-3-5-sonnet
```

#### `GET /api/v1/providers` · public+

List of tracked cloud and inference-API providers (archived providers excluded).

```bash
curl https://computeprices.com/api/v1/providers
```

#### `GET /api/v1/providers/{slug}` · public+

Single provider detail.

```bash
curl https://computeprices.com/api/v1/providers/lambda
```

### Trends & movers

#### `GET /api/v1/trends/gpu/{slug}` · public+

Daily average price for a GPU across providers. `days` is capped by tier (7/30/90/365).

**Query parameters:**

| Name | Type | Description |
|---|---|---|
| `days` | integer | Number of days of history. Clamped to your tier cap. |

**Example:**

```bash
curl "https://computeprices.com/api/v1/trends/gpu/h100?days=90"
```

#### `GET /api/v1/trends/llm/{slug}` · public+

Daily average input/output token price for an LLM across providers.

**Query parameters:**

| Name | Type | Description |
|---|---|---|
| `days` | integer | Number of days of history. Clamped to your tier cap. |

**Example:**

```bash
curl "https://computeprices.com/api/v1/trends/llm/claude-3-5-sonnet?days=30"
```

#### `GET /api/v1/movers` · public+

Biggest week-over-week price changes (up or down) for a (provider, GPU/LLM) pair.

**Query parameters:**

| Name | Type | Description |
|---|---|---|
| `scope` | `gpu` \| `llm` | Required. Which price universe to query. |
| `limit` | integer | Max results (default 10, max 100). |

**Example:**

```bash
curl "https://computeprices.com/api/v1/movers?scope=gpu&limit=10"
```

### Pro — coming in v1.1

- `GET /api/v1/indexes` — weekly compute price index, 100-baseline, separate series per GPU / LLM.
- `GET /api/v1/compare` — side-by-side provider comparison with price differences and shared-GPU coverage.
- `GET /api/v1/cheapest` — cheapest provider per LLM model for input and output tokens.
- `GET /api/v1/gpu-prices/history` — raw GPU price history with date-range filters (beyond the 30-day public window).
- `GET /api/v1/llm-prices/history` — raw LLM price history.

### Enterprise — coming in v1.2

- `GET /api/v1/llm-benchmarks` — LLM throughput, time-to-first-token, p95 latency from Artificial Analysis.
- `GET /api/v1/providers/{slug}/health` — per-provider scrape health, staleness, and price confidence metrics.

## Rate limits

Every response carries `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` (Unix epoch seconds). `429 Too Many Requests` additionally sets `Retry-After` in seconds.

Public tier is keyed by IP; authenticated tiers are keyed by API key. Windows are per-hour with a sliding window — short bursts are allowed, sustained throughput is not.

## Errors

Standard HTTP status codes. Error bodies share a small envelope.

### `401 Unauthorized`

Malformed `Authorization` header, invalid/revoked/expired key, or the endpoint requires `free` tier and you sent no key.

### `402 Payment Required`

Endpoint requires a paid tier. Body includes `required_tier`, `current_tier`, and `upgrade_hint`.

```json
{
  "error": "tier_required",
  "message": "Provider comparison requires the pro tier.",
  "required_tier": "pro",
  "current_tier": "free",
  "upgrade_hint": "Pro adds price indices, provider comparison...",
  "meta": { "version": "v1" }
}
```

### `404 Not Found`

Unknown slug or resource.

### `429 Too Many Requests`

Over your tier's rate budget. Wait `Retry-After` seconds.

### `500 Internal Server Error`

Upstream failure. Try again; if persistent, ping us.

## Versioning & stability

All endpoints live under `/api/v1/*` and guarantee additive, non-breaking changes at this version. Breaking changes will ship under a new version prefix and the old version will stay available for at least 6 months.

Fields added to response bodies are non-breaking. Fields are never renamed or removed at the same version. `meta.version` is always `"v1"`.

## Roadmap

Near-term (explicit target):

- **v1.1:** price indices, provider comparison, cheapest-per-model, historical prices with date ranges, CSV & NDJSON export.
- **v1.2:** LLM benchmarks (throughput, TTFT, p95), per-provider scrape-health and data-confidence metrics.

No-date items:

- Webhooks on price change.
- Per-key scopes (restrict a key to specific endpoints).
- Self-serve API key dashboard.
- Public SLA page.

## Next steps

- Start with [`/api/v1/providers`](https://computeprices.com/api/v1/providers) to see what's tracked.
- Grab raw markdown for your agent: [`/docs/api.md`](https://computeprices.com/docs/api.md) (`text/markdown`).
- Site-wide resource map: [`llms.txt`](https://computeprices.com/llms.txt).
- Feedback or a free key: [api@computeprices.com](mailto:api@computeprices.com).
