StarVibe LiveDocumentation

Documentation / Affiliate API

Affiliate API

Everything a developer needs to promote this site from their own pages and servers: tracked links, a feed of the models who are live, your statistics as JSON, postbacks to your own server and ready-made embeds. Every call is plain HTTPS, every answer is JSON, and every example below can be copied and run.

The examples use YOURCODE. Signed in as an affiliate, you see your own campaign code here.

#Overview

The affiliate program pays you for the people you bring. This guide is about the technical side: how to build links that are tracked to you, how to show live models on your own website, how to read your numbers by program, and how to be told the moment you earn something.

ToolWhat it is forNeeds a token?
Tracked linksSend visitors to the site; the visit is counted and credited to youNo
Live models feedShow who is live right now on your own pages (JSON)No, only your campaign code
Statistics APIRead clicks, signups and earnings by day, track word, link type or campaignYes
PostbacksThe site calls an address on YOUR server each time you earnNo (you choose the address)
Embeds and bannersA frame of live models and picture banners, no code neededNo

#Basics that apply everywhere

  • Base address: https://starvibelive.com. Every path in this guide starts there.
  • Format: answers are JSON in UTF-8 unless a section says otherwise. Every JSON answer has an ok field: true on success, false with an error word when something is wrong.
  • Money: always whole cents (an integer) in the store currency, which is USD. 1350 means 13.50. Never use floating point for it.
  • Dates: YYYY-MM-DD, in the server's time zone.
  • HTTPS only: the examples use https. Calls over plain http may be redirected.

#Quick start

  1. Open Affiliate program in your member account and apply (or sign in if you are already an affiliate).
  2. On Links, copy your campaign code. It is a short word of up to 8 letters and digits. In every example below it stands in for YOURCODE.
  3. Put a tracked link on your page, or call the live models feed from your server.
  4. When you want your numbers in code, open Banners and tools, press Make a new token, and keep the token safe.

#Your code and your token

There are two secrets-ish values, and they are very different:

ValueWhat it isSafe to publish?
Campaign codeNames one of your campaigns. It sits inside every tracked link.Yes. It is meant to be public.
Statistics tokenProves you are you when you read your own numbers.No. Treat it like a password.

You can have several campaigns (for example one per website) and each has its own code. Reports can be split by campaign, so you can see which website earns.

#Making and replacing a token

On Banners and tools press Make a new token. The token is shown once; the site keeps only a fingerprint of it, so it cannot be shown again. If you lose it, make a new one: the old one stops working at once.

#Live models feed

Ask for the models who are live right now and show them on your own pages. Each model comes with a picture and a ready-made tracked link, so every click is credited to you with no extra work.

GET/referral/api/online.phpPublic. Any website may call it from a browser or a server. Answers are cached for one minute.
NameTypeNeededWhat it does
ctextrequiredYour campaign code.
gendertextoptionalOnly models of one kind: female, male, couple or trans. Leave it out for everybody. Default: everybody
limitintegeroptionalHow many models, from 1 to 48. Default: 12

#The answer

Example answer
{
  "ok": true,
  "models": [
    {
      "name": "SampleModel",
      "gender": "Female",
      "image": "https://starvibelive.com/models/SampleModel/profile-pic/thumb.jpg",
      "link": "https://starvibelive.com/aff.php?c=YOURCODE&tour=room&track=cams&room=SampleModel"
    }
  ]
}
FieldTypeMeaning
okbooleantrue when the call worked.
modelslistThe models who are live now, in random order. Empty when nobody is live.
models[].nametextThe model's name as shown on the site.
models[].gendertextThe kind of account, as the model set it (for example Female).
models[].imagetextA full address of the profile picture, or an empty text when the model has none.
models[].linktextYour tracked link to that model's room. Use it as the link target; do not edit it.

#Examples

curl -s "https://starvibelive.com/referral/api/online.php?c=YOURCODE&gender=female&limit=6"
AnswerHTTPWhat it means
{"ok":false,"error":"unknown_campaign"}404The code does not exist, the campaign is switched off, or the affiliate program is closed.

#Statistics API

Read your own numbers: clicks, engaged clicks, signups, recruited models, what the people you brought spent, and what you earned. Group them by day, by your track words, by link type or by campaign, for any range of days.

GET/referral/api/stats.phpNeeds your account name and your statistics token. Never cached.
NameTypeNeededWhat it does
usernametextrequiredYour account name on the site.
tokentextrequiredYour statistics token (see Your code and your token).
fromdateoptionalFirst day of the range, YYYY-MM-DD. Default: 29 days ago
todateoptionalLast day of the range, YYYY-MM-DD. If it is before from, the two are swapped. Default: today
bytextoptionalHow rows are grouped: date, sub (your track words), tour (link types) or campaign. Default: date

#The answer

Example answer (values are made up)
{
  "ok": true,
  "currency": "USD",
  "rows": [
    {
      "key": "2026-10-22",
      "raw": 120,
      "engaged": 87,
      "signups": 6,
      "t1": 4,
      "t2": 1,
      "t3": 1,
      "bounties": 0,
      "spent": 4500,
      "earned": 1350
    }
  ],
  "total": {
    "raw": 120, "engaged": 87, "signups": 6, "t1": 4, "t2": 1, "t3": 1,
    "bounties": 0, "spent": 4500, "earned": 1350
  },
  "from": "2026-10-01",
  "to": "2026-10-31",
  "by": "date"
}
FieldTypeMeaning
currencytextThe currency of every money field.
rowslistOne row per day, track word, link type or campaign, depending on by, sorted by key.
rows[].keytextWhat the row stands for: a date, a track word, a link type or a campaign name.
rawintegerClicks counted on your links.
engagedintegerClicks whose visitor then stayed or interacted.
signupsintegerFree signups credited to you.
t1, t2, t3integerOf those signups, how many came from countries in tier 1, 2 and 3 (the tiers decide the pay per signup).
bountiesintegerModels you recruited who reached the earning goal.
spentinteger (cents)What the members you brought spent on tokens, after tax.
earnedinteger (cents)What you earned in the range. It counts earnings that are still waiting to be paid out, and leaves out earnings held for review or reversed.
totalobjectThe same fields added up over all rows.
from, to, bytextThe range and grouping that were used (your inputs, cleaned up).

#Examples

curl -s "https://starvibelive.com/referral/api/stats.php?username=YOURNAME&token=YOURTOKEN&from=2026-10-01&to=2026-10-31&by=sub"

#Limits and errors

To stop guessing, a wrong name and a wrong token get exactly the same answer, and an address may make at most 60 calls an hour. A report is a few rows, so one call every few minutes is plenty.

AnswerHTTPWhat it means
{"ok":false,"error":"bad_credentials"}403The name or the token is wrong, or the token was replaced. Both give this same answer on purpose.
{"ok":false,"error":"slow_down"}429More than 60 calls in an hour from your address. Wait and try again.

#Postbacks

A postback turns things around: instead of you asking, the site calls an address on your server every time you earn something. Your own tracking, spreadsheet or ad platform sees each signup and sale as it happens.

#Setting one up

  1. Open Postbacks in your affiliate area and add an address that starts with https://.
  2. Put placeholders in the address where you want the details, for example https://you.example/hook?event={event}&amount={amount}&sub={sub}&id={id}. They are replaced before the call.
  3. Choose which events you want, or everything.
  4. Press Test to send a sample call and see what your server answers.

If your address has no placeholders at all, the usual details are added to it as a query string for you.

#Placeholders

PlaceholderFilled with
{event}What happened: signup, purchase, bounty or level2 (an earning from an affiliate you brought in). A test call uses test.
{amount}Your earning, in money with two decimals (for example 13.50).
{cents}The same, in whole cents (1350).
{currency}The currency, for example USD.
{sub}The track word of the link that brought the visitor.
{tour}The link type that was used (home, join, room ...).
{campaign}Your campaign code.
{country}The visitor's country as two letters, when known.
{tier}The country tier, 1 to 3, for signups.
{id}The number of the earning. It never changes and is unique: use it to ignore a call you already handled.
{time}When the earning was made, as a Unix time (seconds).
{salt}A secret word of your own for this postback address (you can type one, or one is made for you). See "Checking the call is real".

#What the site does

  • It makes a plain GET request with a short time limit (6 seconds) and does not follow redirects.
  • An answer with any 2xx status counts as received. Anything else (or no answer) is tried again after 1 minute, then 10 minutes, then 1 hour, and then given up.
  • You can have up to 5 postback addresses. Each shows its recent calls and what your server answered.
  • Only the normal web ports (80 and 443) are used, and your address must point to a public server: addresses inside private networks are refused.
  • Earnings that are held for review are not sent until they are released.

#Checking the call is real

Anyone can type your postback address into a browser. Put a secret salt in the address (...&salt={salt}) and ignore calls where it does not match the word you chose. Also use {id} to ignore a call you already handled, since a retry can arrive twice.

# Pretend to be the site and test your own endpoint:
curl -i "https://you.example/hook?event=signup&amount=1.50&sub=test&id=1&salt=MYSECRET"

#Embeds and banners

No programming needed: paste a few lines of HTML.

#A frame of live models

GET/referral/embed.phpA small page made to sit inside an iframe. It uses no script and sets no cookies.
NameTypeNeededWhat it does
ctextrequiredYour campaign code.
gendertextoptionalfemale, male, couple or trans. Default: everybody
nintegeroptionalHow many models, 1 to 48. Default: 8
bghex colouroptionalBackground colour as six hex digits without #, for example 111111. Default: 111111
fghex colouroptionalText colour, same format. Default: ffffff
<?php // the same frame, printed from PHP
echo '<iframe src="https://starvibelive.com/referral/embed.php?c=YOURCODE&n=8" width="100%" height="420" style="border:0" loading="lazy" title="Live models"></iframe>';

Every model in the frame links through your tracked link. An invalid colour is ignored, and the frame says so politely when nobody is live.

#Banners

Picture banners are made by the site team and listed on Banners and tools with the ready-to-paste code for each one. A banner file is served from https://starvibelive.com/referral/banner.php?id=NUMBER and may be hot-linked from your pages. Only active banners are served.

#RSS feed of live models

GET/referral/rss.phpPublic RSS 2.0 for feed readers, auto-posting tools and websites that show feeds. Cached for one minute.
NameTypeNeededWhat it does
ctextrequiredYour campaign code.
gendertextoptionalfemale, male, couple or trans. Default: everybody
limitintegeroptionalHow many models, 1 to 48. Default: 20

Each item is a model who is live now: the title says so, the link is your tracked link to the room (with the track word rss), and the description carries the picture. An unknown or paused campaign gets a 404.

GET/referral/popup.phpA script for your own website: on the visitor's first click anywhere on your page your tracked link opens in a new window, then not again on that browser for the hours you set.
NameTypeNeededWhat it does
ctextrequiredYour campaign code.
hoursintegeroptionalHow long before the same browser gets it again, 1 to 168. Default: 24
tourtextoptionalWhere the link goes: any tour that needs no model name (see Tracked links), for example join. Default: home
<script src="https://starvibelive.com/referral/popup.php?c=YOURCODE&hours=24" async></script>

Nothing opens without a click (browsers block that anyway), and the track word is popup, so you can see these visits apart in your statistics.

#Pre-roll video ad (VAST)

GET/referral/vast.phpA VAST 3.0 answer for any video player that plays ads (Video.js, JW Player, Flowplayer ...). Never cached.
NameTypeNeededWhat it does
ctextrequiredYour campaign code.
gendertextoptionalfemale, male, couple or trans. Default: everybody

One linear ad: the teaser clip of a model (one who is live now first), skippable after 5 seconds; a click opens your tracked link to that model's room with the track word preroll. When no model has a teaser the answer is an empty <VAST version="3.0"/> and the player plays no ad. An unknown or paused campaign gets a 404.

#Errors, limits and good habits

CallLimit
Live models feedCached for 1 minute. Between 1 and 48 models per call.
Statistics API60 calls an hour per address.
PostbacksUp to 5 addresses; 3 retries (1 minute, 10 minutes, 1 hour).
Tracked linksOne counted click per visitor address every 10 seconds.

#Answers you can get

AnswerHTTPWhat it means
{"ok":false,"error":"unknown_campaign"}404Feed: the campaign code is not active.
{"ok":false,"error":"bad_credentials"}403Statistics: wrong name or token.
{"ok":false,"error":"slow_down"}429Statistics: too many calls this hour.
(redirect)302Tracked links always redirect, even when something is wrong with the link.

#Good habits

  • Check the ok field before you use anything else in an answer.
  • Treat money as integers in cents all the way to the screen.
  • Escape model names when you put them into a page (use textContent or htmlspecialchars).
  • Keep your token on a server, in an environment variable or a config file that is not public.
  • Cache the feed for a minute, and cache your statistics for a few minutes.
  • Use track words on every link. They cost nothing and show you what works.

#Earnings and payouts

A short note on when the money is yours, so the numbers in your reports make sense.

  • A new earning waits 90 days (time for refunds and chargebacks) before it can be paid out.
  • You can ask for a payout from $10.00. Everything available goes into one payout.
  • If a purchase you were paid for is refunded, that earning is reversed. If it was already paid out, it is taken off a later payout.
  • The numbers in the Statistics API are your earnings by the day they were made, not by the day they are paid. The Payouts page shows what is paid.

Back to the top