Skip to content
ModelPriceLab

Search model prices

Find source-linked rates by model, vendor, or platform.

Data API

Data API

Programmatic access to stored price records with source links where available, published API changes, and webhooks.

Public API health checkHTTP
$ curl https://api.modelpricelab.com/health
# Returns service status and timestamp

Quick start

Fetch stored model price records with a single request.

curl -H "Authorization: Bearer mpl_your_api_key" \
  "https://api.modelpricelab.com/v1/prices"

Endpoint reference

API Free can call only GET /v1/prices. /v1/changes and all webhook routes require a current Developer plan ($39/mo, see Pricing).
EndpointMethodAuthDescriptionLimit
/v1/pricesGETAPI keyReturns stored model price records across vendors and platforms.API Free or current paid entitlement
/v1/changesGETAPI keyReturns published price and API changes; incidents are excluded by default.Current paid entitlement required
/v1/webhooksGETAPI keyList configured webhook endpoints.Current paid entitlement required
/v1/webhooksPOSTAPI keySubscribe an HTTPS URL to change.alert events.Current paid entitlement required
/v1/webhooks/{id}DELETEAPI keyRemove a webhook subscription.Current paid entitlement required
/mcpPOSTAPI keyRead-only MCP endpoint (Streamable HTTP): search_models, list_prices, list_changes tools.Current paid entitlement required

MCP server (experimental)

Bring the Data API into MCP clients (Claude, Cursor, ...): three read-only tools — search_models, list_prices, list_changes — with semantics identical to the REST endpoints, the same API key, and the same daily quota. Requires a current Developer plan.

Handshake (initialize)
curl -X POST "https://api.modelpricelab.com/mcp" \
  -H "Authorization: Bearer $MPL_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize",
       "params":{"protocolVersion":"2025-06-18",
                 "capabilities":{},
                 "clientInfo":{"name":"curl","version":"0"}}}'
Client configuration
{
  "mcpServers": {
    "modelpricelab": {
      "url": "https://api.modelpricelab.com/mcp",
      "headers": {
        "Authorization": "Bearer mpl_your_api_key"
      }
    }
  }
}

Stateless, POST-only JSON responses (no SSE channel); tools/call payloads mirror /v1/prices and /v1/changes, including next_cursor pagination.

Webhook signature verification

Only accounts on a current Developer plan receive deliveries. Verify the exact raw body with HMAC SHA-256 from x-mpl-signature (sha256=…).

import { createHmac, timingSafeEqual } from 'node:crypto';

const signature = req.headers['x-mpl-signature'];
// Capture the exact raw UTF-8 request bytes before JSON parsing.
const rawBody = req.rawBody;
const expected = 'sha256=' + createHmac('sha256', WEBHOOK_SECRET)
  .update(rawBody)
  .digest('hex');

const valid = typeof signature === 'string'
  && signature.length === expected.length
  && timingSafeEqual(Buffer.from(signature), Buffer.from(expected));

if (!valid) {
  res.status(401).send('Invalid signature');
  return;
}

Rate limits & quotas

Each API key has a daily request quota based on its plan. Requests exceeding the quota return HTTP 429.

API Free
Requests: 100/day
Record semantics: Stored records; no fixed freshness promise
Developer plan ($39/mo)
Requests: 10,000/day, incl. changes & webhooks
Record semantics: Stored records; not promised real-time

Quotas reset daily at UTC midnight. When exhausted, buy a top-up pack ($5 / 50,000 requests / 30 days, stackable) to keep calling immediately — responses then carry X-RateLimit-Topup: true. GET /v1/usage reports balance and reset time at any time (introspection is unmetered).

curl "https://api.modelpricelab.com/v1/usage" -H "Authorization: Bearer $MPL_KEY"

# → { "plan": "developer", "daily_quota": { "limit": 10000, "remaining": 9962,
#     "reset_at": "2026-10-06T00:00:00Z" }, "topup": { "remaining": 49997 } }

Create your API key in Dashboard

Get API key