Overview

Allternit’s LLM gateway provides a unified API across multiple model providers. Switching models — or running multiple models in parallel — requires no code changes, just configuration.

Supported providers

Using policy aliases

Policy aliases are the simplest way to migrate. The gateway resolves an alias to a concrete provider/model pair and derives a cross-provider fallback chain automatically.

Using explicit provider/model ids

For deterministic routing, pass a connected provider and model directly:

Migration checklist

  1. List connected models with GET /v1/models.
  2. Test with a small workload using a policy alias or explicit model.
  3. Compare outputs, latency, and cost via the Estimates API and Usage logs.
  4. Update your application to use the new model string.
  5. Monitor usage via the audit log for the first 24 hours.

Cost comparison

Use the cost estimation API before migrating:

Prompt caching

Allternit supports prompt caching for models that advertise it. Cached prompts reduce latency and cost for repeated system prompts:
For caching entire message arrays, see Context Caches.

Reasoning mode

Enable extended thinking for complex tasks: