Ontic API
Governed AI chat with grounding, emission gate validation, and full provenance envelopes.
Get an API Key
Request an API key to access the Goober Gateway APIs. Keys are issued immediately from this form.
Quickstart
Send your first chat message with a single curl command. Replace YOUR_API_KEY with the key generated by the form above.
1. Send a message
curl -N https://onticlabs.ai/api/gateway/goober/chat \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"message": "What is SOC 2 Type II?"}'The response is a Server-Sent Events stream with status, token, and done events. The done event includes a message_id for provenance lookup.
2. Check service health
curl https://onticlabs.ai/api/gateway/goober/health \ -H "x-api-key: YOUR_API_KEY"
3. Look up a provenance envelope
curl https://onticlabs.ai/api/gateway/goober/envelopes/MESSAGE_ID \ -H "x-api-key: YOUR_API_KEY"
Returns gate evaluation results, grounding metadata, and tool call logs for the message.
Authentication
Pass your API key in the x-api-key header. Chat also supports anonymous access (ungrounded responses, no provenance).
# Goober Gateway (header)
x-api-key: your-api-key
TypeScript SDK
For TypeScript projects, use the typed client from @ontic/goober-api for built-in request validation, SSE stream handling, and typed responses.
import { createGooberGatewayClient } from "@ontic/goober-api";
const client = createGooberGatewayClient({
baseUrl: "https://onticlabs.ai",
});
// Stream a chat response
const response = await client.startChatStream({
message: "What is SOC 2 Type II?",
});
// Parse the SSE stream
const reader = response.body.getReader();
const decoder = new TextDecoder();
let buffer = "";
while (true) {
const { done, value } = await reader.read();
if (done) break;
buffer += decoder.decode(value, { stream: true });
// Parse SSE events from buffer...
}