{
  "openapi": "3.1.0",
  "info": {
    "title": "Mimxo AI API",
    "version": "1.0.0",
    "description": "OpenAI-compatible API for 50 AI models. Docs: https://mimxo.com/docs",
    "contact": {
      "email": "support@mimxo.com",
      "url": "https://mimxo.com"
    }
  },
  "servers": [
    {
      "url": "https://mimxo.com/v1"
    }
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Mimxo AI API key (sk-...)"
      }
    }
  },
  "paths": {
    "/chat/completions": {
      "post": {
        "operationId": "createChatCompletion",
        "summary": "Create a chat completion (OpenAI-compatible; supports stream and tools)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "model",
                  "messages"
                ],
                "properties": {
                  "model": {
                    "type": "string",
                    "enum": [
                      "qwen3.6-flash",
                      "qwen3.6-plus",
                      "qwen3.7-flash",
                      "qwen3.7-max",
                      "qwen3.7-plus",
                      "qwen3.8-27b",
                      "qwen3.8-max-0902",
                      "claude-fable-5",
                      "claude-opus-5",
                      "claude-sonnet-5",
                      "deepseek-v4-flash",
                      "deepseek-v4-flash-0731",
                      "deepseek-v4-pro",
                      "deepseek-v4-pro-0813",
                      "deepseek-v4.1-flash",
                      "gemini-2.5-flash",
                      "gemini-2.5-flash-lite",
                      "gemini-3-flash-preview",
                      "gemini-3.1-flash-lite",
                      "gemini-3.1-pro-preview",
                      "gemini-3.6-flash",
                      "gemini-3.7-flash",
                      "gemini-3.8-flash",
                      "minimax-m2.5",
                      "minimax-m3",
                      "kimi-k2.5",
                      "kimi-k2.6",
                      "kimi-k2.7-code",
                      "kimi-k3",
                      "gpt-5.5",
                      "gpt-5.6-luna",
                      "gpt-5.6-sol",
                      "gpt-5.6-terra",
                      "gpt-6-astra",
                      "gpt-6-luna",
                      "gpt-6-sol",
                      "gpt-6.1-sol",
                      "step-3.7-flash",
                      "grok-4.5",
                      "grok-4.6",
                      "grok-4.7",
                      "mimo-v2.5",
                      "mimo-v2.5-pro",
                      "mimo-v2.6-flash",
                      "glm-5",
                      "glm-5.1",
                      "glm-5.2",
                      "glm-5.3",
                      "glm-5.3-flash",
                      "glm-5.3-prime"
                    ]
                  },
                  "messages": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "role",
                        "content"
                      ],
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "system",
                            "user",
                            "assistant",
                            "tool"
                          ]
                        },
                        "content": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "object"
                              }
                            }
                          ]
                        }
                      }
                    }
                  },
                  "stream": {
                    "type": "boolean"
                  },
                  "tools": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  },
                  "temperature": {
                    "type": "number"
                  },
                  "max_tokens": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Chat completion or SSE stream"
          }
        }
      }
    },
    "/responses": {
      "post": {
        "operationId": "createResponse",
        "summary": "OpenAI Responses API",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "model",
                  "input"
                ],
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "input": {},
                  "stream": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response object"
          }
        }
      }
    },
    "/messages": {
      "post": {
        "operationId": "createMessage",
        "summary": "Anthropic Messages API (use base URL https://mimxo.com with Claude Code)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "model",
                  "max_tokens",
                  "messages"
                ],
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "max_tokens": {
                    "type": "integer"
                  },
                  "messages": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "role",
                        "content"
                      ],
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "system",
                            "user",
                            "assistant",
                            "tool"
                          ]
                        },
                        "content": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "object"
                              }
                            }
                          ]
                        }
                      }
                    }
                  },
                  "stream": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Message"
          }
        }
      }
    },
    "/models": {
      "get": {
        "operationId": "listModels",
        "summary": "List models available to this key",
        "responses": {
          "200": {
            "description": "Model list"
          }
        }
      }
    }
  }
}