VIRTUAL MODELS AND ROUTERS

One model name.
Routes you can change.

A virtual model is a private routing configuration with a stable model selector. Your app sends that selector, and ZRouter routes the request to the provider models you choose.

What is a virtual model?

A virtual model does not train or host a new AI model. It groups available provider models behind one name and defines how requests reach them. The dashboard calls these Virtual models; zctl uses routers commands for the same account resources.

Who is it for, and why use it?

  • Application developers: change provider targets without changing the model selector in your application.
  • People managing performance and cost: choose targets and weights, or use an available schedule strategy for different hours.
  • Developers automating account tasks: export and apply router JSON with zctl, or manage the route through an MCP assistant.

Use a concrete provider model when you want to select exactly that model, including customer BYOK requests. Use a virtual model when routing choices need to live outside your application code.

Create one in the dashboard

  1. Open Virtual models and create a virtual model with a name you will recognize.
  2. Add provider/model targets from the models available in your workspace.
  3. Choose an available routing strategy and configure its targets, weights, fallback, or session keeping as needed.
  4. Save the configuration and copy the private selector, such as accounts/<account-id>/support-bot.
  5. Use that selector in your API request's model field. It is also available in the playground and in /v1/models for your account keys.

Create one with zctl

zctl models list
zctl routers create support-bot --target PROVIDER/MODEL --strategy round_robin
zctl routers list
zctl routers edit support-bot

Replace PROVIDER/MODEL with a model available in your account. Copy the returned source selector for API requests. The CLI guide covers installation, editing, exporting, and applying router configurations.

Manage one with an MCP assistant

Connect the account MCP server and ask your assistant to list available models, inspect a virtual model, or create a route using the targets you specify. Review the targets and routing settings before using the selector in your application.

How are virtual-model requests billed?

Virtual models use platform provider connections and your account's prepaid rates. The initial credit reservation covers possible targets, so it can exceed the final charge. Metered fallback attempts can affect settlement. See credits and billing for reservations and actual charges.

Customer BYOK uses a concrete provider-qualified model with a saved provider key. It does not use virtual-model routing or fall back to another provider.

Frequently asked questions

Is my virtual model shared with other accounts?

No. Its selector belongs to your account. Other customers cannot manage it or use it through their account API keys.

Will changing a target require a code change?

Keep the same virtual-model selector in your request. Changing its saved routing configuration changes how later requests select a target. Make sure each target supports your application's endpoint and request parameters.

Can I route by time of day?

Yes, when the schedule strategy is enabled. The scheduled routing guide explains peak windows, timezones, target order, and defaults.