sub2api
Sub2API 一站式开源中转服务,让 Claude、Openai 、Gemini、Grok订阅统一接入,支持拼车共享,更高效分摊成本,原生工具无缝使用。
Learn how to configure object storage for asynchronous image tasks in Sub2API. Offload large images to S3-compatible services to keep Redis memory usage low.
How to Use the Asynchronous Image Task Endpoints in Sub2API: Complete REST API ReferenceDiscover Sub2API's asynchronous image task endpoints. Learn how to manage batch image generation and retrieve results using the /v1/images/batches REST API.
How Sub2API Handles Asynchronous Image Generation: Task-Based Architecture and ImplementationDiscover how Sub2API manages asynchronous image generation using background tasks and status endpoints. Learn about its task-based architecture and implementation for efficient processing.
Sub2API Order Statuses: Complete Guide to Payment State ConstantsExplore the 13 Sub2API order status constants for payment state management. Understand every possible payment lifecycle stage from creation to completion, refund, or failure.
Sub2API Payment System Load Balancing Strategies: Round Robin and Least Daily AmountExplore Sub2API payment load balancing strategies like Round Robin and Least Daily Amount. Learn how to optimize request distribution for your payment system.
What Are the Supported Payment Providers for Sub2API? Complete Implementation GuideExplore supported payment providers for Sub2API including EasyPay, Alipay, WeChat Pay, Stripe, and Airwallex. Get a complete implementation guide to integrate seamlessly.
Which AI Platforms Are Supported by Sub2API’s Composite Groups?Discover which AI platforms Sub2API's Composite Groups support including Anthropic, Gemini, OpenAI, and Grok. Route requests dynamically without binding API keys.
How Sub2API Calculates Costs Based on Tokens: Inside `usage_billing.go`Discover how Sub2API calculates API costs using token counts in usage_billing.go. Learn about input/output volume and rate tier pricing for accurate billing.
Concurrency Control Mechanisms in Sub2API: A Deep Dive into Channel-Based Rate LimitingExplore Sub2API's concurrency control: buffered Go channels, mutex-protected state, and lifecycle primitives enforce per-user limits and protect AI providers from overload.
How Sub2API Performs Rate Limiting: Architecture and ImplementationDiscover how Sub2API implements rate limiting. Learn about its architecture, the centralized RateLimitService, and how it enforces per-account quotas using X-RateLimit headers.
Nginx Configuration Required for Sub2API Sticky SessionsLearn the Nginx configuration required for Sub2API sticky sessions. Use the sticky directive and sub2api_session cookie to route clients to the same backend instance.
How Sub2API Implements Sticky Sessions for Account SelectionDiscover how Sub2API implements sticky sessions for account selection using a TTL-bound mechanism. Learn how requests are bound to a specific account and automatically cleared.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →