Quick Start
Route your LLM traffic through AgentSecure in three steps. No infrastructure changes required — one environment variable swap.
Get your API key
Your AgentSecure API key authenticates your requests to the proxy. Find it on the API Keys page.
Point your SDK at AgentSecure
Change one URL in your existing code. Your provider API key and SDK stay the same — AgentSecure acts as a transparent proxy.
import openai
client = openai.OpenAI(
base_url="https://openai.agentsecure.io/v1",
api_key="YOUR_OPENAI_API_KEY",
default_headers={
"X-AgentSecure-Key": "YOUR_AGENTSECURE_KEY",
},
)
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)base_url→ AgentSecure endpoint instead of the provider directlyX-AgentSecure-Key→ your key from Step 1- Everything else — model, API key, SDK — stays exactly the same
Verify traffic is flowing
Send a test request using the code above. Then check the Overview or Audit Log — your request should appear within a few seconds.
If DLP triggers on your prompt, the proxy returns a 400 with a JSON body explaining which pattern matched. Redacted requests return 200 with sensitive fields replaced inline.
Other supported providers
All providers follow the same pattern — swap the base_url and add the X-AgentSecure-Key header.
| Provider | base_url |
|---|---|
| Mistral | https://mistral.agentsecure.io |
| Groq | https://groq.agentsecure.io |
| Google Gemini | https://gemini.agentsecure.io |
| Cohere | https://cohere.agentsecure.io |
| Together AI | https://together.agentsecure.io |
| xAI Grok | https://xai.agentsecure.io |
| Perplexity | https://perplexity.agentsecure.io |
| Hugging Face | https://huggingface.agentsecure.io |
Azure OpenAI and Amazon Bedrock require additional headers — see the Settings page for details.