VX Agents

OpenAPI Marketplace

openrouter-ai-core-openapi

v1.0.0 · 3 endpoints · 0 connections · shared by Lân Nguyễn Trịnh

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.

MethodPathOperationDescription
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

  1. Create or sign in to an account at OpenRouter.
  2. Open the Keys page and create an API key.
  3. 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:

  1. Use GET /models to discover available model IDs, context limits, pricing, and supported parameters.
  2. Select a model that supports the required capability, such as vision, tools, structured outputs, or a sufficient context window.
  3. Use POST /chat/completions with the selected model and a messages array.
  4. Use response_format for structured JSON only when the selected model supports it.
  5. Use tools or plugins only when the user explicitly requests those capabilities and the model supports them.
  6. 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

  1. Create a free VX Agents account (sandbox tools included).
  2. Open the marketplace and connect “openrouter-ai-core-openapi” to an agent.
  3. Expose it as an MCP server for Claude/ChatGPT, or chat with it directly.

Related APIs