Quick Start

Route your LLM traffic through AgentSecure in three steps. No infrastructure changes required — one environment variable swap.

1

Get your API key

Your AgentSecure API key authenticates your requests to the proxy. Find it on the API Keys page.

Keep your key secret — treat it like a password. It should be set as an environment variable, never hardcoded.
2

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)
What changed:
  • base_url → AgentSecure endpoint instead of the provider directly
  • X-AgentSecure-Key → your key from Step 1
  • Everything else — model, API key, SDK — stays exactly the same
3

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.

Providerbase_url
Mistralhttps://mistral.agentsecure.io
Groqhttps://groq.agentsecure.io
Google Geminihttps://gemini.agentsecure.io
Coherehttps://cohere.agentsecure.io
Together AIhttps://together.agentsecure.io
xAI Grokhttps://xai.agentsecure.io
Perplexityhttps://perplexity.agentsecure.io
Hugging Facehttps://huggingface.agentsecure.io

Azure OpenAI and Amazon Bedrock require additional headers — see the Settings page for details.

Next steps