Skip to content

API Reference

Complete reference for every endpoint in the LM Market Cap API. All endpoints use the base URL https://api.lmmarketcap.com/v1 and require an X-API-Key header unless noted otherwise.

Models

Browse, search, and inspect AI models.

GET/v1/modelsAPI key required

Returns a paginated list of AI models. Filter by category, provider, status, or free-text search.

Parameters

NameInTypeRequiredDescription
categoryquerystringNo
Filter by category slug.Example: coding
providerquerystringNo
Filter by provider slug.Example: anthropic
statusquerystringNo
Filter by lifecycle status.Values: active, deprecated, preview, retired
searchquerystringNo
Free-text search across model names and aliases.Example: claude
sort_byquerystringNo
Sort results by this field.Default: scoreValues: score, name, rank, trending
sort_orderquerystringNo
Sort direction.Default: descValues: asc, desc
cursorquerystringNo
Opaque cursor from a previous response for fetching the next page.
limitqueryintegerNo
Number of results to return (1-100).Default: 20

Example Request

curl "https://api.lmmarketcap.com/v1/models?category=coding&limit=5" \
  -H "X-API-Key: YOUR_API_KEY"

Response Type

typescript
interface ModelListResponse {
  data: ModelSummary[];
  pagination: Pagination;
}

interface ModelSummary {
  slug: string;
  name: string;
  description: string | null;
  model_type: string;
  status: "active" | "deprecated" | "preview" | "retired";
  provider: { name: string; slug: string };
  score: number | null;
  quality_rank: number | null;
  adoption_rank: number | null;
  state: string | null;
  context_window: number | null;
}

interface Pagination {
  next_cursor: string | null;
  has_more: boolean;
  total: number;
}

Example Response

200 OKapplication/json
{
  "data": [
    {
      "slug": "claude-3-5-sonnet",
      "name": "Claude 3.5 Sonnet",
      "description": "Anthropic's frontier coding model",
      "model_type": "large-language-model",
      "status": "active",
      "provider": {
        "name": "Anthropic",
        "slug": "anthropic"
      },
      "score": 94.2,
      "quality_rank": 1,
      "adoption_rank": 3,
      "state": "stable",
      "context_window": 200000
    }
  ],
  "pagination": {
    "next_cursor": "eyJpZCI6MTAxfQ==",
    "has_more": true,
    "total": 847
  }
}

Error Codes

StatusCodeDescription
400bad_requestInvalid parameters.
401unauthorizedMissing or invalid API key.
429rate_limitedDaily rate limit exceeded.
GET/v1/models/:slugAPI key required

Returns the full profile for a single model, including aliases, categories, current scores, and pricing.

Parameters

NameInTypeRequiredDescription
slugpathstringYes
URL-friendly model identifier.Example: claude-3-5-sonnet

Example Request

curl "https://api.lmmarketcap.com/v1/models/claude-3-5-sonnet" \
  -H "X-API-Key: YOUR_API_KEY"

Response Type

typescript
interface ModelDetail {
  slug: string;
  name: string;
  description: string | null;
  model_type: string;
  status: string;
  release_date: string | null;
  context_window: number | null;
  provider: { name: string; slug: string };
  aliases: string[];
  categories: { slug: string; name: string }[];
  scores: {
    category: string;
    score: number;
    quality_rank: number;
    adoption_rank: number;
    state: string;
    recorded_at: string;
  }[];
  pricing: {
    input_price_per_million: number | null;
    output_price_per_million: number | null;
    image_price: number | null;
    video_price_per_minute: number | null;
    updated_at: string;
  } | null;
  created_at: string;
  updated_at: string;
}

Example Response

200 OKapplication/json
{
  "data": {
    "slug": "claude-3-5-sonnet",
    "name": "Claude 3.5 Sonnet",
    "description": "Anthropic's frontier model for coding and reasoning tasks",
    "model_type": "large-language-model",
    "status": "active",
    "release_date": "2025-06-20",
    "context_window": 200000,
    "provider": {
      "name": "Anthropic",
      "slug": "anthropic"
    },
    "aliases": [
      "claude-3.5-sonnet",
      "sonnet-3.5"
    ],
    "categories": [
      {
        "slug": "coding",
        "name": "LLM"
      },
      {
        "slug": "coding-generation",
        "name": "Code Generation"
      }
    ],
    "scores": [
      {
        "category": "coding",
        "score": 94.2,
        "quality_rank": 1,
        "adoption_rank": 3,
        "state": "stable",
        "recorded_at": "2026-02-25T18:00:00Z"
      }
    ],
    "pricing": {
      "input_price_per_million": 3,
      "output_price_per_million": 15,
      "image_price": null,
      "video_price_per_minute": null,
      "updated_at": "2025-11-01"
    },
    "created_at": "2025-06-20T00:00:00Z",
    "updated_at": "2026-02-25T18:00:00Z"
  }
}

Error Codes

StatusCodeDescription
401unauthorizedMissing or invalid API key.
429rate_limitedDaily rate limit exceeded.
404not_foundResource not found.
GET/v1/models/:slug/scoresAPI key required

Returns a time series of scores for a model. Filter by category and date range.

Parameters

NameInTypeRequiredDescription
slugpathstringYes
URL-friendly model identifier.Example: claude-3-5-sonnet
categoryquerystringNo
Filter by category slug.Example: coding
startDatequerystring (date)No
Start of date range (ISO 8601).Example: 2025-12-01
endDatequerystring (date)No
End of date range (ISO 8601).Example: 2026-02-25
granularityquerystringNo
Time granularity for data points.Default: dailyValues: daily, weekly

Example Request

curl "https://api.lmmarketcap.com/v1/models/claude-3-5-sonnet/scores?granularity=weekly" \
  -H "X-API-Key: YOUR_API_KEY"

Response Type

typescript
interface ScoreHistoryResponse {
  data: {
    score: number;
    quality_rank: number;
    adoption_rank: number;
    state: string;
    rank_spread: { low: number; high: number } | null;
    confidence: number;
    category: string;
    recorded_at: string;
  }[];
  model: string;
  granularity: string;
  count: number;
}

Example Response

200 OKapplication/json
{
  "data": [
    {
      "score": 94.2,
      "quality_rank": 1,
      "adoption_rank": 3,
      "state": "stable",
      "rank_spread": {
        "low": 1,
        "high": 2
      },
      "confidence": 0.92,
      "category": "coding",
      "recorded_at": "2026-02-25T18:00:00Z"
    }
  ],
  "model": "claude-3-5-sonnet",
  "granularity": "daily",
  "count": 86
}

Error Codes

StatusCodeDescription
401unauthorizedMissing or invalid API key.
429rate_limitedDaily rate limit exceeded.
404not_foundResource not found.
GET/v1/models/:slug/signalsAPI key required

Returns raw signal events that feed into a model's score. Each signal has a type, raw value, normalized value, source, and confidence.

Parameters

NameInTypeRequiredDescription
slugpathstringYes
URL-friendly model identifier.Example: claude-3-5-sonnet
signalTypequerystringNo
Filter by signal type.Values: demand, usage, quality, cost, trust, social, expert
startDatequerystring (date)No
Start of date range.Example: 2026-01-01
endDatequerystring (date)No
End of date range.Example: 2026-02-25

Example Request

curl "https://api.lmmarketcap.com/v1/models/gpt-4o/signals?signalType=quality" \
  -H "X-API-Key: YOUR_API_KEY"

Response Type

typescript
interface SignalListResponse {
  data: {
    id: string;
    signal_type: string;
    source: string;
    raw_value: number;
    normalized_value: number;
    recorded_at: string;
    metadata: Record<string, unknown>;
  }[];
  model: string;
  count: number;
}

Example Response

200 OKapplication/json
{
  "data": [
    {
      "id": "sig_8f3k2m",
      "signal_type": "quality",
      "source": "chatbot-arena",
      "raw_value": 1410,
      "normalized_value": 0.94,
      "recorded_at": "2026-02-25T12:00:00Z",
      "metadata": {
        "benchmark": "MMLU",
        "score": 0.91
      }
    }
  ],
  "model": "claude-3-5-sonnet",
  "count": 42
}

Error Codes

StatusCodeDescription
401unauthorizedMissing or invalid API key.
429rate_limitedDaily rate limit exceeded.
404not_foundResource not found.
GET/v1/models/searchAPI key required

Typo-tolerant search across model names, aliases, and descriptions.

Parameters

NameInTypeRequiredDescription
qquerystringYes
Search query (typo-tolerant).Example: cluade sonnet
limitqueryintegerNo
Number of results to return (1-100).Default: 20

Example Request

curl "https://api.lmmarketcap.com/v1/models/search?q=cluade+sonnet" \
  -H "X-API-Key: YOUR_API_KEY"

Response Type

typescript
interface SearchResponse {
  data: {
    slug: string;
    name: string;
    provider: string;
    score: number | null;
  }[];
  query: string;
  count: number;
}

Example Response

200 OKapplication/json
{
  "data": [
    {
      "slug": "claude-3-5-sonnet",
      "name": "Claude 3.5 Sonnet",
      "provider": "Anthropic",
      "score": 94.2
    }
  ],
  "query": "cluade sonnet",
  "count": 1
}

Error Codes

StatusCodeDescription
400bad_requestInvalid parameters.
401unauthorizedMissing or invalid API key.
429rate_limitedDaily rate limit exceeded.
GET/v1/models/compareAPI key required

Compare 2 to 4 models side by side across scores, pricing, and key signals.

Parameters

NameInTypeRequiredDescription
slugsquerystringYes
Comma-separated model slugs (2-4 models).Example: claude-3-5-sonnet,gpt-4o

Example Request

curl "https://api.lmmarketcap.com/v1/models/compare?slugs=claude-3-5-sonnet,gpt-4o" \
  -H "X-API-Key: YOUR_API_KEY"

Response Type

typescript
interface ComparisonResponse {
  data: {
    model: {
      slug: string;
      name: string;
      description: string | null;
      model_type: string;
      provider: { name: string; slug: string };
      context_window: number | null;
      release_date: string | null;
    };
    scores: {
      category: string;
      score: number;
      quality_rank: number;
      adoption_rank: number;
      state: string;
    }[];
    pricing: {
      input_price_per_million: number | null;
      output_price_per_million: number | null;
      image_price: number | null;
      video_price_per_minute: number | null;
    } | null;
    categories: string[];
  }[];
  slugs_requested: string[];
  slugs_found: string[];
}

Example Response

200 OKapplication/json
{
  "data": [
    {
      "model": {
        "slug": "claude-3-5-sonnet",
        "name": "Claude 3.5 Sonnet",
        "description": "...",
        "model_type": "large-language-model",
        "provider": {
          "name": "Anthropic",
          "slug": "anthropic"
        },
        "context_window": 200000,
        "release_date": "2025-06-20"
      },
      "scores": [
        {
          "category": "coding",
          "score": 94.2,
          "quality_rank": 1,
          "adoption_rank": 3,
          "state": "stable"
        }
      ],
      "pricing": {
        "input_price_per_million": 3,
        "output_price_per_million": 15,
        "image_price": null,
        "video_price_per_minute": null
      },
      "categories": [
        "coding",
        "coding-generation"
      ]
    }
  ],
  "slugs_requested": [
    "claude-3-5-sonnet",
    "gpt-4o"
  ],
  "slugs_found": [
    "claude-3-5-sonnet",
    "gpt-4o"
  ]
}

Error Codes

StatusCodeDescription
400bad_requestInvalid parameters.
401unauthorizedMissing or invalid API key.
429rate_limitedDaily rate limit exceeded.

Rankings

Category leaderboards, historical rankings, and biggest movers.

GET/v1/rankings/:categoryAPI key required

Returns the current ranked leaderboard for a category. Each entry includes quality and adoption ranks, the composite score, confidence, ranking state, and top score drivers.

Parameters

NameInTypeRequiredDescription
categorypathstringYes
Category slug.Example: coding
limitqueryintegerNo
Number of results to return (1-100).Default: 20
cursorquerystringNo
Opaque cursor from a previous response for fetching the next page.

Example Request

curl "https://api.lmmarketcap.com/v1/rankings/coding?limit=10" \
  -H "X-API-Key: YOUR_API_KEY"

Response Type

typescript
interface RankingResponse {
  data: {
    rank: number;
    model: {
      slug: string;
      name: string;
      provider: { name: string; slug: string };
    };
    score: number;
    quality_rank: number;
    adoption_rank: number;
    rank_spread: { low: number; high: number } | null;
    state: "stable" | "rising" | "falling" | "volatile" | "new_entry";
    confidence: number;
    change_24h: number;
    change_7d: number;
    top_drivers: string[];
    recorded_at: string;
  }[];
  category: string;
  pagination: Pagination;
}

Example Response

200 OKapplication/json
{
  "data": [
    {
      "rank": 1,
      "model": {
        "slug": "claude-3-5-sonnet",
        "name": "Claude 3.5 Sonnet",
        "provider": {
          "name": "Anthropic",
          "slug": "anthropic"
        }
      },
      "score": 94.2,
      "quality_rank": 1,
      "adoption_rank": 3,
      "rank_spread": {
        "low": 1,
        "high": 2
      },
      "state": "stable",
      "confidence": 0.92,
      "change_24h": 0,
      "change_7d": 1,
      "top_drivers": [
        "quality",
        "demand"
      ],
      "recorded_at": "2026-02-25T18:00:00Z"
    }
  ],
  "category": "coding",
  "pagination": {
    "next_cursor": "eyJpZCI6MjF9",
    "has_more": true,
    "total": 156
  }
}

Error Codes

StatusCodeDescription
401unauthorizedMissing or invalid API key.
429rate_limitedDaily rate limit exceeded.
404not_foundResource not found.
GET/v1/rankings/:category/historyAPI key required

Returns historical ranking snapshots for a category within a date range. Useful for charting how model positions change over time.

Parameters

NameInTypeRequiredDescription
categorypathstringYes
Category slug.Example: coding
startDatequerystring (date)No
Start of date range (ISO 8601).Example: 2026-01-01
endDatequerystring (date)No
End of date range (ISO 8601).Example: 2026-02-25
modelSlugquerystringNo
Limit history to a specific model.

Example Request

curl "https://api.lmmarketcap.com/v1/rankings/coding/history?startDate=2026-01-01&endDate=2026-02-25" \
  -H "X-API-Key: YOUR_API_KEY"

Response Type

typescript
interface RankingHistoryResponse {
  data: {
    model: { slug: string; name: string };
    score: number;
    quality_rank: number;
    adoption_rank: number;
    state: string;
    recorded_at: string;
  }[];
  category: string;
  count: number;
}

Example Response

200 OKapplication/json
{
  "data": [
    {
      "model": {
        "slug": "claude-3-5-sonnet",
        "name": "Claude 3.5 Sonnet"
      },
      "score": 94.2,
      "quality_rank": 1,
      "adoption_rank": 3,
      "state": "stable",
      "recorded_at": "2026-02-25T18:00:00Z"
    }
  ],
  "category": "coding",
  "count": 120
}

Error Codes

StatusCodeDescription
400bad_requestInvalid parameters.
401unauthorizedMissing or invalid API key.
429rate_limitedDaily rate limit exceeded.
GET/v1/rankings/:category/moversAPI key required

Returns the models with the largest rank changes in a category over the selected period.

Parameters

NameInTypeRequiredDescription
categorypathstringYes
Category slug.Example: coding
periodquerystringNo
Look-back period for rank changes.Default: 7dValues: 24h, 7d, 30d
limitqueryintegerNo
Number of results to return (1-100).Default: 10

Example Request

curl "https://api.lmmarketcap.com/v1/rankings/coding/movers?period=7d" \
  -H "X-API-Key: YOUR_API_KEY"

Response Type

typescript
interface MoversResponse {
  data: {
    gainers: MoverEntry[];
    losers: MoverEntry[];
  };
  category: string;
  period: string;
}

interface MoverEntry {
  model: { slug: string; name: string; provider: string };
  current_score: number;
  previous_score: number;
  score_change: number;
  current_rank: number;
  previous_rank: number;
  rank_change: number;
  direction: "up" | "down";
}

Example Response

200 OKapplication/json
{
  "data": {
    "gainers": [
      {
        "model": {
          "slug": "claude-3-5-sonnet",
          "name": "Claude 3.5 Sonnet",
          "provider": "Anthropic"
        },
        "current_score": 94.2,
        "previous_score": 92.8,
        "score_change": 1.4,
        "current_rank": 1,
        "previous_rank": 2,
        "rank_change": 1,
        "direction": "up"
      }
    ],
    "losers": []
  },
  "category": "coding",
  "period": "7d"
}

Error Codes

StatusCodeDescription
401unauthorizedMissing or invalid API key.
429rate_limitedDaily rate limit exceeded.
404not_foundResource not found.

Categories

The taxonomy used to organize models. Categories are hierarchical -- top-level categories contain sub-categories.

GET/v1/categoriesAPI key required

Returns the full category tree with hierarchy information.

Example Request

curl "https://api.lmmarketcap.com/v1/categories" \
  -H "X-API-Key: YOUR_API_KEY"

Response Type

typescript
interface CategoryListResponse {
  data: CategoryNode[];
}

interface CategoryNode {
  slug: string;
  name: string;
  description: string | null;
  display_order: number;
  children: CategoryNode[];
}

Example Response

200 OKapplication/json
{
  "data": [
    {
      "slug": "coding",
      "name": "LLM",
      "description": "AI models for software development...",
      "display_order": 1,
      "children": [
        {
          "slug": "coding-generation",
          "name": "Code Generation",
          "description": "...",
          "display_order": 1,
          "children": []
        },
        {
          "slug": "coding-debugging",
          "name": "Debugging & Repair",
          "description": "...",
          "display_order": 2,
          "children": []
        }
      ]
    },
    {
      "slug": "image-generation",
      "name": "Image Generation",
      "description": "AI models for generating images...",
      "display_order": 2,
      "children": []
    }
  ]
}

Error Codes

StatusCodeDescription
401unauthorizedMissing or invalid API key.
429rate_limitedDaily rate limit exceeded.
GET/v1/categories/:slugAPI key required

Returns metadata for a single category including model count, children, and parent.

Parameters

NameInTypeRequiredDescription
slugpathstringYes
Category slug.Example: coding

Example Request

curl "https://api.lmmarketcap.com/v1/categories/coding" \
  -H "X-API-Key: YOUR_API_KEY"

Response Type

typescript
interface CategoryDetail {
  slug: string;
  name: string;
  description: string | null;
  parent: { slug: string; name: string } | null;
  children: { slug: string; name: string; display_order: number }[];
  model_count: number;
  display_order: number;
  created_at: string;
}

Example Response

200 OKapplication/json
{
  "data": {
    "slug": "coding",
    "name": "LLM",
    "description": "AI models for software development, code generation, debugging, and explanation.",
    "parent": null,
    "children": [
      {
        "slug": "coding-generation",
        "name": "Code Generation",
        "display_order": 1
      },
      {
        "slug": "coding-debugging",
        "name": "Debugging & Repair",
        "display_order": 2
      },
      {
        "slug": "coding-explanation",
        "name": "Code Explanation",
        "display_order": 3
      }
    ],
    "model_count": 156,
    "display_order": 1,
    "created_at": "2025-01-01T00:00:00Z"
  }
}

Error Codes

StatusCodeDescription
401unauthorizedMissing or invalid API key.
429rate_limitedDaily rate limit exceeded.
404not_foundResource not found.

Reviews

Community and expert reviews of AI models.

GET/v1/models/:slug/reviewsAPI key required

Returns paginated reviews for a model, sortable by date, rating, or helpfulness.

Parameters

NameInTypeRequiredDescription
slugpathstringYes
URL-friendly model identifier.Example: claude-3-5-sonnet
sortByquerystringNo
Sort order for reviews.Default: recentValues: recent, helpful, rating_high, rating_low
cursorquerystringNo
Opaque cursor from a previous response for fetching the next page.
limitqueryintegerNo
Number of results to return (1-100).Default: 20

Example Request

curl "https://api.lmmarketcap.com/v1/models/claude-3-5-sonnet/reviews?sortBy=helpful" \
  -H "X-API-Key: YOUR_API_KEY"

Response Type

typescript
interface ReviewListResponse {
  data: {
    id: string;
    author_name: string;
    rating: number;
    title: string | null;
    body: string;
    use_case: string | null;
    verified: boolean;
    helpful_count: number;
    created_at: string;
  }[];
  summary: {
    average_rating: number;
    total_reviews: number;
    rating_distribution: Record<string, number>;
  };
  model: string;
  pagination: Pagination;
}

Example Response

200 OKapplication/json
{
  "data": [
    {
      "id": "rev_8f3k2m",
      "author_name": "ml_engineer_42",
      "rating": 5,
      "title": "Best coding model available",
      "body": "Exceptional at understanding complex codebases and generating production-ready code.",
      "use_case": "software-development",
      "verified": true,
      "helpful_count": 87,
      "created_at": "2026-02-20T14:30:00Z"
    }
  ],
  "summary": {
    "average_rating": 4.6,
    "total_reviews": 342,
    "rating_distribution": {
      "1": 7,
      "2": 15,
      "3": 40,
      "4": 100,
      "5": 180
    }
  },
  "model": "claude-3-5-sonnet",
  "pagination": {
    "next_cursor": "eyJpZCI6MzQyfQ==",
    "has_more": true,
    "total": 342
  }
}

Error Codes

StatusCodeDescription
401unauthorizedMissing or invalid API key.
429rate_limitedDaily rate limit exceeded.
404not_foundResource not found.
POST/v1/models/:slug/reviewsAPI key required

Submit a review for a model. Requires a valid (non-anonymous) API key. Each user can submit one review per model; submitting again updates the existing review.

Parameters

NameInTypeRequiredDescription
slugpathstringYes
URL-friendly model identifier.Example: claude-3-5-sonnet
ratingbodyinteger (1-5)Yes
Overall rating from 1 to 5.
bodybodystringYes
Review text (10-5000 characters).
authorNamebodystringYes
Display name for the review (1-100 characters).
titlebodystringNo
Review title (max 200 characters).
useCasebodystringNo
Use case tag (max 500 characters).

Example Request

curl -X POST "https://api.lmmarketcap.com/v1/models/claude-3-5-sonnet/reviews" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "rating": 5,
    "authorName": "dev_jane",
    "title": "Great for code review",
    "body": "I use it daily for code review and refactoring suggestions."
  }'

Response Type

typescript
interface ReviewResponse {
  data: {
    id: string;
    author_name: string;
    rating: number;
    title: string | null;
    body: string;
    use_case: string | null;
    verified: boolean;
    helpful_count: number;
    created_at: string;
  };
}

Example Response

200 OKapplication/json
{
  "data": {
    "id": "rev_new123",
    "author_name": "dev_jane",
    "rating": 5,
    "title": "Great for code review",
    "body": "I use it daily for code review and refactoring suggestions. Highly recommended.",
    "use_case": "code-review",
    "verified": false,
    "helpful_count": 0,
    "created_at": "2026-02-25T19:00:00Z"
  }
}

Error Codes

StatusCodeDescription
400bad_requestInvalid review data. Check the details field.
401unauthorizedAPI key required to submit reviews.
403forbiddenYour plan does not allow write access.
429rate_limitedRate limit exceeded.

Pricing

Cost data and usage calculators for AI models.

GET/v1/models/:slug/pricingAPI key required

Returns current pricing and historical price changes for a model.

Parameters

NameInTypeRequiredDescription
slugpathstringYes
URL-friendly model identifier.Example: claude-3-5-sonnet

Example Request

curl "https://api.lmmarketcap.com/v1/models/claude-3-5-sonnet/pricing" \
  -H "X-API-Key: YOUR_API_KEY"

Response Type

typescript
interface PricingResponse {
  data: {
    current: {
      model: { slug: string; name: string; provider: string };
      input_price_per_million: number | null;
      output_price_per_million: number | null;
      image_price: number | null;
      video_price_per_minute: number | null;
      free_tier_available: boolean;
      free_tier_limits: string | null;
      source: string;
      updated_at: string;
    } | null;
    history: {
      input_price_per_million: number | null;
      output_price_per_million: number | null;
      image_price: number | null;
      video_price_per_minute: number | null;
      source: string;
      updated_at: string;
    }[];
  };
}

Example Response

200 OKapplication/json
{
  "data": {
    "current": {
      "model": {
        "slug": "claude-3-5-sonnet",
        "name": "Claude 3.5 Sonnet",
        "provider": "Anthropic"
      },
      "input_price_per_million": 3,
      "output_price_per_million": 15,
      "image_price": null,
      "video_price_per_minute": null,
      "free_tier_available": true,
      "free_tier_limits": "Included in free API tier with rate limits",
      "source": "official",
      "updated_at": "2025-11-01"
    },
    "history": [
      {
        "input_price_per_million": 5,
        "output_price_per_million": 25,
        "image_price": null,
        "video_price_per_minute": null,
        "source": "official",
        "updated_at": "2025-06-20"
      }
    ]
  }
}

Error Codes

StatusCodeDescription
401unauthorizedMissing or invalid API key.
429rate_limitedDaily rate limit exceeded.
404not_foundResource not found.
POST/v1/pricing/calculateAPI key required

Provide your estimated usage and get back monthly cost estimates for multiple models. At least one usage metric is required.

Parameters

NameInTypeRequiredDescription
monthlyTokensbodynumberNo
Estimated monthly token usage.
monthlyImagesbodyintegerNo
Estimated monthly image generations.
monthlyVideoMinutesbodynumberNo
Estimated monthly video minutes.
categorybodystringNo
Limit estimates to a specific category.

Example Request

curl -X POST "https://api.lmmarketcap.com/v1/pricing/calculate" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "monthlyTokens": 10000000, "category": "coding" }'

Response Type

typescript
interface PricingCalculateResponse {
  data: {
    model: { slug: string; name: string; provider: string };
    estimated_monthly_cost: number;
    breakdown: Record<string, number>;
    pricing: Record<string, unknown>;
  }[];
  usage: {
    monthly_tokens: number;
    monthly_images: number;
    monthly_video_minutes: number;
  };
  count: number;
}

Example Response

200 OKapplication/json
{
  "data": [
    {
      "model": {
        "slug": "gemini-2-0-pro",
        "name": "Gemini 2.0 Pro",
        "provider": "Google"
      },
      "estimated_monthly_cost": 35,
      "breakdown": {
        "input_cost": 17.5,
        "output_cost": 17.5
      },
      "pricing": {
        "input_price_per_million": 1.75,
        "output_price_per_million": 8.75
      }
    },
    {
      "model": {
        "slug": "gpt-4o",
        "name": "GPT-4o",
        "provider": "OpenAI"
      },
      "estimated_monthly_cost": 45,
      "breakdown": {
        "input_cost": 25,
        "output_cost": 20
      },
      "pricing": {
        "input_price_per_million": 2.5,
        "output_price_per_million": 10
      }
    }
  ],
  "usage": {
    "monthly_tokens": 10000000,
    "monthly_images": 0,
    "monthly_video_minutes": 0
  },
  "count": 2
}

Error Codes

StatusCodeDescription
400bad_requestInvalid parameters.
401unauthorizedMissing or invalid API key.
429rate_limitedDaily rate limit exceeded.

Health

API and data pipeline status. These endpoints do not require authentication.

GET/health

Returns API operational status. Does not require authentication.

Example Request

curl "https://api.lmmarketcap.com/health"

Response Type

typescript
interface HealthResponse {
  status: "ok" | "degraded";
  timestamp: string;
  version: string;
  services: {
    database: "healthy" | "unhealthy";
    redis: "healthy" | "unhealthy";
  };
}

Example Response

200 OKapplication/json
{
  "status": "ok",
  "timestamp": "2026-02-25T18:00:00Z",
  "version": "1.0.0",
  "services": {
    "database": "healthy",
    "redis": "healthy"
  }
}
GET/health/pipelines

Returns the status of data ingestion pipelines. Useful for checking data freshness. Does not require authentication.

Example Request

curl "https://api.lmmarketcap.com/health/pipelines"

Response Type

typescript
interface PipelineStatusResponse {
  status: "all_healthy" | "partial_degradation" | "critical";
  summary: { total: number; healthy: number; unhealthy: number };
  pipelines: {
    source_name: string;
    source_type: string;
    status: "healthy" | "degraded" | "down";
    last_success_at: string | null;
    last_failure_at: string | null;
    last_error: string | null;
    avg_latency_ms: number;
    success_rate: number;
    checked_at: string;
  }[];
}

Example Response

200 OKapplication/json
{
  "status": "all_healthy",
  "summary": {
    "total": 8,
    "healthy": 8,
    "unhealthy": 0
  },
  "pipelines": [
    {
      "source_name": "chatbot-arena",
      "source_type": "benchmark",
      "status": "healthy",
      "last_success_at": "2026-02-25T17:45:00Z",
      "last_failure_at": null,
      "last_error": null,
      "avg_latency_ms": 420,
      "success_rate": 0.99,
      "checked_at": "2026-02-25T18:00:00Z"
    }
  ]
}