Overview

What the AOCore developer API is and how its pieces fit together.

AOCore is an OpenAI-compatible LLM gateway with built-in audit, guardrails, and spend control. Point any OpenAI / Anthropic / Google AI SDK at the AOCore base URL, drop in your AOCore API key, and every request flows through the gateway with consistent quota enforcement, response headers, and audit trails — without changing client code.

Why use AOCore

  • Multi-provider, one API. OpenAI-shaped /v1/chat/completions, /v1/embeddings, /v1/images/*, plus native Anthropic /v1/messages and Google /v1beta/models/{model}:generateContent endpoints. One key, one base URL — all upstream providers are routed centrally.
  • Spend & quota that you can see. Every successful response carries six X-AOSentry-* headers that report remaining requests, tokens, budget, and reset windows. Your dashboards / clients can react to throttling before they hit a 429.
  • Compliance-grade audit & guardrails. Every developer action — register a user, mint a key, fetch spend logs — writes a hash-chained audit_logs row. The guardrails engine (PII / jailbreak / content-moderation / secrets / regex) runs inline before the upstream call and is enforced in mode: block by default.

Note — invitation-gated signup

AOCore’s MVP release is invitation-gated only. There is no open self-signup. To create a developer account you need an invitation token from an administrator. See the quickstart for the full flow.

Get started

StepRead this
1. New here?the Quickstart — first five minutes, invitation → key → first call
2. Auththe authentication guide — all accepted API-key header forms
3. Rate limitsthe rate-limits guide — the 6 X-AOSentry-* headers + 429 handling
4. Modelsthe models guide — model discovery + the 404 anti-enumeration property
5. Errorsthe errors guideAPIError shape + retry policy
Referencethe API reference — full OpenAPI spec (rendered via Scalar)
Examplesexamples/ — runnable curl / Python OpenAI SDK / LangChain scripts

SDK compatibility

Because the wire format is OpenAI-compatible (and Anthropic / Google AI native on the /v1/messages and /v1beta paths), every existing SDK works against the gateway with just two changes:

  1. Set base_url to https://gateway.core.aocyber.ai/v1 (or your self-hosted gateway).
  2. Use your AOCore-minted API key (the sk-… value you copied at mint time).

No AOCore SDK is required. The examples folder contains ready-to-run scripts for the three most common patterns.

AI SQL Functions

AOCore exposes six AI functions as Trino SQL UDFs — full guardrails pipeline, catalog-resolved models, AIBOM provenance per call. Call them directly from Trino SQL without changing client code.

  • Reference — canonical doc covering all 6 UDFs (SQL signatures, error handling, performance, provenance & audit, cross-tenant behavior)
  • Per-function examples: LLM_GENERATE, EMBED, LLM_CLASSIFY, LLM_EXTRACT, RERANK, SEMANTIC_SEARCH
  • AI-Aware Query Patterns — CROSS JOIN UNNEST, NULL filtering, materialized-table best practice, hybrid retrieval (SEMANTIC_SEARCH + RERANK), cross-tenant awareness
  • Deferred: LLM_GENERATE_STREAM — not shipped; see the developer API reference for the streaming alternative, and future revisit policy.