OpenCode

Configure OpenCode to use Ambient as its inference provider by selecting Ambient from the built-in provider menu and pasting your API key.

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#

  1. Launch OpenCode#

    opencode
  2. Open the model selection menu#

    Type /models to launch the inference model selection menu.

  3. Open the provider selection menu#

    Hit Ctrl-A to open the provider selection menu.

  4. Select Ambient#

    Type Ambient in the search box and press Enter.

  5. Paste your API key#

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

  6. Pick a model#

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

Resources#