Ambient's inference API is OpenAI-compatible. Point Ambient Desktop or any agent at one base URL, call the included models, and get zero-data-retention inference. Get an API key, or read the full API reference.
One endpoint, any agent#
Ambient serves a standard, OpenAI-compatible inference API. If a tool can talk to OpenAI, it can talk to Ambient: change the base URL and the key, keep everything else the same. The same endpoint powers Ambient Desktop and any agent you already use, and every request is zero data retention.
| Setting | Value |
|---|---|
| Base URL | https://api.ambient.xyz/v1 |
| Protocol | OpenAI Chat Completions compatible (Anthropic Messages format also supported) |
| Auth header | Authorization: Bearer <your key> |
| API keys | app.ambient.xyz/keys |
| Data retention | Zero. See Privacy and data retention |
| Payments | Subscription plans ($1–$200), or pay-per-use via x402 on Solana and Base |
Endpoints#
Two endpoints cover the OpenAI-compatible path used throughout this page.
Both hang off the base URL above, so the full URLs are
https://api.ambient.xyz/v1/chat/completions and
https://api.ambient.xyz/v1/models.
| Method | Path | What it is for |
|---|---|---|
POST | /v1/chat/completions | Inference. Send a model id and messages; add "stream": true for token streaming |
GET | /v1/models | List the models that are currently available to call |
Field-level parameter and response references live in Chat completions and Models endpoint. The Anthropic Messages endpoints are served from the same base URL and are covered in the API reference.
Get an API key#
Sign up#
Create an account at app.ambient.xyz.
Create a key#
Generate an API key at app.ambient.xyz/keys and copy it somewhere safe; you send it as a Bearer token.
Keep it out of your code#
Set it as an environment variable (for example
AMBIENT_KEY) rather than hard-coding it. In Ambient Desktop you simply sign in. The app manages the key for you.
Models#
Pass the model ID as the model field. GET /v1/models is the source of
truth for what is callable right now.
| Model | Model ID | Best for |
|---|---|---|
| GLM 5.2 | z-ai/glm-5.2 | Default: fast, capable, tuned for agentic coding and tool use |
| Kimi K2.7 Code | moonshotai/kimi-k2.7-code | Strong coding-focused alternative |
| DeepSeek V4 Flash | deepseek/deepseek-v4-flash | Long-context work (1M tokens) |
ambient/large is an Ambient-managed alias that always points at the current
large model, so it keeps working across model upgrades. It resolves to GLM 5.2
today. See Models.
Quickstart#
A first call in three flavors. Swap the model ID to switch models, and add
"stream": true (or stream=True) for token streaming.
curl https://api.ambient.xyz/v1/chat/completions \
-H "Authorization: Bearer $AMBIENT_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "ambient/large",
"messages": [{"role": "user", "content": "Say hello from Ambient."}]
}'from openai import OpenAI
client = OpenAI(
base_url="https://api.ambient.xyz/v1",
api_key="YOUR_AMBIENT_KEY", # create one at https://app.ambient.xyz/keys
)
resp = client.chat.completions.create(
model="ambient/large", # or "moonshotai/kimi-k2.7-code"
messages=[{"role": "user", "content": "Say hello from Ambient."}],
)
print(resp.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.ambient.xyz/v1",
apiKey: process.env.AMBIENT_KEY, // create one at https://app.ambient.xyz/keys
});
const resp = await client.chat.completions.create({
model: "ambient/large",
messages: [{ role: "user", content: "Say hello from Ambient." }],
});
console.log(resp.choices[0].message.content);curl https://api.ambient.xyz/v1/models \
-H "Authorization: Bearer $AMBIENT_KEY"Use it from your agent of choice#
Ambient Desktop#
Built in. Sign in once and the included models are ready. Nothing to configure. Start with the Quickstart.
Any OpenAI-compatible tool#
Editors, agent frameworks, and SDKs that accept a custom OpenAI base URL
just work: set the base URL to https://api.ambient.xyz/v1 and your
Ambient key.
Claude Code and Anthropic SDK#
Ambient also speaks the Anthropic Messages format. See the Claude Code setup and the Anthropic SDK guide for exact configuration.
Zero data retention#
Every request through this API is zero data retention by default. Prompts, context, and outputs are processed to serve the response and then discarded. Only usage and billing metadata is kept. The guarantee is backed by both technical inspection and legally binding contracts. See Privacy and data retention for the full story.
Pay-per-use with x402#
Beyond subscriptions, Ambient supports the x402 payment standard on Solana and Base, so agents can pay for inference per request. See the x402 client documentation for integration details.
FAQ#
Is it really OpenAI-compatible?#
Yes. It implements the standard Chat Completions API, so any OpenAI client
works by pointing its base URL at https://api.ambient.xyz/v1 and using
your Ambient key. The Anthropic Messages format is also supported.
Which models can I call?#
GLM 5.2 (z-ai/glm-5.2), Kimi K2.7 Code (moonshotai/kimi-k2.7-code), and
DeepSeek V4 Flash (deepseek/deepseek-v4-flash), plus the ambient/large
alias. Call GET /v1/models to list what is currently available.
Do you keep my prompts or responses?#
No. The API is zero data retention by default; only usage and billing metadata is retained. See Privacy and data retention.
Where is the complete API reference?#
Every operation, with parameters and response fields, is in the API reference. This page is a quickstart for using Ambient inference from Ambient Desktop or your own agent.
Keep going#
- Privacy and data retention: Ambient is zero-data-retention by default. No user data is kept beyond what is needed to serve and bill your requests, backed by technical inspection and legally binding contracts.
- Provider routing: Ambient can prioritize and fall back through providers for search, fetch, browser, media, and model-adjacent work.
- Quickstart: start in the Welcome Folder, finish setup, then run a small calculator task with visible proof.