{"openapi":"3.1.0","info":{"title":"LLM Stats API","description":"Public API for querying AI model benchmarks, scores, rankings, and pricing.","version":"1.0.0"},"paths":{"/v1/models":{"get":{"summary":"List Models","operationId":"list_models_v1_models_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"organization","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization"}},{"name":"family","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Family"}},{"name":"modality","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Modality"}},{"name":"open_weight","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Open Weight"}},{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"}},{"name":"min_context","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Context"}},{"name":"max_input_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Input Price"}},{"name":"max_output_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Output Price"}},{"name":"released_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Released After"}},{"name":"released_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Released Before"}},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelsListResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/models/{model_id}":{"get":{"summary":"Get Model","operationId":"get_model_v1_models__model_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelDetail"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/benchmarks":{"get":{"summary":"List Benchmarks","operationId":"list_benchmarks_v1_benchmarks_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"verified","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Verified"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BenchmarksResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scores":{"get":{"summary":"List Scores","operationId":"list_scores_v1_scores_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},{"name":"benchmark","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"min_score","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Score"}},{"name":"max_score","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Score"}},{"name":"scored_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scored After"}},{"name":"scored_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scored Before"}},{"name":"verified_only","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Verified Only"}},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoresResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/rankings":{"get":{"summary":"Get Rankings","operationId":"get_rankings_v1_rankings_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"category","in":"query","required":true,"schema":{"type":"string","description":"Category ID (code, math, reasoning, etc.)","title":"Category"},"description":"Category ID (code, math, reasoning, etc.)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RankingsResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/updates":{"get":{"summary":"List Updates","operationId":"list_updates_v1_updates_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":true,"schema":{"type":"integer","maximum":30,"minimum":1,"description":"Lookback window in days (1-30)","title":"Days"},"description":"Lookback window in days (1-30)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatesResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"BenchmarkInfo":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories"},"modality":{"type":"string","title":"Modality"},"max_score":{"type":"number","title":"Max Score"},"language":{"type":"string","title":"Language"},"verified":{"type":"boolean","title":"Verified"},"model_count":{"type":"integer","title":"Model Count"},"paper_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paper Link"},"implementation_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Implementation Link"},"source":{"type":"string","title":"Source"},"url":{"type":"string","title":"Url"}},"type":"object","required":["id","name","categories","modality","max_score","language","verified","model_count","source","url"],"title":"BenchmarkInfo"},"BenchmarkScore":{"properties":{"benchmark_id":{"type":"string","title":"Benchmark Id"},"benchmark_name":{"type":"string","title":"Benchmark Name"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"score":{"type":"number","title":"Score"},"normalized_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Normalized Score"},"max_score":{"type":"number","title":"Max Score"},"is_self_reported":{"type":"boolean","title":"Is Self Reported"},"verified_by_llmstats":{"type":"boolean","title":"Verified By Llmstats"},"rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rank"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"scored_at":{"type":"string","format":"date-time","title":"Scored At"}},"type":"object","required":["benchmark_id","benchmark_name","score","max_score","is_self_reported","verified_by_llmstats","scored_at"],"title":"BenchmarkScore"},"BenchmarksResponse":{"properties":{"benchmarks":{"items":{"$ref":"#/components/schemas/BenchmarkInfo"},"type":"array","title":"Benchmarks"}},"type":"object","required":["benchmarks"],"title":"BenchmarksResponse"},"ErrorDetail":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"param":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Param"},"help_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Help Url"}},"type":"object","required":["code","message"],"title":"ErrorDetail"},"ErrorResponse":{"properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}},"type":"object","required":["error"],"title":"ErrorResponse"},"FamilyRef":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"FamilyRef"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LicenseRef":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"allow_commercial":{"type":"boolean","title":"Allow Commercial"},"open_source":{"type":"boolean","title":"Open Source"}},"type":"object","required":["id","name","allow_commercial","open_source"],"title":"LicenseRef"},"ModelDetail":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"organization":{"$ref":"#/components/schemas/OrganizationRef"},"family":{"anyOf":[{"$ref":"#/components/schemas/FamilyRef"},{"type":"null"}]},"license":{"$ref":"#/components/schemas/LicenseRef"},"open_weight":{"type":"boolean","title":"Open Weight"},"model_type":{"type":"string","title":"Model Type"},"modalities":{"items":{"type":"string"},"type":"array","title":"Modalities"},"context_window":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Window"},"param_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Param Count"},"training_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Training Tokens"},"knowledge_cutoff":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Knowledge Cutoff"},"release_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Release Date"},"providers":{"items":{"$ref":"#/components/schemas/ProviderPricing"},"type":"array","title":"Providers"},"top_scores":{"additionalProperties":{"type":"number"},"type":"object","title":"Top Scores"},"inference":{"$ref":"#/components/schemas/ModelInference"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"source":{"type":"string","title":"Source"},"url":{"type":"string","title":"Url"},"scores":{"items":{"$ref":"#/components/schemas/BenchmarkScore"},"type":"array","title":"Scores"},"sources":{"$ref":"#/components/schemas/ModelSources"}},"type":"object","required":["id","name","description","organization","license","open_weight","model_type","modalities","providers","top_scores","inference","created_at","updated_at","source","url","scores","sources"],"title":"ModelDetail"},"ModelInference":{"properties":{"available":{"type":"boolean","title":"Available"},"endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endpoint"},"gateway_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gateway Model Id"},"openai_compatible":{"type":"boolean","title":"Openai Compatible","default":false},"supports_streaming":{"type":"boolean","title":"Supports Streaming","default":false},"supports_tools":{"type":"boolean","title":"Supports Tools","default":false},"supports_vision":{"type":"boolean","title":"Supports Vision","default":false},"docs_url":{"type":"string","title":"Docs Url","default":"https://docs.llm-stats.com/gateway/chat-completions"}},"type":"object","required":["available"],"title":"ModelInference","description":"Discovery metadata for invoking a model via the LLM Stats gateway.\n\nAlways present on model responses. When `available` is False, optional\nfields are omitted and consumers should not attempt gateway calls."},"ModelSources":{"properties":{"api_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Ref"},"paper":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paper"},"weights":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weights"},"repo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo"}},"type":"object","title":"ModelSources"},"ModelSummary":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"organization":{"$ref":"#/components/schemas/OrganizationRef"},"family":{"anyOf":[{"$ref":"#/components/schemas/FamilyRef"},{"type":"null"}]},"license":{"$ref":"#/components/schemas/LicenseRef"},"open_weight":{"type":"boolean","title":"Open Weight"},"model_type":{"type":"string","title":"Model Type"},"modalities":{"items":{"type":"string"},"type":"array","title":"Modalities"},"context_window":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Window"},"param_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Param Count"},"training_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Training Tokens"},"knowledge_cutoff":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Knowledge Cutoff"},"release_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Release Date"},"providers":{"items":{"$ref":"#/components/schemas/ProviderPricing"},"type":"array","title":"Providers"},"top_scores":{"additionalProperties":{"type":"number"},"type":"object","title":"Top Scores"},"inference":{"$ref":"#/components/schemas/ModelInference"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"source":{"type":"string","title":"Source"},"url":{"type":"string","title":"Url"}},"type":"object","required":["id","name","description","organization","license","open_weight","model_type","modalities","providers","top_scores","inference","created_at","updated_at","source","url"],"title":"ModelSummary"},"ModelsListResponse":{"properties":{"models":{"items":{"$ref":"#/components/schemas/ModelSummary"},"type":"array","title":"Models"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["models","total"],"title":"ModelsListResponse"},"OrganizationRef":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"OrganizationRef"},"ProviderPricing":{"properties":{"provider_id":{"type":"string","title":"Provider Id"},"provider_name":{"type":"string","title":"Provider Name"},"input_price_per_m":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Input Price Per M"},"output_price_per_m":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Output Price Per M"},"throughput_tps":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Throughput Tps"},"latency_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latency S"},"status":{"type":"string","title":"Status"}},"type":"object","required":["provider_id","provider_name","status"],"title":"ProviderPricing"},"RankedModel":{"properties":{"rank":{"type":"integer","title":"Rank"},"model_id":{"type":"string","title":"Model Id"},"model_name":{"type":"string","title":"Model Name"},"organization":{"type":"string","title":"Organization"},"score":{"type":"number","title":"Score"},"conservative_rating":{"type":"number","title":"Conservative Rating"},"open_weight":{"type":"boolean","title":"Open Weight"},"min_input_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Input Price"},"benchmarks_evaluated":{"type":"integer","title":"Benchmarks Evaluated"},"source":{"type":"string","title":"Source"},"url":{"type":"string","title":"Url"}},"type":"object","required":["rank","model_id","model_name","organization","score","conservative_rating","open_weight","benchmarks_evaluated","source","url"],"title":"RankedModel"},"RankingsResponse":{"properties":{"category":{"type":"string","title":"Category"},"method":{"type":"string","title":"Method","default":"trueskill"},"ranked_at":{"type":"string","format":"date-time","title":"Ranked At"},"models":{"items":{"$ref":"#/components/schemas/RankedModel"},"type":"array","title":"Models"}},"type":"object","required":["category","ranked_at","models"],"title":"RankingsResponse"},"ScoreRow":{"properties":{"model_id":{"type":"string","title":"Model Id"},"model_name":{"type":"string","title":"Model Name"},"organization":{"type":"string","title":"Organization"},"benchmark_id":{"type":"string","title":"Benchmark Id"},"benchmark_name":{"type":"string","title":"Benchmark Name"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"score":{"type":"number","title":"Score"},"normalized_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Normalized Score"},"max_score":{"type":"number","title":"Max Score"},"is_self_reported":{"type":"boolean","title":"Is Self Reported"},"verified":{"type":"boolean","title":"Verified"},"scored_at":{"type":"string","format":"date-time","title":"Scored At"},"source":{"type":"string","title":"Source"},"url":{"type":"string","title":"Url"}},"type":"object","required":["model_id","model_name","organization","benchmark_id","benchmark_name","score","max_score","is_self_reported","verified","scored_at","source","url"],"title":"ScoreRow"},"ScoresResponse":{"properties":{"scores":{"items":{"$ref":"#/components/schemas/ScoreRow"},"type":"array","title":"Scores"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["scores","total"],"title":"ScoresResponse"},"UpdateModel":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"organization":{"$ref":"#/components/schemas/OrganizationRef"},"model_type":{"type":"string","title":"Model Type"},"modalities":{"items":{"type":"string"},"type":"array","title":"Modalities"},"context_window":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Window"},"release_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Release Date"},"open_weight":{"type":"boolean","title":"Open Weight"},"added_at":{"type":"string","format":"date-time","title":"Added At"},"source":{"type":"string","title":"Source"},"url":{"type":"string","title":"Url"}},"type":"object","required":["id","name","organization","model_type","modalities","open_weight","added_at","source","url"],"title":"UpdateModel"},"UpdatesResponse":{"properties":{"days":{"type":"integer","title":"Days"},"models":{"items":{"$ref":"#/components/schemas/UpdateModel"},"type":"array","title":"Models"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["days","models","total"],"title":"UpdatesResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}},"servers":[{"url":"/stats"}]}