Documentation
API overview
AdvancedMind AI is an OpenAI-compatible gateway: if your code already speaks the Chat Completions API, you only change the base URL and the key.
What the API is
The gateway lives at https://api.advancedmind.ai/v1 and implements the OpenAI Chat Completions surface. You send a list of messages and a model id; you get a completion back, with optional streaming and tool calls. Any client built for /v1/chat/completions works by overriding base_url: official SDKs, coding agents, and self-hosted UIs included.
The gateway routes each request to a healthy provider and meters it against your organization’s credit balance. You do not manage provider keys, and you are not charged for a request that is blocked before inference.
Two operating rules
- Pay before inference. Each request is priced against your balance before any tokens are generated. If the estimated cost exceeds your available credits, the request is rejected with a billing error and you are not charged. Keep credits topped up on the billing page.
- No training on your data. Prompts and completions are never used to train models, and the launch models run under 30-day operational retention. See the no-training policy for the exact terms.
The public catalog contains Klara Base Preview v1 and v2. Research Mode is the application process for approved higher-risk project scopes. Ordinary Klara Preview use requires eligible purchased credits whenever the selected route is live; an approval never overrides a disabled route.
Quickstart
1. Create an account and check Preview funding
Create an account, then open Billing. It reads the signed live funding contract and enables only a qualifying prepaid cash top-up. Membership checkout is paused during Preview, and plan allowance or bonus credit cannot reserve Preview GPU capacity.
2. Create an API key
Generate a key from the API keys page in your workspace. The full secret is shown once at creation, so copy it into a secret manager right away. You can scope a key to standard or research access and set an optional monthly spend limit. See authentication for the details.
3. Set the base URL
Point your client at the gateway and pass the key as a bearer token. Export the secret as an environment variable so it never lands in source control:
export AMAI_API_KEY="amai_sk_..."
export OPENAI_BASE_URL="https://api.advancedmind.ai/v1"4. Send your first request
A minimal Chat Completions call against Klara Base Preview v1. Check the live catalog first: the request runs only when the route is available and your workspace is funded:
curl https://api.advancedmind.ai/v1/chat/completions \
-H "Authorization: Bearer $AMAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Klara-base-preview-v1",
"messages": [
{ "role": "user", "content": "Summarize the risk model for the attached protocol change." }
]
}'The response is the standard Chat Completions object, with a usage block reporting input and output tokens. The same token counts drive the cost charged to your balance, which you can audit on the usage page.
Where to go next
- Authentication: bearer keys, scopes, spend limits, and revocation.
- Models: model ids, context windows, and pricing for the production models.
- Chat completions: the full request and response shape.
- Streaming: server-sent token streaming.
- Errors: status codes for billing, access, and provider failures.
- Preview funding & usage: how signed checkout readiness, purchased credits, and the pay-before-inference check work.
- Research Mode: applying for an approved higher-risk project scope.
To wire an existing tool, see the setup guides for OpenCode, Aider, Continue, and OpenWebUI.