1. Add funds and configure a key
Sign in at floodgate.dev and add funds in Billing. Open API Keys and create or edit a key. Choose your routing groups in priority order, or select smart routing. Set a spending limit in USD or choose unlimited. If you already have a key, you can keep using it after completing these settings. An HTTP 409 error withapi_key_setup_required means you need to finish key setup. This error does not charge your balance.
2. Set your API key
3. Choose a model
4. Send a chat request
This example usesgpt-6-sol with the Chat Completions API. Select a group that supports this model in your key settings.
choices[0].message.content. The max_completion_tokens field limits the response to 256 tokens. Floodgate uses the output limit to reserve funds before sending the request.
