OA
OneAI API
Docs
GET /v1/modelsPOST /v1/models/syncPOST /v1/models/health

Reference: Models

GET /v1/models — discover model ids, capabilities, readiness, pricing coverage, and catalog sync status.

List models

Use this endpoint to discover provider:model ids for the chat gateway.

curl -s https://oneai-saas-api-production.up.railway.app/v1/models \
  -H "Authorization: Bearer YOUR_KEY"

Model object

Commercial fields help customers understand whether a model is callable, priced, and operational.

{
  "id": "openai:gpt-5.2",
  "object": "model",
  "provider": "openai",
  "model": "gpt-5.2",
  "modes": ["balanced", "premium", "auto"],
  "contextTokens": 400000,
  "supportsJson": true,
  "supportsTools": true,
  "configured": true,
  "available": true,
  "hasPricing": true,
  "health": {
    "ok": true,
    "testedAt": "2026-05-04T03:55:06.113Z",
    "latencyMs": 1549
  }
}

Catalog sync and health checks

Admin keys can sync provider catalogs and run lightweight health checks one model at a time.

Sync catalog
curl -s -X POST https://oneai-saas-api-production.up.railway.app/v1/models/sync \
  -H "Authorization: Bearer ADMIN_KEY"
Check health
curl -s -X POST https://oneai-saas-api-production.up.railway.app/v1/models/health \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ADMIN_KEY" \
  -d '{"provider":"openai","model":"gpt-5.2"}'