Unified AI Gateway Ā· Port 3210 Ā· v4.1.0
Same URL for chat, search, translate, code, analyze. Use "function" field to change behavior.
POST /v1/chat/completions
// Chat
{"model": "claude", "message": "Hello"}
// Search ā add "function": "search"
{"model": "perplexity", "message": "AI news", "function": "search"}
// Translate ā add "function": "translate" + "to"
{"model": "gemini", "message": "Hello", "function": "translate", "to": "Hindi"}
// Code ā add "function": "code"
{"model": "claude", "message": "Sort algo", "function": "code"}
| chat | No function field needed | Default |
| search | "function": "search" | Web search + AI |
| translate | "function": "translate", "to": "Hindi" | Translate text |
| brainstorm | "function": "brainstorm" | Generate ideas |
| code | "function": "code", "action": "generate|review|debug|explain" | Code tools |
| analyze | "function": "analyze", "url": "..." | Analyze URL/content |
| security_audit | "function": "security_audit", "code": "..." | Security vulnerability scan |
| debate | "function": "debate" | Multi-perspective debate |
curl http://localhost:3210/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model": "claude", "message": "What is AI?"}'
curl http://localhost:3210/v1/chat/completions \
-d '{"model": "perplexity", "message": "AI news 2026", "function": "search"}'
curl http://localhost:3210/v1/chat/completions \
-d '{"model": "gemini", "message": "Hello world", "function": "translate", "to": "Hindi"}'
curl http://localhost:3210/v1/chat/completions \
-d '{"model": "claude", "message": "Sort algorithm", "function": "code", "action": "generate", "language": "Python"}'
// ChatGPT se search
{"model": "chatgpt", "message": "AI trends", "function": "search"}
// Gemini se code
{"model": "gemini", "message": "REST API", "function": "code"}
// Perplexity se chat
{"model": "perplexity", "message": "Explain quantum computing"}
// Auto pick ā har cheez ke liye
{"model": "auto", "message": "Hello"}