ModelLens / API Docs
Agent-native public API

ModelLens API

Discover AI models across providers with a stable, versioned REST API built for coding agents, tooling, and human developers.

Base URL
/api/v1
Designed for

Agents, SDK generators, internal tools, and lightweight integrations.

Separation

Use /api/v1 for public integrations. The website keeps its own internal endpoints separately.

Endpoints

GET /api/v1

API discovery index

Human- and agent-friendly entry point with available endpoints, parameters, and examples.

GET /api/v1/openapi.json

OpenAPI document

Machine-readable schema for tools, SDK generators, and coding agents.

GET /api/v1/README.md

Markdown docs

Raw Markdown documentation for agents and lightweight clients.

GET /api/v1/models

List models

Filter by provider, type, status, search query, sort order, and result limit.

GET /api/v1/models/{provider}/{model_id}

Get a single model

Fetch one model by provider and model id.

GET /api/v1/providers

List providers

Provider ids and current model counts.

GET /api/v1/stats

API stats

Aggregate counts by provider, type, status, and last sync.

Common query parameters

provider

Comma-separated provider ids such as openai, anthropic, google.

limit

Page size, capped at 100.

page

1-based page number.

type

Comma-separated model types: chat, embedding, image, audio, video.

status

Comma-separated model states: active, deprecated, unlisted.

search

Substring search across model id, provider, name, and description.

sort

Sort by updated, name, or provider.

order

Sort direction: asc or desc.

Response shape

Collection endpoints return data plus pagination metadata. Single-resource endpoints return data. Errors return an error object with a code and message.

{
  "data": [
    {
      "id": "provider-returned-model-id",
      "provider": "openai",
      "name": "Provider Returned Model Name",
      "description": null,
      "type": "chat",
      "context_length": "200000",
      "status": "active",
      "deprecated": false,
      "updated_at": "2026-03-13T10:15:00.000Z",
      "last_seen_at": "2026-03-13T10:15:00.000Z"
    }
  ],
  "meta": {
    "total": 1,
    "page": 1,
    "limit": 10,
    "pages": 1
  }
}