Skip to main content
Add Floodgate to Pi’s models.json to use your Floodgate models. 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 Pi

Check the installation:

2. Set your API key

PowerShell:

3. Add Floodgate models

Create or edit ~/.pi/agent/models.json:
openai-completions selects Chat Completions for this configuration. Pi reads $FLOODGATE_API_KEY from your environment.

4. Run Pi

Use /model, then select a model under floodgate. Pi reloads models.json whenever you open the model picker. Run a single task:

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. See Pi’s compatible-endpoint configuration for current model configuration rules.