Connect apps
Your own application
Your code keeps using the OpenAI or Anthropic SDK it already uses. Change the base URL and the key; nothing else.
Get a key with the right protection
In the console, open Connect an app (opens in a new tab) and pick this tool. AgentKeyRoute recommends a governance profile, creates the key, and shows these same steps with your key and an allowed model filled in, plus a live test.
- Install an SDK
pip install openai - Call the gateway
from openai import OpenAI client = OpenAI(base_url="https://gateway.agentkeyroute.com/v1", api_key="<your API key>") resp = client.chat.completions.create( model="gpt-4.1", messages=[{"role": "user", "content": "Hello"}], extra_headers={"X-AIGov-User": "<end user id>"}, ) print(resp.choices[0].message.content) - Attribute requests to people
Send
X-AIGov-Userwith the signed-in user's ID (as in the Python example), so audit records and per-person reports show who asked, not just which app.
Choosing what to connect in the wizard
| Pick | When |
|---|---|
| Chatbot or assistant | Answers questions for people. |
| Search & document Q&A | Retrieval over your documents (RAG). |
| Workflow agent | Takes actions in other systems; registered as autonomous. |
| Your own application | Anything else, including tools not listed in these docs that accept an OpenAI or Anthropic base URL. |
See Endpoints & examples for streaming, tools, embeddings, images and more.