KosmoKrator

productivity

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.

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.

Agent Surfaces

Machine-Readable Metadata

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_create_response Write write 0 Create a response through the Responses-compatible endpoint.
openrouter.openrouter_create_message Write write 0 Create a message through the messages endpoint.
openrouter.openrouter_create_embedding Write write 0 Create embeddings using an OpenRouter embedding model.
openrouter.openrouter_list_embedding_models Read read 0 List models that support embeddings.
openrouter.openrouter_rerank Write write 0 Rerank documents for a query using OpenRouter reranking models.
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_get_generation_content Read read 0 Get stored prompt and completion content for a generation.
openrouter.openrouter_count_models Read read 0 Count available models with optional OpenRouter filters.
openrouter.openrouter_list_user_models Read read 0 List models filtered by the account preferences and guardrails.
openrouter.openrouter_list_model_endpoints Read read 0 List provider endpoints for a specific OpenRouter model.
openrouter.openrouter_list_providers Read read 0 List OpenRouter providers and availability metadata.
openrouter.openrouter_get_credits Read read 0 Get the account credit balance.
openrouter.openrouter_get_activity Read read 0 Get account activity with optional filters.
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_api_key Read read 0 Get one API key by hash.
openrouter.openrouter_create_api_key Write write 0 Create an API key with OpenRouter key limits and metadata.
openrouter.openrouter_update_api_key Write write 0 Update an OpenRouter API key by hash.
openrouter.openrouter_delete_api_key Write write 0 Delete an OpenRouter API key by hash.
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.
openrouter.openrouter_list_organization_members Read read 0 List OpenRouter organization members.
openrouter.openrouter_list_workspaces Read read 0 List OpenRouter workspaces.
openrouter.openrouter_get_workspace Read read 0 Get one OpenRouter workspace.
openrouter.openrouter_create_workspace Write write 0 Create an OpenRouter workspace.
openrouter.openrouter_update_workspace Write write 0 Update an OpenRouter workspace.
openrouter.openrouter_delete_workspace Write write 0 Delete an OpenRouter workspace.
openrouter.openrouter_list_guardrails Read read 0 List guardrails configured for the account.
openrouter.openrouter_list_video_models Read read 0 List models that support video generation.
openrouter.openrouter_create_video Write write 0 Submit a video generation request.
openrouter.openrouter_get_video Read read 0 Poll video generation job status.
openrouter.openrouter_api_get Read read 0 Call a safe relative OpenRouter GET path for newly released endpoints.
openrouter.openrouter_api_post Write write 0 Call a safe relative OpenRouter POST path for newly released endpoints.
openrouter.openrouter_api_patch Write write 0 Call a safe relative OpenRouter PATCH path for newly released endpoints.
openrouter.openrouter_api_delete Write write 0 Call a safe relative OpenRouter DELETE path for newly released endpoints.