Ambient

Build on Ambient

The Ambient API surface for developers. OpenAI-compatible chat completions and Anthropic-compatible messages at one base URL, with bearer-key auth.

Ambient exposes a single HTTP API at https://api.ambient.xyz that serves open models running on the Ambient network. It speaks two dialects: OpenAI Chat Completions and the Anthropic Messages format, so existing SDKs and tools work by swapping the base URL.

The API in one screenful#

Base URL https://api.ambient.xyz (OpenAI-style paths under /v1)
Auth Authorization: Bearer <key>; keys from app.ambient.xyz/keys
OpenAI-compatible POST /v1/chat/completions
Anthropic-compatible POST /v1/messages (+ POST /v1/messages/count_tokens)
Model catalog GET /v1/models (no auth required)
Interactive spec api.ambient.xyz/docs (Swagger) · api.ambient.xyz/redoc

There is no Ambient-specific SDK to install. Use the official OpenAI or Anthropic SDK for your language and point it at Ambient; the OpenAI SDK and Anthropic SDK guides show how.

In this section#

Core API guides

  • Models and readiness: the live catalog, the is_ready flag, the ambient/large alias, and where pricing comes from
  • Streaming: SSE mechanics, the dual reasoning/reasoning_content delta keys, and stall handling
  • Errors and retries: status-code taxonomy, including the 429 "No workers available" vs rate-limit distinction
  • Verified inference: requesting verified inference and reading the verification fields in the response
  • OpenAI SDK: Python and TypeScript setup and streaming
  • Anthropic SDK: Messages-format setup, thinking blocks, and streaming

API reference

Integrations

  • Claude Code: pointing Claude Code at the Anthropic-compatible API (base URL, key, and model)
  • OpenCode: selecting Ambient from the built-in provider menu
  • OpenClaw: installing the Ambient plugin from ClawHub

On-chain

  • Pay per request with x402: pay-per-request inference through JumpGate. Quote, pay in USDC on Solana or Base, then stream the response
  • Solana quickstart: the Solana-compatible RPC endpoint and where the JumpGate relayer fits
  • The auction program: JobRequest lifecycle, the second-lowest reverse auction, and requesting verified inference via CPI
  • Tool Oracle: on-chain inference calls from Solana programs, with results written back on-chain

New to Ambient entirely? Start with the quickstart: key, first request, and what comes back.