Go from zero to your first API call in under 2 minutes. This guide walks you through getting an API key, making requests, and building something useful.
Sign up at aimodelsmap.com/developers to get a free API key. The free tier gives you 100 requests per day -- enough to build and test your integration. No credit card required.
Your API key looks like this:
aimc_k1_a1b2c3d4e5f6g7h8i9j0...Keep it secret. Do not commit API keys to version control.
Let's fetch information about a specific AI model. Replace YOUR_API_KEY with the key from step 1.
curl "https://api.aimodelsmap.com/v1/models/claude-3-5-sonnet" \
-H "X-API-Key: YOUR_API_KEY"You should see a JSON response with the model's name, scores, pricing, and more. If you get a 401, double-check your API key.
Fetch the top-ranked models in a category. Here we get the top 5 coding models:
curl "https://api.aimodelsmap.com/v1/rankings/coding?limit=5" \
-H "X-API-Key: YOUR_API_KEY"Each entry includes the model's rank, composite score, quality and adoption sub-ranks, rank change over the last 24 hours and 7 days, and the top signals driving its position.
Compare two or more models side by side. This is useful for helping users choose between models.
curl "https://api.aimodelsmap.com/v1/models/compare?slugs=claude-3-5-sonnet,gpt-4o,gemini-2-0-pro" \
-H "X-API-Key: YOUR_API_KEY"Add a live ranking widget to your website with a single script tag. No build step needed.
<!-- Add the widget script -->
<script src="https://cdn.aimodelsmap.com/widget.js" async></script>
<!-- Add a ranking ticker -->
<div data-aimc-widget="ranking-ticker" data-category="coding"></div>
<!-- Or a model card -->
<div data-aimc-widget="model-card" data-model="claude-3-5-sonnet"></div>The widget SDK auto-discovers elements with data-aimc-widget attributes and renders them. Four widget types are available: ranking-ticker, model-card, comparison-table, and category-leaderboard. Read the full widget guide.
For TypeScript/JavaScript projects, the SDK provides typed methods, automatic pagination, and built-in retry with exponential backoff.
npm install @ai-market-cap/sdkimport { AIMarketCap } from "@ai-market-cap/sdk";
const client = new AIMarketCap({ apiKey: "YOUR_API_KEY" });
// Get leaderboard
const rankings = await client.rankings.leaderboard("coding", { limit: 10 });
// Get model details
const model = await client.models.get("claude-3-5-sonnet");
// Compare models
const comparison = await client.models.compare([
"claude-3-5-sonnet",
"gpt-4o",
]);
// Search (typo-tolerant)
const results = await client.models.search("cluade sonnet");
// Price calculator
const estimate = await client.pricing.calculator({
monthlyTokens: 10_000_000,
category: "coding",
});