any-api
Verified Safeby gloria112
Overview
An API gateway for integrating and normalizing requests across multiple AI models like OpenAI Chat, Claude, and Gemini, abstracting away their individual protocols and enabling flexible model routing.
Installation
npx wrangler devEnvironment Variables
- WORKER_AUTH_KEY
- WORKER_AUTH_KEYS
- ANY_API_CONFIG
- ANY_API_DEBUG
- OPENAI_BASE_URL
- OPENAI_API_KEY
- CLAUDE_BASE_URL
- CLAUDE_API_KEY
- GEMINI_BASE_URL
- GEMINI_API_KEY
- CLAUDE_DEFAULT_MODEL
- CLAUDE_MESSAGES_PATH
- CLAUDE_MAX_TOKENS
- GEMINI_DEFAULT_MODEL
- RESP_RESPONSES_PATH
- RESP_NO_INSTRUCTIONS_URLS
- RESP_NO_PREVIOUS_RESPONSE_ID_URLS
- RESP_REASONING_EFFORT
- RESP_MAX_INSTRUCTIONS_CHARS
- OPENAI_CHAT_COMPLETIONS_PATH
Security Notes
The server correctly leverages environment variables (Cloudflare Worker's Env) for all API keys and sensitive configuration, preventing hardcoded secrets. Sensitive values are masked in debug logs. Input validation, URL sanitization, and robust CORS handling are implemented. No usage of 'eval' or suspicious dynamic code execution patterns were found. Session-specific caching for `previous_response_id` and `thought_signature` uses hashed session keys and Cloudflare's built-in `caches.default`, which is appropriate for ephemeral worker environments, minimizing direct exposure of sensitive conversation data.
Similar Servers
mcp-context-forge
Converts web content (HTML, PDF, DOCX, etc.) and local files from a URL into high-quality Markdown format. It supports multiple conversion engines, content optimization, batch processing, and image handling.
bifrost
A high-performance AI gateway with a unified interface for multiple LLM providers, offering real-time monitoring and configuration.
lunar
The Lunar MCP Server acts as an HTTP proxy, designed to intercept, analyze, and manage API traffic within a Python environment, applying policies for caching, throttling, queueing, and collecting data for observability.
mcp-rubber-duck
An MCP (Model Context Protocol) server that acts as a bridge to query multiple OpenAI-compatible LLMs, enabling multi-agent AI workflows and providing an AI 'rubber duck' debugging panel.