Flatrouter

ZCode Setup

Add Flatrouter as a ZCode provider and call models over the OpenAI or Anthropic protocol.

ZCode is an AI coding tool that can talk to third-party model services over compatible API protocols. This guide uses Flatrouter as the example. UI labels can change between versions; if yours looks different, check the ZCode configuration docs.

Requirements

  • A Flatrouter account and an API key
  • The models you want, with full IDs visible in the Flatrouter model catalog
  • ZCode open on a settings page where you can manage providers

Setup

Step 1: open ZCode settings

Two common entry points:

  • Click Manage models at the bottom of the model picker to open provider management.
  • On first launch, click Use API Key on the welcome screen to open API settings.

If neither is on the current screen, open the model picker and look for a manage-models control at the bottom. You can also confirm the current-version path in the ZCode configuration docs.

Step 2: add a Flatrouter provider

Click Add provider at the bottom of the provider list, name it flatrouter, then fill in the endpoint and API key for the protocol you want.

ProtocolBase URLAPI key
OpenAI-compatiblehttps://api.flatrouter.com/v1Your Flatrouter API key
Anthropichttps://api.flatrouter.com/anthropicYour Flatrouter API key

If ZCode asks you to pick a protocol, keep it aligned with the base URL: OpenAI-compatible protocol with the OpenAI-compatible endpoint, Anthropic protocol with the Anthropic endpoint. Do not cross them.

Step 3: add and enable models

  1. Open the Flatrouter model catalog and find the model.
  2. Copy the full model ID, for example gpt-5.6-sol or gpt-5.6-terra. Do not shorten, rewrite or add a prefix.
  3. Back in ZCode, open the flatrouter provider and click add model.
  4. Paste the full model ID into the model ID field and save.
  5. Make sure the flatrouter provider is enabled. If ZCode can enable models one by one, turn that model on too.

Step 4: verify

Return to the model picker, select an enabled model, and send a short message such as "hi, reply connected". A normal reply means the provider, API key, endpoint and model ID are basically right.

See the Flatrouter model catalog. Compare task type, context needs, tool calling, speed, price and current availability. Do not pick from the display name alone — trust the full ID and live availability in the catalog.

FAQ

Q: I cannot find the settings entry

Open the model picker and look for Manage models at the bottom. On first launch, use Use API Key on the welcome screen. If the labels differ, look up the matching entry in the ZCode configuration docs.

Q: I added a provider but it does not show in the picker

Confirm the provider name is flatrouter and that the provider or model is enabled. Reopen the picker after saving, and check that filters are not hiding that provider.

Q: The model appears but I cannot select it or send

Check that the model itself is enabled, and that you pasted the full ID from the Flatrouter model catalog. Do not use a shortened name, alias or a hand-built ID.

Q: Invalid API key or auth failure

Copy your Flatrouter API key again and check for extra spaces or newlines. Use a currently valid Flatrouter key, not a key from another service.

Q: Wrong endpoint or protocol mismatch

OpenAI-compatible uses https://api.flatrouter.com/v1. Anthropic uses https://api.flatrouter.com/anthropic. Keep the protocol, base URL and API key on the same config — do not mix endpoints.

Q: The model ID is correct but the request still fails

Go back to the Flatrouter model catalog and confirm the model is available on your account. It may be temporarily down or limited by quota or permissions. Try another currently available model from the catalog.

Q: No response or the connection times out

Check the network, firewall, proxy and DNS, and confirm you can reach the Flatrouter API. If the network looks fine, retry later and watch for service status or a network policy blocking the request.

On this page