[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-108679":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":10,"pushedAt":37,"updatedAt":38,"readmeContent":39,"aiSummary":40,"trendingCount":15,"starSnapshotCount":15,"syncStatus":41,"lastSyncTime":42,"discoverSource":43},108679,"omni2api","Juwan-Hwang\u002Fomni2api","Juwan-Hwang","Anything to API (万物皆可2API): put an AI agent, a script, or even yourself behind an OpenAI-compatible API","juwanh.com\u002Flab\u002Fomni2api",null,"Rust",56,13,51,0,3,5,45.44,"MIT License",false,"main",true,[24,25,26,27,28,29,30,31,32,33,34,35,36],"ai-agents","ai-tools","anthropic","api","automation","cli","developer-tools","llm","openai-api","reverse-proxy","rust","self-hosted","terminal","2026-11-03 14:51:46","2026-11-19 11:12:36","\u003Cp align=\"center\">\n  \u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"assets\u002Flogo\u002Fomni2api-horizontal-colour-reversed.svg\">\n    \u003Cimg alt=\"omni2api\" src=\"assets\u002Flogo\u002Fomni2api-horizontal-animated.svg\" width=\"540\">\n  \u003C\u002Fpicture>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\u003Cstrong>Anything to API.\u003C\u002Fstrong>\u003C\u002Fp>\n\n\u003Cp align=\"center\">\nTurn anything that can sit at a terminal into an OpenAI-compatible API\u003Cbr>\nthat any AI tool can call.\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\nEnglish · \u003Ca href=\"README.zh-CN.md\">简体中文\u003C\u002Fa>\n\u003C\u002Fp>\n\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Ffc7f4aec-02d1-4533-bd20-d441b5e993a9\n\n\n## The idea\n\nMost proxies convert one API into another. omni2api converts *anything*\ninto an API.\n\nStart the server and it holds a **seat** where a model would normally be.\nWhatever sits in that seat — an AI agent working at a terminal — receives\nevery request and answers it, with full tool calls. Callers never see the\ndifference: they get a base URL, an API key and a model name, like any\nother endpoint.\n\n## Use it in one sentence\n\nTell any agent with a local sandbox:\n\n> Deploy https:\u002F\u002Fgithub.com\u002FJuwan-Hwang\u002Fomni2api for me.\n\nIt follows [SETUP.md](SETUP.md), starts the server, hands you the base URL\n(local and a public `https:\u002F\u002F…` one), the API key and the model name — then\nsits in the seat and answers requests itself. No server, database or\naccount needed.\n\n> **Want a human in the seat instead?** That is\n> **[OpenHuman](https:\u002F\u002Fgithub.com\u002FJuwan-Hwang\u002Fopenhuman)** — the same idea\n> with a panel built for people. omni2api is the version for AI.\n\n## How it works\n\n```\nCaller agent (any AI CLI \u002F IDE \u002F desktop app)\n      │  OpenAI Chat Completions · Responses · Anthropic Messages (HTTP\u002FSSE)\n      ▼\nomni2api server (Rust + Axum)\n      │  \u002Fv1\u002Fseat\u002F*  (long-poll event stream)\n      ▼\nAnything in the seat running `oh-seat` (an agent or a script)\n      ├─ oh-seat next              read the next message\n      ├─ oh-seat tool Bash cmd=…   the caller runs the tool, result comes back\n      └─ oh-seat reply \"…\"         the answer streams to the caller\n```\n\nWhat the server does for whoever sits in the seat:\n\n- **Strips the harness.** System prompts, tool schemas and memory reminders\n  are peeled off; the seat sees what the caller's user typed, plus a\n  one-line caller environment (cwd, platform, shell) when the caller sends\n  it.\n- **Real tool calls.** `oh-seat tool` becomes a genuine `tool_calls` entry\n  in the caller's response, so the caller's own client executes it in the\n  caller's own sandbox, and the result is routed back to the waiting\n  command. Exit codes are recognised across callers.\n- **Many callers at once.** Every conversation is isolated; parallel tool\n  calls, aux requests (titles, suggestions) and multi-turn resumes work.\n- **Images and files** from callers and from tool results (OpenAI `file` \u002F\n  `input_file`, Anthropic `document`, a PDF from Claude Code's Read, any\n  binary) are saved locally for the seat. Standard `\u002Fv1\u002Ffiles` uploads and\n  `file_id` references work too.\n- **More than chat.** Other OpenAI endpoints reach the seat as one-off\n  tasks with a one-line contract (`API images.generations: 1 png image(s),\n  size 1024x1024 ...`); the seat answers with files (`oh-seat reply -a\n  out.png`) or text, and the caller gets the standard response:\n  `\u002Fv1\u002Fimages\u002Fgenerations`, `\u002Fedits`, `\u002Fvariations` (`b64_json`, `url`, `n`,\n  streaming); `\u002Fv1\u002Faudio\u002Fspeech` (raw audio or SSE), `\u002Ftranscriptions` and\n  `\u002Ftranslations` (json, text, srt, vtt, verbose_json, diarized_json,\n  streaming); `\u002Fv1\u002Fvideos` (queued job, the seat attaches an mp4 and\n  optionally a thumbnail; content, remix, list, delete); `\u002Fv1\u002Fembeddings` (the seat sends vectors, checked before they\n  reach the caller; `dimensions`, float or base64); `\u002Fv1\u002Fmoderations`\n  (text and image inputs, the seat names the categories); legacy\n  `\u002Fv1\u002Fcompletions` (suffix fill-in, `n`, `echo`, `stop`, streaming).\n- **Realtime.** `\u002Fv1\u002Frealtime` over WebSocket (header key, or\n  `client_secrets` ephemeral keys as the browser subprotocol): text or\n  voice turns, tools, server VAD turn taking, cancel. Each response is one\n  turn of a conversation the seat sits in; input audio arrives as WAV, and\n  for voice the seat attaches its spoken answer with the transcript as text.\n- **Stored objects.** Responses are kept (`store`, default on):\n  `previous_response_id`, `background` with polling and cancel, retrieve,\n  delete, `input_items`, `input_tokens`, `compact` (the seat writes the\n  summary; the compaction item stands in for the history afterwards). Chat completions with\n  `store: true` can be listed, retrieved, re-tagged, deleted, and their\n  messages read. The Conversations API (`conv_` ids, items, `conversation`\n  on Responses) shares `\u002Fv1\u002Fconversations` with this server's own history\n  (`cnv_` ids, responder key). `\u002Fv1\u002Fuploads` (parts into a file) and\n  `\u002Fv1\u002Fbatches` (each JSONL line runs through the endpoint it names, four\n  at a time; output and error files, cancel). `\u002Fv1\u002Fvector_stores` with\n  files, file batches and content; search is a seat task (the store's files\n  attached, ranked passages back, checked). `\u002Fv1\u002Fcontainers` and their\n  files. In memory, per key.\n- **Assistants API.** Assistants, threads, messages, runs (poll or\n  stream, function tools with `submit_tool_outputs`, steps, cancel,\n  create-and-run). A thread is one conversation of the seat's.\n- **Fine-tuning, evals, graders.** A fine-tuning job hands the training\n  file to the seat and succeeds with an `ft:` model (events, checkpoints,\n  listed in `\u002Fv1\u002Fmodels`, deletable). Evals sample each row through the\n  seat and grade it: `string_check` and `text_similarity` here, model and\n  python graders answered by the seat; `\u002Fv1\u002Ffine_tuning\u002Falpha\u002Fgraders` run\n  and validate.\n\n- **Libraries.** Custom voices and voice consents (used by\n  `\u002Fv1\u002Faudio\u002Fspeech`), skills with versions and content, video characters.\n- **Realtime extras.** Input audio transcription in realtime sessions,\n  `\u002Fv1\u002Frealtime\u002Ftranscription_sessions` and translation sessions over\n  WebSocket with their client secrets.\n- **Agents API (beta).** Agents, sessions with an event stream (SSE),\n  turns and items, function tools answered with `tool_result` events,\n  cancel; environments with files, templates, vaults and credentials (never\n  echoed back), automations (cron or once) with invocations, pause and\n  resume. A session is one conversation of the seat's.\n- **ChatKit.** `\u002Fv1\u002Fchatkit\u002Fsessions` and threads, plus the ChatKit server\n  protocol at `POST \u002Fv1\u002Fchatkit` (create, add message, retry, list, update,\n  delete, feedback), streamed the way ChatKit clients expect.\n- **Webhooks.** `\u002Fv1\u002Fwebhook_endpoints` (rotate secret, test) and\n  `\u002Fv1\u002Fwebhook_event_types`; status changes of jobs (videos, batches,\n  responses, fine-tuning, evals) are delivered signed per Standard Webhooks,\n  so the SDKs' `webhooks.unwrap` verifies them, with retries.\n- **Decisions and provenance.** `\u002Fv1\u002Fdecisions` (the seat answers each\n  question; probabilities checked) and `\u002Fv1\u002Fcontent_provenance_checks`\n  (C2PA manifest check, and files the seat made are recognized).\n- **Not offered (501).** Organization and admin, projects, safety,\n  `\u002Fv1\u002Flive`, and SIP\u002FWebRTC realtime calls: they need an OpenAI account\n  behind them, so they answer `501` with an OpenAI-style error rather than\n  pretending.\n\n## Quick start\n\nBy hand it is three commands:\n\n```bash\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002FJuwan-Hwang\u002Fomni2api\u002Fmain\u002Finstall.sh | sh\n# Windows: irm https:\u002F\u002Fraw.githubusercontent.com\u002FJuwan-Hwang\u002Fomni2api\u002Fmain\u002Finstall.ps1 | iex\n\nomni2api up -d     # prints base_url (local + public), api_key, model\noh-seat next       # sit in the seat and wait for a request\n```\n\nPoint any OpenAI-compatible tool at it:\n\n| Setting | Value |\n|---|---|\n| Base URL | the `base_url` printed by `omni2api up` |\n| API Key | the `api_key` printed by `omni2api up` |\n| Model | the name printed by `omni2api up` — the seat's own name; `omni2api` until it chooses one |\n\n```bash\ncurl -N \"$BASE_URL\u002Fchat\u002Fcompletions\" \\\n  -H \"Authorization: Bearer $API_KEY\" -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"model\":\"omni2api\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"stream\":true}'\n```\n\nThe request holds open until the seat replies.\n\n## Who can call, who can sit\n\n**Callers** — anything that speaks OpenAI Chat Completions \u002F Responses or\nAnthropic Messages. Tested end to end with Claude Code, Codex, OpenCode,\nPi, Reasonix, Cline, GitHub Copilot CLI (BYOK), Grok CLI, ZCode, WorkBuddy,\nTrae, Qoder and DeepSeek Harness. Known caller-side limits: OpenCode shell\nresults carry no exit code; Copilot BYOK does not forward images; Cursor\nCLI has no custom endpoint.\n\n**The seat** — any agent that can run `oh-seat` and follow its loop,\nincluding a local, non-cloud AI: a local agent can be turned into an API\nthe same way, to be used locally or from anywhere. The seat also chooses\nthe model name callers see (`oh-seat name …`), unless the user pins one\nwith `omni2api up --model …`.\n\n## Good to know\n\n- **Replies arrive at the seat's pace.** The seated agent reads, thinks and\n  answers turn by turn, so a reply takes as long as the agent takes. This\n  is a seat, not a model farm.\n- Give callers the largest context window they offer and turn off automatic\n  compaction: the seat keeps the whole conversation.\n\n## Deployment options\n\n- **Out of the box:** a free quick tunnel gives the server a public URL in\n  seconds. The address rotates when the tunnel reopens.\n- **A fixed address:** a named Cloudflare tunnel on your own domain\n  (`OMNI2API_TUNNEL_TOKEN` + `OMNI2API_PUBLIC_URL`), which also sidesteps\n  networks that filter the free tunnel domains — or `omni2api serve` on a\n  server of your own (see `deploy\u002F`: Docker Compose, Kubernetes, nginx, an\n  Anthropic bridge; PostgreSQL for long-lived installs).\n- The full agent-facing deployment guide is [SETUP.md](SETUP.md).\n\n## Repository layout\n\n```\nomni2api\u002F\n├── server\u002F      # Rust + Axum server (`omni2api` binary): OpenAI\u002FAnthropic ingress, seat API\n├── cli\u002F         # oh-seat, the responder CLI (single static Rust binary)\n├── protocol\u002F    # Wire protocol and internal model\n├── tools\u002Fseat\u002F  # Seat helpers and examples\n├── deploy\u002F      # Docker Compose, K8s, nginx, Anthropic bridge\n├── assets\u002Flogo\u002F # The o_ identity (SVG set, PNG masters, usage notes)\n└── docs\u002F        # Architecture, quickstart, seat CLI, protocol\n```\n\n## Docs\n\n- [SETUP.md](SETUP.md) — deployment recipe for agents\n- `docs\u002Fseat-cli.md` — the oh-seat reference\n- [`docs\u002Fstatus-json.md`](docs\u002Fstatus-json.md) — the stable `--json` status contract, for embedding omni2api\n- [`docs\u002Fmcp.md`](docs\u002Fmcp.md) — sit in the seat over MCP (`oh-seat mcp`): registration for 8 tested hosts\n- `docs\u002FDEVELOPMENT.md` — building and testing\n- [`docs\u002Fserver-env.md`](docs\u002Fserver-env.md) — server environment settings: public address and bounds\n- [`docs\u002Fopenai-differences.md`](docs\u002Fopenai-differences.md) — where the API departs from OpenAI on purpose\n- `docs\u002Fprotocol.md`, `protocol\u002F` — the wire specification\n\n## Issues\n\nFiled by agents, for agents: this tracker only accepts reports from AI\nagents who hit a problem while using omni2api and reproduced it (the form\nasks you to attest to exactly that). Humans — tell your AI what went\nwrong and have it file; its report is the one that can be acted on.\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","omni2api 是一个轻量级 Rust 实现的反向代理服务，可将任意终端可执行程序（如 AI 代理、Shell 脚本或人工操作界面）封装为兼容 OpenAI 和 Anthropic 的标准 API 接口。其核心功能包括：支持 Chat Completions \u002F Messages 协议、真实工具调用（tool_calls）、多会话隔离、文件\u002F图像透传与本地存储、自动剥离系统提示与上下文冗余。项目无需数据库或用户账户，开箱即用，适用于本地 AI 工具集成、私有化 AI 服务部署、自动化工作流编排及人机协同调试等场景。",2,"2026-11-24 04:34:58","CREATED_QUERY"]