OA
OneAI API
Docs
x-api-keyBearerIdempotency-KeyrequestIdusage

API Basics

Authentication, endpoint families, request shape, and response conventions.

Authentication

Task endpoints use x-api-key. OpenAI-compatible endpoints also support Authorization: Bearer.

-H "x-api-key: YOUR_KEY"
-H "Authorization: Bearer YOUR_KEY"
-H "Idempotency-Key: stable-customer-operation-id"

Endpoint families

OneAI exposes both structured task intelligence and standard model gateway APIs.

/v1/generate

Structured task intelligence for workflows such as agent_plan and mission_os.

/v1/chat/completions

OpenAI-compatible chat completions with model routing and usage metadata.

/v1/models

Model catalog with provider, pricing, health, and capability metadata.

Generate request format

OneAI routes by task type and LLM policy.

{
  "type": "mission_os",
  "input": {
    "goal": "Launch a builder campaign",
    "audience": "builders, creators, founders"
  },
  "options": {
    "debug": true,
    "llm": { "mode": "cheap", "maxCostUsd": 0.03 }
  }
}