Migrate an application to FlyRouter

Move one application or API key at a time, verify its protocol and model IDs, and compare actual request records before increasing traffic. A shared SDK format does not guarantee every provider-specific feature behaves identically.

Updated:

Inventory before changing the endpoint

Record the current endpoint, SDK version, model ID, streaming mode, tools, structured output, image inputs, timeouts and retries. Keep the previous configuration available for rollback. Do not copy production credentials into public examples.

Match the protocol

Application protocolFlyRouter base URLGuide
OpenAI Chat Completions / Responseshttps://api.flyrouter.ai/v1Quickstart
Anthropic Messageshttps://api.flyrouter.aiClaude Code
Gemini nativehttps://api.flyrouter.aiAPI reference

Use the exact ID in the pricing directory. A name accepted by another gateway may be an alias that is not accepted here. Configure the API key in an environment variable or your secret manager.

Validate a small set of requests

  1. Send a short text request and inspect status, model ID and usage.
  2. Test streaming and cancellation if your app uses them.
  3. Test tool calls and structured output against your actual schema, not only a greeting prompt.
  4. Test image input and caching separately when required.
  5. Check the console deduction and retry behavior. Ensure your application does not retry indefinitely.

Record the client version and date with each result. Mark untested features as untested; a successful text request is not evidence that all agent features work.

Move traffic and keep rollback available

Start with a small workload and watch errors, completion quality, latency and total cost. Keep the old endpoint and model mapping as a configuration option. If a required feature fails, stop increasing traffic and use the previous configuration while investigating.

Use errors and retries, token cost reconciliation and service metrics for evaluation. No automatic failover between providers is implied by this migration process.