Repolode
jasonxu114514

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.

スター
1,099
フォーク
192
未解決の Issue
25
最終コミット
13 時間前

これは何?

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.

主な機能

  • 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.

ユースケース

  • 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.

トピック

よくある質問

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 は無料で使えますか?ライセンスは?
opencode2api は GPL-3.0 ライセンスのオープンソースです。商用製品で使う前にライセンス条件を確認してください。
opencode2api は今もメンテナンスされていますか?
活発にメンテナンス中。opencode2api の最終コミットは 2026年10月19日 です。
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.
opencode2api はどこで入手できますか?
ソースコードとインストール手順は GitHub にあります:https://github.com/jasonxu114514/opencode2api

概要はプロジェクトの README をもとに AI が生成しています。GitHub の数値は毎日更新されます。

関連プロジェクト