Apiway pays creators a share of platform net margin every time a generation flows through one of their referrals. Two legs stack independently:
- 30% brand referral — when a brand (Studio account) you referred runs any paid generation, you earn 30% of Apiway's net margin on that generation. Lifetime — no time limit; every paid generation by that brand pays you, for as long as their account is active.
- 20% creator referral — when a creator you referred publishes a marketplace listing and another brand uses it in a generation, you earn 20% of Apiway's net margin on that generation. No time limit — the seller relationship is long-lived.
- Combined cap 50% — when both legs apply on the same generation (you referred both the buyer and the seller), the total never exceeds 50% of net margin. The two legs scale proportionally if they would otherwise exceed the cap.
Earnings accrue to your marketplace balance — the same pot as marketplace creator-pool earnings — and use the same withdrawal flow. There is no separate cashout for affiliate income.
What is "Apiway net margin"?
Net margin is what Apiway keeps after paying every other party in the chain. For one generation:
- The buyer pays the generation cost (Apiway's model price) plus, on marketplace generations, a creator-pool surcharge.
- The creator pool is paid out to the listing owner and any co-authors per the listing's split.
- The marketplace markup (the difference between buyer surcharge and creator pool) goes to Apiway. Default markup is 20%.
- The Google API cost for the underlying Gemini generation is paid by Apiway out of its model price.
- The generation margin (Apiway's model price minus the Google API cost) goes to Apiway.
- Apiway net margin = marketplace markup + generation margin. That is the figure your affiliate share is computed against.
For non-marketplace generations the marketplace markup is zero, so net margin equals the generation margin alone.
Worked example
A brand you referred uses Nano Banana 2 @ 2K to generate 1 image with a marketplace listing whose creator pool is 100 credits. The seller is also a creator you referred (so both legs apply).
| Component | Credits | Notes |
|---|---|---|
| Buyer pays — generation cost | 20 | Nano Banana 2 / 2K, current price |
| Buyer pays — marketplace surcharge | 120 | Pool 100 × 1.2, ceiling |
| Buyer total | 140 | = $1.40 |
| Creator pool → owner + co-authors | 100 | Marketplace flow |
| Apiway marketplace markup | 20 | 120 − 100 |
| Google API cost (Nano Banana 2 / 2K) | 10 | ~$0.10, table in lib/affiliate-margin.ts |
| Apiway generation margin | 10 | 20 − 10 |
| Apiway net margin | 30 | 20 + 10 |
| You — brand referrer (30%) | 9 | floor(30 × 0.3) |
| You — creator referrer (20%) | 6 | floor(30 × 0.2) |
| Your combined affiliate payout | 15 | within 50% cap (= 15) |
| Apiway take after affiliate | 15 | 30 − 15 |
When only one leg applies, the math is just floor(net × ratio) for that one leg. With one referrer active, the cap is irrelevant.
When the program pays vs. doesn't
- Marketplace generations only (today). Affiliate payouts fire when the buyer's generation uses a marketplace listing (avatar or photo set). Solo generations have a smaller per-call margin and are not in the v1 program.
- Brand referrer needs first-touch attribution. The brand's account must have been attributed to you under the 30-day first-touch window. Once attributed, the 30% leg pays for the lifetime of the brand account — every paid generation by that brand keeps paying you.
- Creator referrer also has no time limit. Once you refer a creator who later publishes a listing, every paid use of that listing pays you the 20% leg, indefinitely. Apiway resolves "listing owner is a referred creator" at the moment of generation by walking the listing's ownership →
creator_creator_referralstable. - Self-pay is blocked. You can't earn brand referral on your own generations or creator referral on your own listings. The database rejects these rows and the lookup-time check skips them.
- Bundle frames (Creators UGC 10-use bundle). When a buyer is on a paid-bundle frame (the listing fee was already charged earlier in the bundle), the reference listing's marketplace markup is excluded from net margin for that frame; the avatar markup and the generation margin still count.
- Negative generation margin protection. If Google ever charges more than Apiway's buyer price for a model, the generation-margin component clamps to zero (no negative payouts). Net margin can still be positive from the marketplace markup alone.
Where to see your earnings
Open Creators → Affiliate. The tab has three layers:
- Commission earnings card — lifetime total, last 30 days, and brand-leg vs creator-leg lifetime totals.
- Recent commissions list — every generation that paid you, grouped by generation event. Each row reads "masked-buyer generated N images with "Listing title"" with badges for which leg(s) paid (Brand, Creator, or Brand + Creator).
- Details popup — clicking a row opens the full breakdown: your share per leg with ratio, where every credit went (creator pool / Apiway markup / generation cost), and Apiway net margin (markup + generation margin with Google API cost surfaced). Designed so you can audit any payout to the cent.
How to send referrals
Share your public creator profile URL (Apiway appends ?cref=<your-user-id> automatically on share-flow buttons), or any listing URL. First touch on a published storefront or listing within the 30-day window starts the attribution clock; the new account's signup completes it. Read Creator storefront signup attribution (cref) for the mechanical detail (cookie + signed token + completion paths).
Withdrawal
Affiliate earnings sit in the same balance as marketplace creator-pool earnings. Withdraw on the standard flow: How to withdraw earnings (payout). There is no separate "affiliate cashout".
Program tuning
The 30% / 20% / 50% numbers are production-tunable via Apiway environment variables (AFFILIATE_BRAND_RATIO, AFFILIATE_CREATOR_REF_RATIO, AFFILIATE_TOTAL_CAP_RATIO) — read fresh on every generation. The brand-referral leg is lifetime by default (AFFILIATE_BRAND_REFERRAL_WINDOW_DAYS=0); a positive value would re-impose a window, but we have no plans to do so. We will publicly announce changes before lowering any rate; raises take effect immediately.
Related
- Creator storefront signup attribution (cref) — first-touch mechanics, the 30-day window, and how the cookie + signed token complete attribution.
- Pricing rules: creator pool and buyer price — how the marketplace surcharge is computed (minimum pool 83 credits, 20% platform markup).
- How to withdraw earnings (payout) — the manual payout flow that releases your marketplace balance.