Skip to content

LLM Text Generation

Use this section when you want to integrate OmniRouters for chat, text generation, reasoning, or protocol migration.

OmniRouters supports multiple request protocols for LLM text generation. The most important rule is simple:

All models enabled in your OmniRouters account can be called through the OpenAI-compatible protocol.

That means /v1/chat/completions and /v1/responses are the safest default choices when you want one request style that works across providers and model families.

For most new integrations, start with one of these two OpenAI-compatible routes:

Use the Claude or Gemini protocol pages when you are migrating an existing client, SDK, or payload format and want to minimize request-shape changes.

Available Protocols

ProtocolOmniRouters endpointBest forOfficial docs
OpenAI Chat CompletionsPOST /v1/chat/completionsBroad compatibility, simple chat, fastest migration from existing OpenAI chat clientsOpenAI Chat API reference
OpenAI ResponsesPOST /v1/responsesNewer structured workflows, tool calling, reasoning-oriented integrationsOpenAI Responses API reference
Claude MessagesPOST /v1/messagesAnthropic / Claude SDK migration with a Claude-style payloadAnthropic Messages API reference
Gemini Generate ContentPOST /v1beta/models/{model}:generateContentGoogle Gemini SDK migration with contents / parts request formatGoogle Gemini generateContent reference

OmniRouters Conventions

Before you choose a protocol, keep these OmniRouters-specific rules in mind:

  • Base URL: https://omnirouters.com
  • OpenAI-compatible routes usually live under https://omnirouters.com/v1
  • Gemini-style routes use https://omnirouters.com/v1beta/...
  • Authentication uses Authorization: Bearer <your-api-key> on OmniRouters, even when the upstream provider uses another auth header
  • Model names must match the models enabled in your OmniRouters account
  • Use https://omnirouters.com/keys to create and manage API keys

Which Protocol Should You Pick?

If you are building a new app

Start with the OpenAI-compatible protocol.

If you already use Claude

Use the Claude Messages page first. It keeps the request body closer to Anthropic's native format.

If you already use Gemini

Use the Gemini Generate Content page first. It keeps the contents / parts structure familiar.

If you want the shortest path with the widest compatibility

Start with OpenAI Chat Completions. On OmniRouters, this is the cleanest default for cross-provider model access.

Continue Reading

  1. Read OpenAI Chat Completions
  2. Review Protocol Comparison
  3. Open the full Apifox API Reference