Docs

Base URLs, endpoints, and agent plugins for connecting to ClosedRouter.

Endpoints
Base URLs
Point any OpenAI-, Anthropic-, or MCP-compatible client at ClosedRouter. Both hosts route to the same services; the Cloudflare tunnel variant is useful when the primary ingress is unreachable.
API base URLOpenAI-compatible REST surface for chat, responses, and models.
https://router.queef.in/v1
Cloudflare tunnelhttps://router-cf.queef.in/v1
MCP URLStateless MCP server (JSON-RPC 2.0 over Streamable HTTP).
https://router.queef.in/mcp
Cloudflare tunnelhttps://router-cf.queef.in/mcp
Authentication

Authenticate every request with a ClosedRouter API key (issued on the Keys page) using either header:

Authorization: Bearer cr_…
x-api-key: cr_…
Available API endpoints
  • POST/v1/chat/completionsOpenAI chat
  • POST/v1/messagesAnthropic messages
  • POST/v1/responsesOpenAI responses
  • GET/v1/modelsList models

Agent plugins

Pre-built integrations that handle auth and model discovery for you.

OpenCode

Provider plugin

Drop-in provider for OpenCode. Registers the closedrouter provider, discovers models from /v1/models, and injects auth on every request.

Downloads asopencode-plugin-closedrouter.js

Bundled JS — load it from your opencode plugin config.

Download plugin JS

pi coding agent

Extension

Multi-file TS extension for the pi coding agent. Registers the provider, auto-selects the last-used model, and preserves reasoning across replays.

Downloads aspi-closedrouter.zip

ZIP of src/ + package.json — extract and run `pi install ./pi-closedrouter`.

Download extension (.zip)