orgo_ai_completion
Access 400+ AI models from OpenAI, Anthropic, Google, and others through a unified API to generate text completions for prompts.
Instructions
Run an AI completion using OpenRouter's 400+ models.
Access models from OpenAI, Anthropic, Google, Meta, and more through
a unified API. Requires OpenRouter key in your Orgo account settings.
Args:
params (AICompletionInput): Input containing:
- model (str): Model ID (e.g., 'openai/gpt-4')
- prompt (str): The prompt to send
- system (Optional[str]): Optional system message
- max_tokens (int): Max response length, 1-100000 (default: 1024)
- temperature (float): Randomness, 0-2 (default: 0.7)
Returns:
str: The model's response text
Examples:
- "Ask GPT-4 to explain quantum computing" ->
params with model="openai/gpt-4", prompt="Explain quantum computing"
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"params": "<params>"
},
"name": "orgo_ai_completion"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |