OA
OneAI API
Docs
GET /v1/modelsGET /v1/models/infrastructurePOST /v1/models/route/preview
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 across configured models.
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"}'Batch health
curl -s -X POST https://oneai-saas-api-production.up.railway.app/v1/models/health/batch \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ADMIN_KEY" \
-d '{"configuredOnly":true,"limit":8}'Route preview
curl -s -X POST https://oneai-saas-api-production.up.railway.app/v1/models/route/preview \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ADMIN_KEY" \
-d '{"mode":"cheap","strategy":"cost","limit":5}'Infrastructure summary
Use this for operations dashboards: provider keys, pricing coverage, health coverage, and recommended routes.
curl -s https://oneai-saas-api-production.up.railway.app/v1/models/infrastructure \ -H "Authorization: Bearer ADMIN_KEY"