<aside>

Overview

:ambient-logo-original: Ambient Documentation

What is Ambient?

Getting Started

Testnet

App

API

On-Chain

Tool Oracle

Claude Code

OpenClaw

OpenCode

Miners

Encyclopedia

Solana Quickstart

X402 Client Documentation

Developers

OpenAI SDK

Anthropic SDK

API Docs

API Playground

Links

🌐 Homepage

✉️ [email protected]

:discord-symbol-blurple: Discord

</aside>

This guide shows how to configure OpenCode to use Ambient's inference API.

Prerequisites

  1. An Ambient account with credits
  2. An Ambient API key from app.ambient.xyz/keys
  3. OpenCode installed

Configuration

Launch OpenCode

opencode

Type in /models to launch the inference model selection menu.

image.png

Hit Ctrl-A to open the provider selection menu:

image.png

Type in Ambient in the search box and press Enter:

image.png

You'll be prompted for your Ambient API key. Paste the key from app.ambient.xyz/keys when asked.

Then, select your desired model and proceed to complete the setup.

image.png

Resources