RESELLER PLATFORM
Launch an AI API Reseller Platform with APInexGate
APInexGate is an open-source, self-hosted AI API gateway and reseller storefront. It connects to an APInex upstream key, imports model pricing, and gives you a customer portal, wallet ledger, subscriptions, RPM tiers, vouchers, and an admin control plane.

APInexGate is an open-source AI gateway and reseller template that you host yourself. It exposes OpenAI, Anthropic Messages, OpenAI Responses, and Jev Group decision endpoints while providing a storefront and admin dashboard.
What is APInexGate?
APInexGate is an open-source AI gateway and reseller template that you host yourself. It exposes OpenAI, Anthropic Messages, OpenAI Responses, and Jev Group decision endpoints while providing a storefront and admin dashboard.
- One upstream APInex key can populate the model catalog.
- Customers receive their own gateway keys and dashboard.
- Paid models bill against a USD wallet.
- Free models can use subscription pools or daily allowances.
- Admin controls cover prices, models, users, plans, vouchers, and RPM tiers.
- Environment variables configure branding, public URL, API origin, support email, and Google OAuth.
How do you launch an AI API reseller business with APInexGate?
Clone the repository, configure the environment and admin password, connect an APInex upstream key, import models, set retail prices, then add the payment and identity integrations your business requires.
The default development path runs a Fastify API and a Vite frontend locally. Production requires a real domain, HTTPS, persistent storage, secure secrets, backups, monitoring, and a payment integration before accepting customer funds.
git clone https://github.com/Apinex-AI/APInexGate.git
cd APInexGate
cp .env.example .env
npm install
npm run dev:fullHow does reseller margin work?
The upstream model cost comes from APInex. Your storefront can set an input and output retail rate for each model, and the difference contributes to gross margin after payment and operating costs.
A sustainable reseller price is not the highest possible multiplier. It must cover payment fees, a buffer for model-price changes, support, and refund risk. Set minimum margins by workload rather than applying one multiplier to every model.
Store a retail price for input and output separately even if the upstream rate is flat. Customer usage can shift between prompt-heavy and output-heavy work, and the operator needs enough spread to absorb fees on both sides.
Review upstream prices on a fixed schedule. A successful model can become loss-making after a provider adjustment if the reseller does not update the retail catalog. Keep a policy for notifying customers when prices change.
Illustrative gross margin before fees
| Item | Example |
|---|---|
| Upstream base | $0.50 per 1M tokens |
| Your retail rate | $1.50 per 1M tokens |
| Gross spread | $1.00 per 1M tokens |
| Gross margin | 67% |
Illustration only. Subtract payment processing, infrastructure, support, refunds, taxes, and bad debt before treating the spread as profit.
Does APInexGate include payment processing?
The current repository describes a provider-neutral template without a bundled production payment processor. You integrate the crypto, card, or webhook flow that fits your jurisdiction and business.
A secure payment integration is an accounting system, not only a checkout redirect. The operator needs a unique payment intent, a signed verification path, idempotent credit application, refund handling, dispute state, and a ledger that can reconcile provider payouts with customer balances.
Vouchers are useful for controlled pilots, but they should be limited, attributable, and revocable. Manual credits need an audit trail and a policy for mistaken grants.
- Choose a processor that supports your customer geography and business model.
- Implement signed webhook handling and idempotent wallet credits.
- Add refund, dispute, chargeback, and reconciliation procedures.
- Display applicable tax, subscription, cancellation, and usage terms.
- Issue vouchers or manual credits until automated checkout is fully verified.
Which API protocols does APInexGate expose?
The current repository describes OpenAI Chat Completions, Anthropic Messages, OpenAI Responses, Jev Group decisions, model listing, balance, subscription, and RPM endpoints.
Protocol support is a compatibility promise. Test streaming, tool calls, typed outputs, authentication, and errors for each client integration. A route that exists but behaves differently from the named protocol can be worse than an honestly unsupported endpoint.
Documented API surface in the APInexGate repository
| Protocol | Documented endpoint or role |
|---|---|
| OpenAI models | GET /v1/models |
| OpenAI Chat | POST /v1/chat/completions |
| OpenAI Responses | POST /v1/responses |
| Anthropic Messages | POST /v1/messages |
| Jev decisions | POST /v1/decisions |
| Gateway account | Balance, subscription, and RPM endpoints |
Confirm the checked-out release notes before exposing an endpoint to customers.
What operating controls does a reseller need?
A reseller needs model-price change management, customer budgets, rate limiting, abuse review, backups, incident response, and a policy for which upstream data can be logged.
Separate customer support from upstream support. The reseller owns account, billing, and application questions; model-provider incidents may still require escalation. Publish a status path and explain which failures are outside the operator's control.
Security review should include admin authentication, customer key storage, database access, webhook secrets, rate-limit bypasses, and data retention. The storefront handles credentials and financial balances, so a template is a starting point rather than a complete security program.
- Monitor upstream balance and model availability.
- Alert on zero balance, failed updates, webhook errors, and unusual usage.
- Back up the SQLite database or replace it with a managed database appropriate for your scale.
- Protect admin credentials and rotate integration secrets.
- Document refunds and what happens when upstream pricing changes.
- Publish clear acceptable-use and data-retention terms.
Who should build on APInexGate?
APInexGate fits developers who want a white-label AI API storefront and are prepared to operate infrastructure, payments, support, and compliance.
It is not a passive storefront. The operator remains responsible for customer service, billing accuracy, security, legal terms, abuse controls, and the reliability of the deployed system.
Use the local development path to test branding and workflows, then deploy to your own domain. Do not accept real customer traffic until payment reconciliation, backups, monitoring, and refund handling pass.
What are the key takeaways?
APInexGate provides the software foundation for a self-hosted AI API business, while the operator owns deployment, payment integration, security, and support.
- Model sync and custom pricing reduce manual catalog work.
- Gross token spread is not net profit.
- Payment processing and production operations are intentionally your responsibility.
- Validate legal, tax, data, and abuse requirements before launch.
What are the key takeaways?
- APInexGate is a self-hosted reseller storefront and gateway.
- One upstream key can populate the catalog.
- Custom token rates create gross margin.
- Payments, legal terms, reliability, support, and security remain operator responsibilities.
What sources support this page?
Product facts on this page are based on APInex configuration and first-party vendor pages. Competitor observations are dated and should be rechecked before a long-term procurement decision.
Frequently asked questions
Is APInexGate open source?β
The public repository identifies APInexGate as an open-source gateway and storefront. Check the repository license before distributing a modified version.
Can I use my own domain and brand?β
The repository documents SITE_NAME, SITE_URL, API_BASE_URL, and CONTACT_EMAIL configuration for white-label branding.
Does APInexGate include Stripe or another payment processor?β
The current README says the template does not bundle a production payment processor and expects the operator to integrate the preferred payment path.
Can customers sign in with Google?β
Google OAuth is optional and requires your own Google client ID, secret, and callback configuration.
Put the catalog behind one key.
Compare the live rates, choose a model, and test the workload before you move production traffic.