Skip to content

OpenCode (install and connect to Flash API) ​

OpenCode is an open-source AI coding assistant for the terminal (TUI). It supports a long list of providers and is highly configurable, which makes it a favorite of people who like to tinker.

What you need ​

  • Node.js installed: Node.js
  • A Flash API key
  • OpenCode's OpenAI / @ai-sdk/anthropic base URL: https://ai.flashapi.top/v1

OpenCode uses the AI SDK and needs /v1. The official Anthropic Python / Node.js SDK uses the root URL without /v1.

One command installs OpenCode and connects both Claude and GPT. See OpenCode one-line setup.

bash
curl -fsSL https://sh.flashapi.top/opencode.sh | bash
powershell
irm https://sh.flashapi.top/opencode.ps1 | iex

Pick your OS (manual install) ​

The minimum you need to do ​

  1. Install the opencode command
  2. Install the matching SDK in the config directory (e.g. @ai-sdk/anthropic for Claude)
  3. Write an opencode.json that points at Flash API
  4. Run opencode

One base URL for GPT, Claude and Gemini