Skip to content

What is an integration?

An integration lets you keep using an existing provider SDK (OpenAI, Anthropic, Google GenAI, and more) while routing supported endpoints through DeepIntShield. For a supported SDK version and route, migration usually means changing the base URL and supplying a DeepIntShield Virtual Key.

Compatibility is route-specific: provider preview features, uploads, batches, stream events, and provider-specific headers may need a documented adapter or passthrough route. Test the exact endpoints and SDK version your application uses. If you want explicit guardrail, RAG, MCP, or Agentic APIs in addition to native provider clients, use the DeepIntShield Python SDK.


import openai
client = openai.OpenAI(
api_key="your-openai-key"
)
import openai
client = openai.OpenAI(
base_url="https://app.deepintshield.com/openai", # Point to DeepIntShield
api_key="sk-ds-your-virtual-key"
)

Run your ordinary integration and error-path tests after the change. Features apply according to the selected Virtual Key, workspace policy, route, and plan.


  1. OpenAI
  2. Anthropic
  3. Google GenAI
  4. LiteLLM
  5. Langchain
  6. AWS Bedrock

Use multiple providers seamlessly by prefixing model names with the provider:

import openai
# Single client, multiple providers
client = openai.OpenAI(
base_url="https://app.deepintshield.com/openai",
api_key="dummy" # API keys configured in DeepIntShield
)
# OpenAI models
response1 = client.chat.completions.create(
model="gpt-4o-mini", # (default OpenAI since it's OpenAI's SDK)
messages=[{"role": "user", "content": "Hello!"}]
)

For custom HTTP clients or when you have existing provider-specific setup and want to use DeepIntShield gateway without restructuring your codebase:

import requests
# OpenAI-compatible chat endpoint
response = requests.post(
"https://app.deepintshield.com/openai/v1/chat/completions",
headers={
"Authorization": "Bearer sk-ds-your-virtual-key",
"Content-Type": "application/json"
},
json={
"model": "gpt-4o-mini",
"messages": [{"role": "user", "content": "Hello!"}]
}
)
# Anthropic-compatible messages endpoint
response = requests.post(
"https://app.deepintshield.com/anthropic/v1/messages",
headers={
"Content-Type": "application/json",
"x-deepintshield-vk": "sk-ds-your-virtual-key"
},
json={
"model": "claude-3-5-sonnet",
"max_tokens": 1000,
"messages": [{"role": "user", "content": "Hello!"}]
}
)
# Google GenAI-compatible endpoint
response = requests.post(
"https://app.deepintshield.com/genai/v1beta/models/gemini-2.5-flash/generateContent",
headers={
"Content-Type": "application/json",
"x-deepintshield-vk": "sk-ds-your-virtual-key"
},
json={
"contents": [
{"parts": [{"text": "Hello!"}]}
],
"generation_config": {
"max_output_tokens": 1000,
"temperature": 1
}
}
)

All integrations support listing available models through their respective list models endpoints (e.g., /openai/v1/models, /anthropic/v1/models). By default, list models requests return models from all configured providers in DeepIntShield.

You can control which provider’s models to list using the x-deepintshield-list-models-provider header:

import openai
client = openai.OpenAI(
base_url="https://app.deepintshield.com/openai",
api_key="dummy-key"
)
# List models from all providers (default behavior)
all_models = client.models.list()
# List models from a specific provider only
openai_models = client.models.list(
extra_headers={
"x-deepintshield-list-models-provider": "openai"
}
)
anthropic_models = client.models.list(
extra_headers={
"x-deepintshield-list-models-provider": "anthropic"
}
)
Header ValueBehavior
Not set (default)Lists models from all configured providers
allLists models from all configured providers
openaiLists models from OpenAI provider only
anthropicLists models from Anthropic provider only
vertexLists models from Vertex AI provider only
Any valid providerLists models from that specific provider

When listing models from all providers, some provider-specific fields may be empty or contain default values if the information is not available from all providers. This is normal behavior as different providers expose different model metadata.


  1. Start with development - Test DeepIntShield in dev environment
  2. Canary deployment - Route 5% of traffic through DeepIntShield
  3. Feature-by-feature - Migrate specific endpoints gradually
  4. Full migration - Switch all traffic to DeepIntShield
import os
import random
# Route traffic based on feature flag
def get_base_url(provider: str) -> str:
if os.getenv("USE_DEEPINTSHIELD", "false") == "true":
return f"https://app.deepintshield.com/{provider}"
else:
return f"https://api.{provider}.com"
# Gradual rollout
def should_use_deepintshield() -> bool:
rollout_percentage = int(os.getenv("DEEPINTSHIELD_ROLLOUT", "0"))
return random.randint(1, 100) <= rollout_percentage
# Using feature flags for safe migration
import openai
from feature_flags import get_flag
def create_client():
if get_flag("use_deepintshield_openai"):
base_url = "https://app.deepintshield.com/openai"
else:
base_url = "https://api.openai.com"
return openai.OpenAI(
base_url=base_url,
api_key=os.getenv("OPENAI_API_KEY")
)