Skip to main content
Add Floodgate as a custom provider in OpenCode. The configuration below uses the Chat Completions API.

Before you connect

Add funds to your balance, then configure your API key with routing groups and a spending limit. Use Model Square to find models, prices, and supported APIs.

1. Install OpenCode

2. Set your API key

PowerShell:

3. Add the provider

Create ~/.config/opencode/opencode.json. You can also place opencode.json inside your project root.

4. Run OpenCode

Run /models in OpenCode to switch between models under Floodgate.
Edit this model list to include the models you want to use through your key’s groups.

Generate images, speech, and video

Add a script, function, or MCP tool that calls Floodgate’s image, speech, or video API and saves the result. Your coding client can call this tool while you work. See Function tools for tool setup and Coding tools for the media workflow. To use Responses, configure @ai-sdk/openai and choose a model that supports that API. See the OpenCode provider documentation.