KosmoKrator

ai

OpenRouter MCP, CLI, and Lua Integration for AI Agents

OpenRouter integration docs for AI agents: MCP gateway setup, OpenRouter CLI commands, Lua API reference, credentials, and function schemas.

7 functions 6 read 1 write API key auth

OpenRouter for agents

Credentials can be configured manually in web or CLI hosts.

Use this integration from Lua code mode, the headless integrations CLI, or the KosmoKrator MCP gateway. The same package metadata powers all three surfaces.

Machine-Readable Metadata
integration_slug
openrouter
route_slug
openrouter
package
openrouter
auth_strategy
api_key API key
cli_setup_supported
true
cli_runtime_supported
true
mcp_gateway_supported
true
lua_supported
true
supports_multi_account
true

Quick Links

OpenRouter MCP Client Matrix

Use these pages when a specific agent client or framework needs copy-pasteable MCP setup for OpenRouter.

OpenRouter CLI Matrix

Use these pages for direct OpenRouter CLI workflows in scripts, CI, cron, and agent wrappers.

Function Catalog

FunctionTypeParametersDescription
openrouter.openrouter_list_models Read read 0 List available AI models on OpenRouter. Returns model identifiers, names, pricing, context lengths, and capabilities.
openrouter.openrouter_create_completion Write write 7 Create a chat completion using any model available on OpenRouter. Supports multi-turn conversations, system prompts, temperature control, and configurable output length.
openrouter.openrouter_list_generations Read read 3 List generation records from OpenRouter. Returns generation IDs, models used, token counts, and costs.
openrouter.openrouter_get_generation Read read 1 Get details for a specific OpenRouter generation, including token usage, costs, and latency.
openrouter.openrouter_list_api_keys Read read 0 List API keys for the OpenRouter account. Returns key names, creation dates, and usage limits.
openrouter.openrouter_get_usage Read read 1 Get usage statistics for the OpenRouter account, including token counts and costs.
openrouter.openrouter_get_current_user Read read 0 Get the authenticated user's profile and account information.