1) The intermediary accumulates provider access: accounts, API keys or credits (own, bulk, or from pools/accounts). 2) It runs a gateway/relay (e.g. one-api, New API) exposing an OpenAI-compatible API and a billing, quota and key-management panel. 3) The client points base_url at the relay and uses the intermediary's key; requests are proxied to the chosen provider, with load balancing and key rotation. 4) The intermediary charges (often in tokens/credits) with a markup or discount versus original prices; payment via local methods.
Lowers the cost and access barriers to paid AI APIs (payments, regional availability, many accounts), offering one interface to many providers. The trade-off is legality, privacy and reliability.
A forwarding endpoint that relays requests from the client's base_url to providers' original APIs.
Official
A set of provider API keys or accounts used by the relay (with rotation).
Official
A panel (e.g. one-api / New API) for managing users, tokens, quotas and load balancing.
Official
Local payment methods (Alipay, WeChat) and sale of credits/tokens.
Official
Reselling usually breaks providers' terms; accounts/keys get banned, breaking the service.
The relay sees request and response content; the intermediary may log or exploit it.
No direct provider accountability; quality and availability can be unstable.
Credits from abuse/fraud, and model swapping (bait-and-switch) to a cheaper model than advertised.
Open-source tools such as one-api make it easy to stand up relays / reselling stations for LLM access.
OpenRouter and similar services normalize aggregating many models behind one API - the legitimate end of this market.
Relay/proxy becomes a real infrastructure layer; in parallel, abuse grows (account pools, fraud, prompt logging).
Time complexity: O(1) narzut proxy na zadanie. Space complexity: O(uzytkownicy + klucze + logi).
Relay throughput is limited by providers' aggregate rate limits and the number/validity of keys in the pool; account bans and credit exhaustion break the service.
Price relative to original rates (markup or 30-90% discount).
Which providers and models are aggregated behind one API.
Strategy for rotating and failing over keys/accounts.
Route selection depends on the request, model and key availability.
The relay conditionally selects a provider and key from the pool for each request (load balancing, failover).
Many requests can be proxied in parallel, spreading them across the key and provider pools.
A relay is a lightweight proxy/network service - hardware-agnostic; model compute runs at the providers.