Skip to main content
Each Floodgate API key has its own routing settings and spending limit. Configure these in API Keys. All keys spend from the same account balance.

Set up a key

  1. Create or edit a key.
  2. Select routing groups in priority order, or choose smart routing.
  3. Set a spending limit in USD or choose unlimited.
  4. Add any model restrictions or expiry date, then save.
You can keep your existing key. If it returns HTTP 409 with api_key_setup_required, complete these settings before sending another request. This error does not charge your balance.
An unlimited key can spend the available account balance. Your account’s rate and concurrency limits still apply.

Routing groups and fallbacks

A routing group offers a selection of models at its own prices. The first group in your key’s list is the primary group. The remaining groups are fallbacks. Drag groups or use the reorder controls to change their priority. The selector shows how many groups you can choose. Choose groups that support your model and API. When a fallback handles a request, its price applies. Compare prices in Model Square before adding fallbacks. Group names are case-sensitive. Standard is the current name of the former Economy group. Names such as Codex-Gpt-1 and Claude-Code-1 identify routing groups. Use the separate client guides to configure your coding tool.

Smart routing

Smart routing chooses a group for each request based on your preference. Smart routing uses groups that support the requested model and API. It follows your key’s model restrictions and spending limit. Your manual group order is kept when you switch to smart routing. You can switch back at any time. An empty smart_routing value uses the saved auto_groups order. The final charge depends on actual usage, including output length, cached tokens, context pricing, media settings, and minimum charges. Choose groups manually if you want to control which groups can handle your requests.

Manage routing through the API

GET /api/token/auto-groups returns the routing groups, max_count, and quota_per_usd. Use account authentication for this endpoint. When creating or updating a key, use auto_groups for manual routing or smart_routing for a routing preference. Use the dashboard to set a spending limit in USD.

Group prices

A display ratio compares a group’s price with a reference API price. For example, 0.5x means 50% of the reference price. Model-specific prices, context tiers, and minimum charges determine the final bill. Use Model Square for the full selection of groups and model prices. Account tiers control discounts and limits separately from routing groups. See Billing and tiers.