Documentation
Build on the OneAI commercial API.
OneAI is the model-routing and structured-intelligence layer. Use /v1/generate for task intelligence, /v1/chat/completions for standard model gateway calls, and /v1/models for catalog discovery.
Quickstart
Make the first /v1/generate call.
API Basics
Auth, request shape, response metadata.
Generate Reference
Task input, options, usage, trace.
Chat Completions
OpenAI-compatible model gateway calls.
Models
Catalog, health checks, pricing coverage.
Errors
Retryable failures and customer-safe errors.
Rate Limits
API key policy and production limits.
Schemas
Structured output contracts.
Production request
curl https://oneai-saas-api-production.up.railway.app/v1/generate \
-H "content-type: application/json" \
-H "x-api-key: $ONEAI_API_KEY" \
-H "Idempotency-Key: launch-plan-001" \
-d '{
"type": "agent_plan",
"input": { "goal": "Create a launch plan for OneAI API" },
"options": { "llm": { "mode": "cheap", "maxCostUsd": 0.02 } }
}'