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"
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |