Skip to content
Apixo
Reference

Reseller API

Create customers, API keys and balances from your own backend (Apixo resellers).

For resellers who run their own gateway or website: manage everything from your backend. Create a token in Dashboard → Reseller → Keys & API (needs 2FA). It is shown once.

export RK=rk-...            # your reseller API token
export RAPI=https://apixoai.online/api/reseller/v1

Send it as Authorization: Bearer $RK. Money is always a decimal string in USD ("5", "2.50"). Limit: 300 requests/min.

Who am I

curl $RAPI/me -H "Authorization: Bearer $RK"

Returns your brand, key prefix and wallet (your wallet pays our price for every request of your customers).

Customers

# create (external_id = your own user id, optional)
curl -X POST $RAPI/customers -H "Authorization: Bearer $RK" -H "Content-Type: application/json" \
  -d '{"name":"Jane","email":"[email protected]","external_id":"user_42","initial_balance_usd":"10"}'

# list / search
curl "$RAPI/customers?q=user_42&limit=50&offset=0" -H "Authorization: Bearer $RK"

# one customer + usage (last N days)
curl "$RAPI/customers/CUSTOMER_ID?days=30" -H "Authorization: Bearer $RK"

# add or remove balance (negative = remove, never below 0)
curl -X POST $RAPI/customers/CUSTOMER_ID/balance -H "Authorization: Bearer $RK" -H "Content-Type: application/json" \
  -d '{"amount_usd":"5","note":"stripe pi_123"}'

# ban / unban, private note
curl -X PATCH $RAPI/customers/CUSTOMER_ID -H "Authorization: Bearer $RK" -H "Content-Type: application/json" -d '{"banned":true}'

API keys

# key for a customer (charged at YOUR prices from the customer's balance)
curl -X POST $RAPI/keys -H "Authorization: Bearer $RK" -H "Content-Type: application/json" \
  -d '{"customer_id":"CUSTOMER_ID","name":"laptop","rpm":60}'

# your own extra key (no customer: billed from your wallet, all models)
curl -X POST $RAPI/keys -H "Authorization: Bearer $RK" -H "Content-Type: application/json" -d '{"name":"pool-1"}'

# list: all / one customer / only your own (customer_id=none); add all=1 to include revoked
curl "$RAPI/keys?customer_id=CUSTOMER_ID" -H "Authorization: Bearer $RK"

# change the rate limit / revoke (immediate: next request gets 401)
curl -X PATCH $RAPI/keys/KEY_ID -H "Authorization: Bearer $RK" -H "Content-Type: application/json" -d '{"rpm":120}'
curl -X DELETE $RAPI/keys/KEY_ID -H "Authorization: Bearer $RK"

The full key (sk-yourprefix-…) is returned only when it is created.

Prices and usage

curl $RAPI/models -H "Authorization: Bearer $RK"        # our price + your price per model (USD per 1M tokens)
curl "$RAPI/usage?days=30" -H "Authorization: Bearer $RK"  # revenue, cost, profit, per model

Errors

JSON {"error":{"code":"…","message":"…"}} with HTTP 400 (invalid input), 401 (bad token), 404 (not found or not yours), 409 (already exists), 429 (rate limit).

How billing works

Each request of a customer key is charged twice in one transaction: your wallet pays our price, the customer's balance pays your price. If your wallet is below $5, your customers get HTTP 503 until you top up — keep an eye on wallet_usd.