A lightweight static API for discovering and integrating LLM metadata. Live: GitHub Pages · Cloudflare Pages
High-throughput friendly, static-by-default interface: rebuild on change; serve static JSON via GitHub Pages.
Sources: models.dev/api.json + basellm community contributions.
Requirement: Node.js 18+ (with native fetch).
npm install npm run buildOutputs: dist/api/
Scripts:
npm run build— Compile TypeScript and build API (no-op if nothing changes)npm run build:force— Force rebuild all filesnpm run check— Dry-run for change detection (CI use)npm run clean— Remove.cacheanddistnpm run compile— Compile TypeScript onlynpm run dev— Watch mode compilation
Docs i18n is driven by i18n/docs/*.json and i18n/locales.json with mkdocs-static-i18n; API i18n is driven by i18n/api/*.json and overrides in data/overrides/**.
i18n/ locales.json # language list (source of truth) docs/ en.json # UI strings for docs (fallback) zh.json ja.json api/ en.json # capability labels + default description template zh.json ja.json docs/ en/ index.md data.md zh/ index.md data.md ja/ index.md data.md - Add to
i18n/locales.json:
{ "locales": [ { "locale": "en", "default": true }, { "locale": "zh" }, { "locale": "ja" }, { "locale": "fr" } ] }- Create
i18n/docs/fr.json(copy fromen.jsonand translate keys) - Create
i18n/api/fr.json(translate capability labels and optional default description template) - Add
docs/fr/index.md(landing) and an emptydocs/fr/data.md(will be generated) - Optional: in
mkdocs.ymladd nav_translations forfr - Build:
npm run build
- Capability labels come from
i18n/api/<locale>.jsonand are applied to:- explicit
model.tags - boolean capabilities: tools/files/reasoning/temperature/open_weights
- modalities-derived tags: vision/audio
- explicit
- Localized API datasets are written to:
dist/api/i18n/<locale>/all.jsondist/api/i18n/<locale>/providers.json,index.json- per-provider/model files under
dist/api/i18n/<locale>/{providers,models}/...
- NewAPI payloads:
- English (stable):
dist/api/newapi/{vendors.json,models.json} - Localized:
dist/api/i18n/<locale>/newapi/{vendors.json,models.json}
- English (stable):
- Default description template (fallback to English):
i18n/api/<locale>.json→defaults.model_description, placeholders:${modelName},${providerId}- If a model's description equals the English default, localized builds replace it with the locale template
- Strings from
i18n/docs/<locale>.json; missing keys fall back toen.json - Build docs pages
docs/<locale>/data.mdautomatically onnpm run build - Preview docs:
pip install -r requirements.txtthenmkdocs serve
- Manual: edit
data/**and push to main; CI builds and publishes - Automatic: scheduled fetch; incremental updates for models allowed by policy
GitHub Actions triggers:
pushtoscripts/**,data/**, etc.workflow_dispatchmanual runscheduleevery 6 hours
Config: data/policy.json (default auto=true). Example:
{ "providers": { "deepseek": { "auto": true }, "xai": { "auto": true } }, "models": { "deepseek/deepseek-reasoner": { "auto": false }, "xai/grok-4": { "auto": true } } }If a model sets auto=false, automatic builds will not overwrite its existing static file (first build still generates it).
Use a directory-based layout. Put small JSON fragments under the following paths and they will be deep-merged during build:
data/ overrides/ providers/ <providerId>.json # provider-level overrides (e.g., lobeIcon, iconURL, name, api, doc) models/ <providerId>/<modelId>.json # model-level overrides (description, limit, modalities, cost, flags) i18n/ providers/<providerId>.json # optional: localized name/description for providers models/<providerId>/<modelId>.json # optional: localized name/description for models Examples
Provider icon override (data/overrides/providers/openai.json):
{ "lobeIcon": "OpenAI.Color" }Model override (data/overrides/models/openai/gpt-4o.json):
{ "description": "Optimized multimodal model with strong reasoning.", "limit": { "context": 131072, "output": 8192 }, "modalities": { "input": ["text", "image"], "output": ["text"] }, "reasoning": true, "tool_call": true, "attachment": false }Notes
- Deep-merge applies; unspecified fields are preserved.
- Model override allowlist (sanitization):
id,name,description,reasoning,tool_call,attachment,temperature,knowledge,release_date,last_updated,open_weights,modalities,limit,cost. - Build reads overrides from
data/overrides/**.