AI 多模型 API 聚合与协议转换网关:统一调用并互转 OpenAI Chat/Responses、Claude、Gemini 等格式,Provider 仅需实现原生协议。Multi-LLM gateway & protocol transformer: unify and convert OpenAI Chat/Responses, Claude, Gemini, etc.; providers implement native only.
git clone https://github.com/nightwhite/any-api.gitAny API Gateway is a Cloudflare Workers-based solution that acts as a protocol conversion layer between multiple LLM APIs. It allows developers to configure a single backend provider setup while exposing four different frontend protocol endpoints: OpenAI Chat Completions, OpenAI Responses, Claude Messages, and Google Gemini. The gateway automatically converts requests and responses between these formats, eliminating the need to rewrite code when switching between different LLM providers. This is particularly useful for AI developers and teams who work with multiple LLM services or need to migrate between them without refactoring client code.
Install dependencies and configure ANY_API_CONFIG JSON with your upstream providers (e.g., OpenAI Responses, Gemini, Claude). Set WORKER_AUTH_KEY for inbound authentication. Use unified model naming format (provider-id.model-name) across all four protocol endpoints. Deploy to Cloudflare Workers and authenticate requests with Bearer token or x-api-key header.
Route AI requests to different LLM providers without changing client code
Migrate from one LLM API to another with transparent format conversion
Centralize authentication and rate limiting for multiple downstream LLM services
Support multiple frontend protocols to serve diverse client requirements
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/nightwhite/any-apiCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Convert the following response from Claude format to OpenAI Chat format: [CLAUDE_RESPONSE]. Ensure the conversion maintains all relevant metadata and content structure. The output should be ready for integration with an OpenAI-compatible frontend.
```json
{
"model": "openai-chat",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "The converted response from the original Claude format. This maintains all the semantic meaning and context while adapting to the OpenAI Chat format structure. The conversion process ensures compatibility with systems expecting OpenAI-style responses."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 45,
"completion_tokens": 32,
"total_tokens": 77
}
}
```Google's multimodal AI model and assistant
AI assistant built for thoughtful, nuanced conversation
Pioneering accessible, high-performance AI models
Get more done every day with Microsoft Teams – powered by AI
Agentic AI Workflow platform
Connected workspace for docs, wikis, and projects
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan