Skip to Content
API ReferenceAPI Reference Overview

API Reference

The OpenModels API provides programmatic access to the model registry, provider data, and real-time telemetry. All endpoints return JSON and follow consistent conventions for pagination and error handling.

Base URL

All API requests use the following base URL:

https://api.openmodels.run

All endpoints are prefixed with /api/. For example, to list models:

https://api.openmodels.run/api/models

Authentication

The OpenModels API is public and read-only. No authentication, API keys, or tokens are required. You can start making requests immediately.

# No auth headers needed curl "https://api.openmodels.run/api/models"

Request Format

  • Protocol: HTTPS only
  • Methods: GET (all endpoints are read-only)
  • Content-Type: Not required for GET requests
  • Query parameters: Used for filtering, searching, and pagination
curl "https://api.openmodels.run/api/models?search=deepseek&capability=reasoning&limit=10"

Response Format

All responses return JSON with a consistent structure. List endpoints wrap results in a data array with pagination metadata:

{ "data": [ { "id": "deepseek-v3", "name": "DeepSeek V3", "..." : "..." } ], "pagination": { "page": 1, "limit": 20, "total": 44 } }

Single-resource endpoints return the object directly:

{ "id": "deepseek-v3", "name": "DeepSeek V3", "vendor": "deepseek", "capabilities": ["chat", "reasoning", "code"], "context_window": 128000, "max_output_tokens": 8192 }

Pagination

All list endpoints support pagination via query parameters:

ParameterTypeDefaultDescription
pageinteger1Page number (1-indexed)
limitinteger20Items per page (max 100)

Example request:

curl "https://api.openmodels.run/api/models?page=2&limit=10"

Pagination metadata in response:

{ "pagination": { "page": 2, "limit": 10, "total": 44 } }
FieldDescription
pageCurrent page number
limitNumber of items per page
totalTotal number of items across all pages

To calculate total pages: Math.ceil(total / limit).

Error Format

When a request fails, the API returns a JSON error response with a consistent structure:

{ "error": { "status": 404, "message": "Model not found", "type": "NOT_FOUND" } }

Error Response Fields

FieldTypeDescription
error.statusintegerHTTP status code
error.messagestringHuman-readable error description
error.typestringMachine-readable error type identifier

Common Error Types

StatusTypeDescription
400BAD_REQUESTInvalid query parameters or malformed request
404NOT_FOUNDRequested resource does not exist
429RATE_LIMITEDToo many requests — slow down
500INTERNAL_ERRORUnexpected server error

Rate Limiting

The API applies basic rate limiting to ensure fair usage:

  • Limit: 100 requests per minute per IP address
  • Headers: Rate limit status is returned in response headers
HeaderDescription
X-RateLimit-LimitMaximum requests per window
X-RateLimit-RemainingRequests remaining in current window
X-RateLimit-ResetUnix timestamp when the window resets

When rate limited, the API returns a 429 status with an error response:

{ "error": { "status": 429, "message": "Rate limit exceeded. Try again in 45 seconds.", "type": "RATE_LIMITED" } }

Available Endpoints

MethodEndpointDescription
GET/api/modelsList and search models
GET/api/models/:idGet model details
GET/api/models/:id/providersList providers for a model
GET/api/models/:id/compareCompare providers for a model
GET/api/providersList all providers
GET/api/providers/:idGet provider details
GET/api/telemetry/health/:provider_idProvider health status
GET/api/telemetry/latency/:provider_idProvider latency metrics
GET/api/telemetry/ranked/:model_idRanked providers for a model
GET/api/healthSystem health check

Quick Example

Fetch the first 5 models with vision capability:

curl "https://api.openmodels.run/api/models?capability=vision&limit=5"
{ "data": [ { "id": "gpt-4o", "name": "GPT-4o", "vendor": "openai", "capabilities": ["chat", "vision", "code", "reasoning"], "context_window": 128000, "max_output_tokens": 16384 } ], "pagination": { "page": 1, "limit": 5, "total": 12 } }
Last updated on