diff --git a/README.md b/README.md index 4a7bde8e..4f2d4c51 100644 --- a/README.md +++ b/README.md @@ -8,27 +8,31 @@ [![Redis](https://img.shields.io/badge/Redis-7+-DC382D.svg)](https://redis.io/) [![Docker](https://img.shields.io/badge/Docker-Ready-2496ED.svg)](https://www.docker.com/) +Wei-Shaw%2Fsub2api | Trendshift + **AI API Gateway Platform for Subscription Quota Distribution** English | [中文](README_CN.md) +> **Sub2API officially uses only the domains `sub2api.org` and `pincc.ai`. Other websites using the Sub2API name may be third-party deployments or services and are not affiliated with this project. Please verify and exercise your own judgment.** + --- ## Demo -Try Sub2API online: **https://demo.sub2api.org/** +Try Sub2API online: **[https://demo.sub2api.org/](https://demo.sub2api.org/)** Demo credentials (shared demo environment; **not** created automatically for self-hosted installs): | Email | Password | |-------|----------| -| admin@sub2api.com | admin123 | +| admin@sub2api.org | admin123 | ## Overview -Sub2API is an AI API gateway platform designed to distribute and manage API quotas from AI product subscriptions (like Claude Code $200/month). Users can access upstream AI services through platform-generated API Keys, while the platform handles authentication, billing, load balancing, and request forwarding. +Sub2API is an AI API gateway platform designed to distribute and manage API quotas from AI product subscriptions. Users can access upstream AI services through platform-generated API Keys, while the platform handles authentication, billing, load balancing, and request forwarding. ## Features @@ -41,6 +45,15 @@ Sub2API is an AI API gateway platform designed to distribute and manage API quot - **Admin Dashboard** - Web interface for monitoring and management - **External System Integration** - Embed external systems (e.g. payment, ticketing) via iframe to extend the admin dashboard +## Don't Want to Self-Host? + + + + + + +
pinccPinCC is the official relay service built on Sub2API, offering stable access to Claude Code, Codex, Gemini and other popular models — ready to use, no deployment or maintenance required.
+ ## Ecosystem Community projects that extend or integrate with Sub2API: @@ -61,10 +74,15 @@ Community projects that extend or integrate with Sub2API: --- -## Documentation +## Nginx Reverse Proxy Note -- Dependency Security: `docs/dependency-security.md` -- Admin Payment Integration API: `docs/ADMIN_PAYMENT_INTEGRATION_API.md` +When using Nginx as a reverse proxy for Sub2API (or CRS) with Codex CLI, add the following to the `http` block in your Nginx configuration: + +```nginx +underscores_in_headers on; +``` + +Nginx drops headers containing underscores by default (e.g. `session_id`), which breaks sticky session routing in multi-account setups. --- diff --git a/README_CN.md b/README_CN.md index eee89b07..849f3840 100644 --- a/README_CN.md +++ b/README_CN.md @@ -8,27 +8,30 @@ [![Redis](https://img.shields.io/badge/Redis-7+-DC382D.svg)](https://redis.io/) [![Docker](https://img.shields.io/badge/Docker-Ready-2496ED.svg)](https://www.docker.com/) +Wei-Shaw%2Fsub2api | Trendshift + **AI API 网关平台 - 订阅配额分发管理** [English](README.md) | 中文 +> **Sub2API 官方仅使用 `sub2api.org` 与 `pincc.ai` 两个域名。其他使用 Sub2API 名义的网站可能为第三方部署或服务,与本项目无关,请自行甄别。** --- ## 在线体验 -体验地址:**https://v2.pincc.ai/** +体验地址:**[https://demo.sub2api.org/](https://demo.sub2api.org/)** 演示账号(共享演示环境;自建部署不会自动创建该账号): | 邮箱 | 密码 | |------|------| -| admin@sub2api.com | admin123 | +| admin@sub2api.org | admin123 | ## 项目概述 -Sub2API 是一个 AI API 网关平台,用于分发和管理 AI 产品订阅(如 Claude Code $200/月)的 API 配额。用户通过平台生成的 API Key 调用上游 AI 服务,平台负责鉴权、计费、负载均衡和请求转发。 +Sub2API 是一个 AI API 网关平台,用于分发和管理 AI 产品订阅的 API 配额。用户通过平台生成的 API Key 调用上游 AI 服务,平台负责鉴权、计费、负载均衡和请求转发。 ## 核心功能 @@ -41,6 +44,15 @@ Sub2API 是一个 AI API 网关平台,用于分发和管理 AI 产品订阅( - **管理后台** - Web 界面进行监控和管理 - **外部系统集成** - 支持通过 iframe 嵌入外部系统(如支付、工单等),扩展管理后台功能 +## 不想自建?试试官方中转 + + + + + + +
pinccPinCC 是基于 Sub2API 搭建的官方中转服务,提供 Claude Code、Codex、Gemini 等主流模型的稳定中转,开箱即用,免去自建部署与运维烦恼。
+ ## 生态项目 围绕 Sub2API 的社区扩展与集成项目: @@ -61,17 +73,18 @@ Sub2API 是一个 AI API 网关平台,用于分发和管理 AI 产品订阅( --- -## 文档 +## Nginx 反向代理注意事项 -- 依赖安全:`docs/dependency-security.md` +通过 Nginx 反向代理 Sub2API(或 CRS 服务)并搭配 Codex CLI 使用时,需要在 Nginx 配置的 `http` 块中添加: + +```nginx +underscores_in_headers on; +``` + +Nginx 默认会丢弃名称中含下划线的请求头(如 `session_id`),这会导致多账号环境下的粘性会话功能失效。 --- -## OpenAI Responses 兼容注意事项 - -- 当请求包含 `function_call_output` 时,需要携带 `previous_response_id`,或在 `input` 中包含带 `call_id` 的 `tool_call`/`function_call`,或带非空 `id` 且与 `function_call_output.call_id` 匹配的 `item_reference`。 -- 若依赖上游历史记录,网关会强制 `store=true` 并需要复用 `previous_response_id`,以避免出现 “No tool call found for function call output” 错误。 - ## 部署方式 ### 方式一:脚本安装(推荐) diff --git a/assets/partners/logos/pincc-logo.png b/assets/partners/logos/pincc-logo.png new file mode 100644 index 00000000..081b6c84 Binary files /dev/null and b/assets/partners/logos/pincc-logo.png differ