Documentation
How 1chat works
1chat starts as a drop-in LLM gateway and becomes the eval and model-choice layer for each customer’s domain.
The core idea
Most AI teams start by picking a model, shipping prompts, and later discovering they need observability, labeling, evals, routing, and cost controls. 1chat collapses that loop into one hosted control plane. You keep your existing SDK surface, while 1chat stores the traces and labels needed to determine when another model can safely replace the one you started with.
Outsource your evals. 1chat uses your production traces and feedback to build customer-specific eval sets and route cheaper or faster models only after they clear your quality floor.
Request lifecycle
- Your app calls a familiar OpenAI, Anthropic, or Gemini-compatible endpoint.
- 1chat authenticates the API key, resolves the project, and normalizes the request into conversation turns.
- The router chooses the requested model or a 1chat-managed candidate based on project policy.
- The prepaid ledger reserves an estimated charge before any provider request is sent.
- The provider response is returned in the same API shape your SDK expects.
- 1chat finalizes provider cost plus 10%, releases unused reservation, and stores the trace.
- Labels, inferred labels, and future eval runs feed back into the routing policy.
Supported API surfaces
OpenAI Chat Completions
Use the OpenAI SDK with `baseURL` set to 1chat and call `/v1/chat/completions`.
OpenAI Responses
Use the Responses API path `/v1/responses` for newer OpenAI-style text and tool workflows.
Anthropic Messages
Point the Anthropic SDK at the 1chat Anthropic-compatible base path and keep native message requests.
Gemini GenerateContent
Call the Gemini-compatible `generateContent` route for Google-style request and response payloads.
Minimal OpenAI SDK setup
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.ONECHAT_API_KEY,
baseURL: "https://api.1chat.co/v1"
});
const response = await client.chat.completions.create({
model: "1chat/auto",
messages: [{ role: "user", content: "Draft a customer-safe tax extension explanation." }]
});Data use and retention posture
1chat is intentionally not positioned as zero data retention. The product gets better because customers allow it to learn from their traces, labels, costs, and outcomes. Enterprise controls should include redaction, project deletion, retention windows, and scoped exports, but the default value proposition is transparent data use in service of better model choice.