> ## Documentation Index
> Fetch the complete documentation index at: https://docs.yourouter.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Request Forwarding

> We forward your entire request body and all headers (except Authorization) directly to the upstream provider.

## 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.

<CodeGroup>
  ```bash cURL theme={null}
  # We are sending a request with the non-standard `logprobs` parameter.
  curl https://api.yourouter.ai/v1/chat/completions \
    -H "Authorization: Bearer $YOUROUTER_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
    }'
  ```

  ```python Python theme={null}
  import os
  from openai import OpenAI

  client = OpenAI(
      api_key=os.environ["YOUROUTER_API_KEY"],
      base_url="https://api.yourouter.ai/v1"
  )

  # You can pass provider-specific parameters directly in the create method.
  # The OpenAI Python SDK will include them in the request body.
  response = client.chat.completions.create(
      model="gpt-4o",
      messages=[{"role": "user", "content": "Hello world!"}],
      logprobs=True,
      top_logprobs=5,
      extra_headers={"vendor": "openai"}
  )

  logprobs = response.choices[0].logprobs
  print(logprobs)

  ```
</CodeGroup>

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.
