AI Gateway — route, translate & observe LLM traffic
sk-xxxxxxxx and keep it safe.// HTTP Header Authorization: Bearer sk-your-api-key-here
Retrieve all models currently supported by the gateway:
// Request curl http://localhost:7890/v1/models \ -H "Authorization: Bearer sk-your-api-key" // Response { "object": "list", "data": [ { "id": "qwen3.6-plus", "object": "model" }, { "id": "glm-5.1", "object": "model" } ] }
# Send your first chat request curl http://localhost:7890/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer sk-your-api-key" \ -d '{ "model": "qwen3.6-plus", "messages": [ { "role": "user", "content": "Hello!" } ] }'
sk-your-api-key with your actual API key and qwen3.6-plus with an available model name.Protocol-agnostic reverse proxy — resolves the target protocol from model configuration, forwards requests as-is with auth injection. Works with any model protocol.
# POST example — request body forwarded unchanged # {*rest} = any upstream path, e.g. "chat/completions" curl http://localhost:7890/v3/my-model/{chat/completions} \ -H "Content-Type: application/json" \ -H "Authorization: Bearer sk-your-api-key" \ -d '{ "key": "value" }' # GET example — query params forwarded to upstream curl http://localhost:7890/v3/my-model/{status}?verbose=true \ -H "Authorization: Bearer sk-your-api-key"
{...} with the actual upstream path. The path is appended to the upstream base URL. Set direct_path = true on the model to use the base URL as-is instead.All MCP servers share a single JSON-RPC 2.0 endpoint. Operations are distinguished by the method field in the request body:
initialize ·
tools/list ·
tools/search ·
tools/call
# 1. List all tools from all servers curl -X POST http://localhost:7890/mcp \ -H "Content-Type: application/json" \ -H "Authorization: Bearer sk-your-api-key" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/list" }' # 2. Search tools across all servers (BM25 ranking) curl -X POST http://localhost:7890/mcp \ -H "Content-Type: application/json" \ -H "Authorization: Bearer sk-your-api-key" \ -d '{ "jsonrpc": "2.0", "id": 2, "method": "tools/search", "params": { "query": "pull request", "limit": 5 } }' # 3. Call a specific tool (name format: server_name.tool_name) curl -X POST http://localhost:7890/mcp \ -H "Content-Type: application/json" \ -H "Authorization: Bearer sk-your-api-key" \ -d '{ "jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": { "name": "github.get_repo_info", "arguments": { "owner": "octocat", "repo": "hello-world" } } }'
server_name.tool_name format. Access is controlled by your API key's MCP ACL settings configured in the Console.