Skip to main content

Overview

One of YouRouter’s core principles is to provide maximum flexibility and transparency. To achieve this, we follow a simple rule: YouRouter forwards your entire request body and all headers directly to the upstream provider. The only modification we make is replacing your YouRouter Authorization header with the appropriate upstream API key for the selected provider. This design means you can leverage provider-specific features and new parameters the moment they are released, without waiting for us to update our platform. If a provider supports a feature, you can use it through YouRouter.

Example: Using a Provider-Specific Parameter

Let’s say you want to use a feature specific to OpenAI, such as logprobs, which is not part of the standard, cross-provider feature set. With YouRouter, you can simply include it in your request body as you would when calling OpenAI directly.
# We are sending a request with the non-standard `logprobs` parameter.
curl https://api.yourouter.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "vendor: openai" \
  -d '{
    "model": "gpt-4o",
    "messages": [{"role": "user", "content": "Hello world!"}],
    "logprobs": true,
    "top_logprobs": 5
  }'
YouRouter sees the logprobs: true and top_logprobs: 5 parameters in the JSON body and forwards them unchanged to OpenAI. The results come back exactly as if you had called their API directly. This approach works for any custom header or body parameter that the provider supports.
I