lza6

Machinetranslation 2api — DevOps skill for Claude Code

DevOps community

原生 OpenAI API 格式转换、逆向并手动模拟 Socket.IO 通信协议、高级浏览器请求伪装 (User-Agent/Referer)、内置静态 API Key (无需 Cookie)、支持原生流式响应、Docker & Nginx 一键部署.

How to install Machinetranslation 2api

This entry records only its repository, not the path inside it, so there is no exact command to give. Open lza6/machinetranslation-2api and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Machinetranslation 2api does

原生 OpenAI API 格式转换、逆向并手动模拟 Socket.IO 通信协议、高级浏览器请求伪装 (User-Agent/Referer)、内置静态 API Key (无需 Cookie)、支持原生流式响应、Docker & Nginx 一键部署.

Alternatives in DevOps

  • MCP Boilerplate — A remote Cloudflare MCP server boilerplate with user authentication and Stripe for paid tools 1k ★
  • Chat — chat web app for teams, sass with user management and ratelimit, support chatgpt(openai & azure), claude, gemi 568 ★
  • Video Podcast Maker — AI-powered video podcast creation skill for coding agents 529 ★

README

🤖 machinetranslation-2api: 你的私人多引擎翻译中枢 🚀

[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)] ![Python Version](https://img.shields.io/badge/python-3.10+-green.svg)] [![Docker Support](https://img.shields.io/badge/docker-ready-blue.svg)] ![GitHub Repo](https://img.shields.io/badge/GitHub-lzA6/machinetranslation--2api-violet.svg)]

"我们不是在编写代码,我们是在构建桥梁。一座连接封闭与开放,连接已知与未知的桥梁。"

欢迎来到 `machinetranslation-2api` 的世界!这是一个创新的项目,它将强大的 [MachineTranslation.com](https://www.machinetranslation.com) 多引擎翻译服务,转化为一个完全兼容 OpenAI `v1/chat/completions` 格式的 API。

**这意味着什么?** 你可以使用熟悉的 OpenAI SDK、客户端或任何支持 OpenAI 格式的工具(如 [Cherry Studio](https://github.com/gngpp/cherry-studio)),来调用集成了 GPT、Gemini、Claude 等多种顶尖模型的超级翻译服务!


📜 目录


🌟 项目亮点与哲学

这个项目不仅是一个工具,更代表了一种开放互联的精神:

✨ 核心优势

  • 🌍 开放兼容: 将专有服务转化为开放标准(OpenAI API),赋予无限连接可能性
  • 🚀 无缝集成: 无需改变现有工作流,直接替换 API 端点即可升级体验
  • 🧠 智能聚合: 一次请求获取多个大模型翻译结果,附带详细评分报告
  • ⚡ 高性能: 基于 FastAPI 和异步 httpx,响应迅速
  • 🐳 简易部署: Docker 容器化,一键启动

⚠️ 注意事项

  • ❌ 上游依赖: 项目稳定性依赖于 machinetranslation.com 服务
  • 🔧 技术风险: 基于网络协议模拟,可能因上游更新而需要调整

📂 项目架构

📂 machinetranslation-2api/
├── 📄 .env                    # 环境配置文件
├── 📄 .env.example            # 配置模板
├── 📄 Dockerfile              # Docker 镜像构建文件
├── 📄 docker-compose.yml      # 容器编排配置
├── 📄 main.py                 # FastAPI 应用入口
├── 📄 nginx.conf              # Nginx 反向代理配置
├── 📄 requirements.txt        # Python 依赖清单
└── 📂 app/                    # 核心应用代码
    ├── 📂 core/               # 核心配置模块
    │   ├── 📄 __init__.py
    │   └── 📄 config.py       # 配置管理
    ├── 📂 providers/          # API 提供者
    │   ├── 📄 __init__.py
    │   ├── 📄 base_provider.py
    │   └── 📄 machinetranslation_provider.py  # 核心交互逻辑
    └── 📂 utils/              # 工具函数