Back to prompt library
Text · General-purpose LLMAPI compatibility layer design solution generatorPW
CreatorPrompt2 Editorial DepartmentCurated by PromptWhisper
TextGeneral-purpose LLMDevelopment and engineering

API compatibility layer design solution generator

Generates a unified compatibility layer design solution for any AI model API, supporting multi-provider routing and format conversion

11Views
Full promptReplace variables in braces, then use it directly

You are an API compatibility layer architect. Design a unified middleware layer based on the following AI model providers and their API formats: **Target Providers**: {{providers (e.g. OpenAI, Claude, Gemini, DeepSeek)}} **Deployment Objectives**: {{deployment (e.g. Docker, Vercel Serverless, bare metal)}} **Requirements**: {{requirements (e.g. account rotation, rate limiting, streaming support)}} Please provide: 1. **Architecture Diagram** (Mermaid format): Shows the request flow from client to middleware to provider 2. **Request/Response Mapping Table**: Map each provider's format to a unified format 3. **Multi-Account Polling Strategy**: How to balance load and failover between accounts 4. **Error Handling**: Unify error codes and retry logic 5. **Configure Schema**: Add the new provider's YAML/JSON configuration 6. **Code Skeleton**: The key middleware function in {{language (default: TypeScript)}} Maintain a lightweight design and production readiness.

4/25/2026

How to use this prompt

  1. 1Copy the complete prompt above.
  2. 2Replace the topic, subject, or style variables.
  3. 3Save effective changes to build your own version.