Opencode2api — Development skill for Claude Code
OpenCode zen/go to OpenAI Codex/Anthropic Claude Code API proxy.
How to install Opencode2api
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open 6Kmfi6HP/opencode2api and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Opencode2api does
OpenCode zen/go to OpenAI Codex/Anthropic Claude Code API proxy.
Alternatives in Development
- Reverse API Engineer — Reverse engineer any website into a typed API client 1.9k ★
- Dario — A local OpenAI- and Anthropic-compatible proxy that brings your Claude Pro/Max subscription to Cursor, Cline 485 ★
- KiroGate — OpenAI & Anthropic 兼容的 Kiro IDE API 代理网关,支持 Claude Code CLI 393 ★
README
opencode2api
[English](README.md) · [简体中文](README.zh-CN.md)
`opencode2api` is a local-first HTTP proxy that forwards OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages–style requests to the OpenCode upstream. It adds model aliases, reasoning/thinking compatibility, SOCKS5 proxying, token usage accounting, and a lightweight admin panel — so any OpenAI/Anthropic-compatible client can talk to OpenCode without changes.
This project is not affiliated with OpenAI, Anthropic, or OpenCode. Respect the upstream terms of service and only run it in environments you are authorized to use.
Features
- OpenAI-compatible endpoints:
/v1/chat/completions,/v1/models - OpenAI Responses compatible endpoint:
/v1/responses - Anthropic Messages compatible endpoint:
/v1/messages - Streaming SSE conversion with token usage accounting
- Model aliases, reasoning-effort mapping, and force-disable-thinking
- Multi-tier auth routing: public / auto /
zen:/go:prefixes - SOCKS5 support: direct, fixed proxy, or round-robin
- Web admin panel: edit config, view stats, reload upstream sessions
- GitHub Actions: multi-platform release binaries (Linux / macOS / Windows / FreeBSD)
- GitHub Actions: multi-arch Docker image published to GHCR (
linux/amd64,linux/arm64) - Single Go dependency (
lumberjack); ships as one static binary
Project layout
cmd/opencode2api/ # executable entrypoint
internal/app/ # proxy core: handlers, protocol conversion, upstream calls, admin panel
internal/domain/ # protocol DTOs
internal/ids/ # response ID normalization
internal/random/ # random ID helpers
Build locally:
go build ./cmd/opencode2api
One-click install
macOS, Linux, FreeBSD:
curl -fsSL https://raw.githubusercontent.com/6Kmfi6HP/opencode2api/main/scripts/install.sh | bash
opencode2api launch claude
Windows PowerShell:
irm https://raw.githubusercon
Related Skills
Coding2API
把 CodeBuddy(国内站 + 国际版)、TRAE SOLO、OpenCode Zen、Kilo Gateway、Qoder、CodeArts、OfficeAce 八个上游渠道封装为 OpenAI / Respons
Openapis
Free Claude API + free OpenAI API in one unified proxy. Drop-in compatible with Anthropic SDK, OpenAI SDK, Cla
Agrout Bridge
Local HTTP proxy that routes OpenAI-/Anthropic-compatible clients (OpenCode, Claude Desktop, Cursor) through A
Antomix
Universal Claude Code Proxy Bidirectional Anthropic ↔ OpenAI API Bridge
Antigravity Reverseproxy API
A proxy server that exposes both Anthropic-compatible and OpenAI-compatible APIs backed by Antigravity's Cloud
Picc
a local proxy/router works with claude code and Pi coding agent and sets up a local router with both openai ap
Related Agents
AI Saglayici Uzmani
Anthropic Messages API ve OpenAI Codex App Server entegrasyonunun uzmanı — akış, araç döngüsü, hata/yeniden de
Session Error Analyzer
Analyzes specific AI IDE sessions (Claude Code, OpenAI Codex, OpenCode) for LLM behavior errors and returns a
LLM Orchestrator
Use this agent for LLM integration work — prompt engineering, multi-provider abstraction (OpenRouter, Gemini,