openrouter-ai-core-openapi
OpenAI-compatible AI gateway for discovering models, generating responses, using tools, and retrieving generation usage. The user supplies an OpenRouter API key at connection time; no credential is included. Official documentation: https://openrouter.ai/docs/api_reference/overview
Connect this API to an AI agent Browse all specs
What you can do with openrouter-ai-core-openapi via MCP
Every endpoint below becomes a governed tool your AI agent (Claude, ChatGPT, or a customer-facing VX agent) can call — with scoped permissions, sandbox testing, and audit logs.
| Method | Path | Operation | Description |
|---|---|---|---|
| GET | /models |
listOpenRouterModels | List available models |
| POST | /chat/completions |
createOpenRouterChatCompletion | Generate an AI response |
| GET | /generation |
getOpenRouterGenerationStats | Get generation usage statistics |
Authentication
bearerAuth
Bearer token — sent as Authorization: Bearer <token>
Provide the OpenRouter API key through the secure connection configuration.
Usage guide
Getting credentials
- Create or sign in to an account at OpenRouter.
- Open the Keys page and create an API key.
- When VX Agent asks for authentication, provide the key using Bearer authentication.
Keep the API key private. Do not paste it into the Swagger file, marketplace description, prompts, or chat messages.
How to use this API
Use this API to access multiple AI models through one OpenAI-compatible endpoint. It can generate text, process supported images, produce structured JSON, use tools, and report token usage and cost.
A typical workflow is:
- Use
GET /modelsto discover available model IDs, context limits, pricing, and supported parameters. - Select a model that supports the required capability, such as vision, tools, structured outputs, or a sufficient context window.
- Use
POST /chat/completionswith the selectedmodeland amessagesarray. - Use
response_formatfor structured JSON only when the selected model supports it. - Use
toolsorpluginsonly when the user explicitly requests those capabilities and the model supports them. - Use
GET /generation?id={generation_id}to inspect usage and cost after a completed generation.
Confirm the selected model, expected cost, and handling of private data before running paid or sensitive requests. Do not assume that all models support the same parameters, tools, modalities, or output formats.
Safety and usage notes
Treat model output as generated content that may be inaccurate or unsafe. Verify important information before using it for business, legal, medical, financial, or operational decisions. Do not expose API keys or confidential prompts and files.
Official documentation: OpenRouter API Reference.
How to use this spec
- Create a free VX Agents account (sandbox tools included).
- Open the marketplace and connect “openrouter-ai-core-openapi” to an agent.
- Expose it as an MCP server for Claude/ChatGPT, or chat with it directly.