<aside>
:ambient-logo-original: Ambient Documentation
🌐 Homepage
</aside>
Ambient provides an OpenAI-compatible and Anthropic-compatible inference API at https://api.ambient.xyz.
Get an API key through app.ambient.xyz/keys, or create and fund an API-only account through Headless x402 Subscriptions without using the Ambient UI.
For speed and flexibility, we recommend using Direct API Calls. These allow you to control thinking tokens (balancing speed and latency) and perform Deep Research directly. The streaming Python demo covers reasoning and non-reasoning modes; place your API key in a file named ambient_api_key.txt in the same directory. The condensed API reference contains Python examples of all functions.
Use the official OpenAI SDK with Ambient as the base URL. This is ideal if you're already using OpenAI's SDK or prefer its interface.
See OpenAI SDK for Python and JavaScript examples.
Use the official Anthropic SDK with Ambient as the base URL. This is ideal if you prefer Anthropic's Messages API format.
See Anthropic SDK for Python and JavaScript examples.
Make HTTP requests directly to the API without using an SDK. This gives you full control and works with any programming language.
See the Interactive API Documentation for endpoints, request/response schemas, and to try requests directly in the browser.