A local gateway and menu bar app that lets Claude Code, Codex, Gemini CLI and other coding agents use any model from any provider or subscription.
jasonxu114514/opencode2api
A Go gateway that exposes OpenCode Zen and Zen Go models through Chat Completions, Responses and Anthropic Messages APIs, with key and proxy pooling and a WebUI.
- Estrellas
- 1,099
- Forks
- 192
- Issues abiertos
- 25
- Último commit
- hace 13 horas
¿Qué es?
opencode2api is a self-hosted gateway for OpenCode Zen and Zen Go. It accepts requests in Chat Completions, Responses, or Anthropic Messages format and translates them into each upstream's native protocol, so clients built for one API style can reach models served under another. The project ships as a single Go binary with the WebUI embedded, and needs no Node.js runtime or database.
Upstream Zen and Go keys are managed in separate pools, with configurable tier preference, retries, session affinity, and direct, HTTP, HTTPS, SOCKS5, or SOCKS5H proxy routing. Model discovery refreshes from OpenCode's catalog, and a separate management port offers configuration editing, a Playground, diagnostics, token statistics, live logs, and a Go subscription quota dashboard.
The gateway supports text, images, reasoning, function tools, and tool results where the target protocol can represent them. It does not implement embeddings, file uploads, image generation, or conversation storage.
Funciones clave
- 01Converts between Chat Completions, Responses and Anthropic Messages protocols, with JSON and SSE output.
- 02Separate Zen and Go key pools with tier preference, retries and session affinity.
- 03Routes through direct, HTTP, HTTPS, SOCKS5 or SOCKS5H proxies, including proxy files.
- 04Includes a WebUI on a separate port for configuration, Playground, diagnostics and live logs.
- 05Hot-reloads configuration, validating changes before new requests use them.
- 06Creates and manages local API keys for clients.
Casos de uso
- Pointing an OpenAI- or Anthropic-compatible coding tool at OpenCode Zen or Zen Go models.
- Sharing a pool of upstream keys and proxies across several local clients.
- Monitoring token usage and Go subscription quota from a single dashboard.
Temas
Preguntas frecuentes
- ¿Qué es opencode2api?
- A Go gateway that exposes OpenCode Zen and Zen Go models through Chat Completions, Responses and Anthropic Messages APIs, with key and proxy pooling and a WebUI. opencode2api is a self-hosted gateway for OpenCode Zen and Zen Go. It accepts requests in Chat Completions, Responses, or Anthropic Messages format and translates them into each upstream's native protocol, so clients built for one API style can reach models served under another. The project ships as a single Go binary with the WebUI embedded, and needs no Node.js runtime or database.
- ¿opencode2api es gratuito? ¿Qué licencia tiene?
- opencode2api es open source bajo la licencia GPL-3.0. Revisa los términos de la licencia antes de usarlo en productos comerciales.
- ¿opencode2api sigue mantenido?
- Mantenimiento activo. El último commit de opencode2api fue el 19 oct 2026.
- ¿Para qué puedo usar opencode2api?
- Pointing an OpenAI- or Anthropic-compatible coding tool at OpenCode Zen or Zen Go models. Sharing a pool of upstream keys and proxies across several local clients. Monitoring token usage and Go subscription quota from a single dashboard.
- ¿Dónde consigo opencode2api?
- El código fuente y las instrucciones de instalación están en GitHub: https://github.com/jasonxu114514/opencode2api
Resumen generado por IA a partir del README del proyecto. Las estadísticas de GitHub se actualizan a diario.
Proyectos relacionados
Self-hosted, OpenAI-compatible LLM gateway that routes one endpoint to 40+ providers with virtual keys, budgets, and usage tracking.
Gateway de IA autohospedable con licencia MIT que ofrece un endpoint compatible con OpenAI para cientos de proveedores de modelos, con fallback automático según las cuotas y compresión de tokens.
A local model gateway that lets Claude Code, Codex, OpenCode and other coding agents share one endpoint and route requests across multiple model providers.
Open-source AI gateway giving one OpenAI-compatible API across 23+ LLM providers, with failover, load balancing, semantic caching and virtual keys.
A Go command-line tool and web UI for downloading models and datasets from the HuggingFace Hub with parallel connections and resume support.