<aside>
:ambient-logo-original: Docs Home
🌐 Homepage
:discord-symbol-blurple: Discord
:github-mark-white-bg: github.com/ambient-xyz
:x-logo-black: @ambient_xyz
:x-logo-black: @IridiumEagle
</aside>
Ambient provides an OpenAI-compatible and Anthropic-compatible inference API at https://api.ambient.xyz.
Get an API key from app.ambient.xyz/keys.
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. If you want to vibe code a test directly in Python, please feel free to use these two files. The first file is a fully worked Python demo of streaming using reasoning and non reasoning modes. To get it going, simply place your api key in a file called ambient_api_key.txt in the same directory as the demo. The second file is a complete API reference condensed into one file for LLM usage with Python examples of all functions. :
https://drive.google.com/file/d/1E1UCWc2DPR4VFM9P0PEVfcPDNoqkKtCh/view?usp=sharing
https://drive.google.com/file/d/1GEkctbduqsPzuzl6GYJcCbLgkTAZTJyI/view?usp=sharing
You can integrate with the Ambient API in three ways:
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 the 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.