Skip to content

Passthrough

Passthrough integrations let you call provider-native API paths and payloads through DeepintShield. You keep the exact request and response shapes your provider SDK expects, and the provider’s response (status, headers, and body) comes back unchanged for both streaming and non-streaming requests, while still gaining DeepintShield features such as governance, logging, and observability.

Use passthrough when you need a provider endpoint that is not yet covered by a dedicated DeepintShield integration route.


Point your provider SDK or HTTP client at the matching passthrough endpoint:

EndpointProvider
/openai_passthroughOpenAI
/anthropic_passthroughAnthropic
/genai_passthroughGemini, or Vertex AI (auto-detected)

For GenAI, send Gemini-style requests to /genai_passthrough as usual. To route a request through Vertex AI instead, configure your client for Vertex (vertexai=True) - DeepintShield routes to Vertex automatically when the request uses a Vertex-style path (/projects/{PROJECT_ID}/locations/{LOCATION}/), a Vertex model resource path, or a Vertex OAuth token (Bearer ya29...). See the Vertex-style example below.


from deepintshield import DeepintShield
shield = DeepintShield(virtual_key="sk-bf-your-virtual-key")
client = shield.openai(passthrough=True)
response = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "hello from passthrough"}],
)
print(response.choices[0].message.content)
from deepintshield import DeepintShield
shield = DeepintShield(virtual_key="sk-bf-your-virtual-key")
client = shield.anthropic(passthrough=True)
response = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=1024,
messages=[{"role": "user", "content": "hello from passthrough"}],
)
print(response.content[0].text)
from deepintshield import DeepintShield
shield = DeepintShield(virtual_key="sk-bf-your-virtual-key")
client = shield.genai(passthrough=True)
response = client.models.generate_content(
model="gemini-2.5-flash",
contents="hello from passthrough",
)
print(response.text)
from google import genai
from google.genai.types import HttpOptions
client = genai.Client(
vertexai=True,
api_key="sk-bf-your-virtual-key",
http_options=HttpOptions(
base_url="https://app.deepintshield.com/genai_passthrough",
headers={"x-bf-vk": "sk-bf-your-virtual-key"},
),
)
response = client.models.generate_content(
model="gemini-2.5-flash",
contents="hello from vertex passthrough"
)
print(response.text)

  • Add your virtual key with the x-bf-vk header (or pass it as the api_key when using the DeepintShield SDK) so the request is attributed for governance, logging, and observability.
  • The provider’s native authentication header (for example authorization, x-api-key, or x-goog-api-key) is forwarded to the provider unchanged.