Connect OutSystems ODC and O11 applications to 100+ AI models (Claude 3.5 Sonnet, GPT-4o, DeepSeek, Gemini, Llama 3) with a single API key, low-code server actions, and a drag-and-drop Chatbot UI widget.
🌟 Key Features
anthropic/claude-3.5-sonnet
openai/gpt-4o
deepseek/deepseek-r1
AIAgent_ChatWidget
OpenRouter_ChatAgent
OpenRouter_PromptAgent
💻 Framework Compatibility
🌍 Real-Life Business Use Cases🏢 1. Automated Customer Support & FAQ Assistant
Problem: Customer support teams are overwhelmed by repetitive queries regarding order status, return policies, and business hours.Solution: Drag the AIAgent_ChatWidget onto your portal or mobile app with a system prompt like "You are a friendly customer service bot for Acme Store". The bot handles routine FAQs 24/7 using cost-effective models like google/gemini-flash-1.5 or openai/gpt-4o-mini.
"You are a friendly customer service bot for Acme Store"
google/gemini-flash-1.5
openai/gpt-4o-mini
📄 2. Document & Invoice Summarizer
Problem: Employees waste hours manually reading lengthy PDF contracts, invoices, or customer emails.Solution: Use OpenRouter_PromptAgent in a background process. Pass the document text with a system prompt asking to "Extract key dates, total amounts, and contract parties as bullet points".
"Extract key dates, total amounts, and contract parties as bullet points"
💡 3. Multi-Model A/B Testing & Cost Optimization
Problem: Locking an enterprise app into a single cloud AI provider (like Azure OpenAI) makes it difficult to take advantage of cheaper or faster new models.Solution: Use OpenRouter to route simple tasks (e.g., categorizing a ticket) to budget open-source models like meta-llama/llama-3.3-70b, while routing complex legal or financial analysis to anthropic/claude-3.5-sonnet or deepseek/deepseek-r1.
meta-llama/llama-3.3-70b
🌐 4. Multilingual Translation & Localized Responses
Problem: A global enterprise needs to support users in 30+ languages without hiring multilingual staff.Solution: Pass user input into OpenRouter_PromptAgent specifying the target output language. The AI translates text, detects sentiment, and generates culturally context-aware replies.
💻 5. Smart Developer & SQL Assistant for Internal Tools
Problem: Internal operations teams need help writing complex database search filters or analytical reports.Solution: Embed a chat widget inside your internal back-office portal powered by deepseek/deepseek-r1 or anthropic/claude-3.5-sonnet to assist staff with logic and data analysis.
📖 User Manual & Technical Reference1. Block Specification (AIAgent_ChatWidget)📥 Input Parameters
ApiKey
""
sk-or-v1-...
Model
"anthropic/claude-3.5-sonnet"
SystemPrompt
"You are a helpful assistant."
WidgetTitle
"AI Assistant"
PlaceholderText
"Ask anything..."
ExtendedClass
📤 Block Events
OnResponseReceived
LatestResponse
OnError
ErrorMessage
2. Server Actions Reference⚙️ OpenRouter_PromptAgent (Single Question Q&A)
Use this action when you need a single answer without keeping chat memory (e.g. text translation, data extraction).
UserPrompt
Temperature
MaxTokens
IsSuccess
AIResponseText
TotalTokensUsed
⚙️ OpenRouter_ChatAgent (Conversational Memory)
Use this action for multi-turn conversations where the AI needs to remember previous context.
ConversationHistory
OpenRouterMessage
NewUserMessage
LatestAIResponse
UpdatedHistory
🔍 Troubleshooting & FAQQ: Where do I get an OpenRouter API Key?
A: Create a free account at openrouter.ai, go to Keys, and generate a key starting with sk-or-v1-.
sk-or-v1-
Q: What happens if an invalid model string is passed?
A: OpenRouter will return an API error message (e.g. Model not found), which is caught by the Server Action and returned in the ErrorMessage output parameter.
Model not found
Q: How do I control how long/short the AI response is?
A: You can pass MaxTokens (e.g. 100 for short replies, 2000 for detailed articles) or specify formatting rules inside the SystemPrompt (e.g. "Keep answers under 50 words").
100
2000
"Keep answers under 50 words"
📄 License & Contribution