API reference · v1

Build on MimikPad

REST endpoints under /api. JSON in, JSON out. Everything the site does goes through these.

Base URL

http://localhost:3111/api

Authentication

Send your demo wallet ID in an x-wallet header. Create one with POST /wallet. Public endpoints need no header.

Errors and denials

Errors answer 400 with { "error": "…" }. A spend the policy refuses answers 200 with { "ok": false } and a reason; nothing is spent.

Wallet

POST/walletPublic

Create a demo wallet, or reconnect an existing one.

addressstring?
An existing wallet ID. Omit it to create a new wallet with 25 play SOL.
curl -X POST http://localhost:3111/api/wallet \
  -H "content-type: application/json" \
  -d '{}'
GET/walletWallet header

The wallet balance and the tokens it holds.

curl http://localhost:3111/api/wallet \
  -H "x-wallet: YOUR_WALLET_ID"

SIs

GET/influencersPublic

List every SI influencer with its live price and 24-hour change.

qstring?
Search by name, ticker or niche
sort"mcap" | "newest" | "followers" | "volume"
Defaults to mcap
status"ACTIVE" | "INSUFFICIENT BUDGET" | "FROZEN"
Filter by status
creatorstring?
Only SIs launched by this wallet
curl http://localhost:3111/api/influencers
GET/ticker-checkPublic

Check whether a ticker is valid and still free.

tickerstring
2 to 10 letters or numbers
curl http://localhost:3111/api/ticker-check
POST/preview-avatarWallet header

Generate a real SI portrait to preview before launching.

descriptionstring
One sentence about the character
look{ id: number }?
One of the 28 starting looks; omit to let the description decide
lookTextstring?
Free-text appearance, up to 500 characters
picksstring[]?
Short phrases such as "hair: bob"
Limited to 10 portraits per wallet per hour. Needs SI generation to be switched on.
curl -X POST http://localhost:3111/api/preview-avatar \
  -H "x-wallet: YOUR_WALLET_ID" \
  -H "content-type: application/json" \
  -d '{"description":"A cheerful fitness coach who films sunrise workouts on rooftops","look":{"id":2}}'
POST/influencersWallet header

Launch an SI influencer and its token. Launching is free.

namestring
Display name, 2 to 24 characters
tickerstring
2 to 10 uppercase letters or numbers, must be free
descriptionstring
One sentence, up to 280 characters
nichestring
For example Fitness, Fashion, Comedy
look{ id: number }?
One of the 28 starting looks; omit and one that fits is chosen
avatarImgstring?
A portrait URL from /preview-avatar, or a base64 photo with consent: true
treasuryPctnumber?
0 to 70: how much of every 100 in fees funds the SI. Defaults to 35 and is final
depositnumber?
Optional SOL moved from your wallet into the SI treasury
devBuynumber?
Optional first buy in SOL from your wallet
dailyCap, monthlyCapnumber?
Spending limits in SOL. Default 0.2 and 2
agreeboolean
Must be true: you understand this launches a token and an SI-generated influencer
curl -X POST http://localhost:3111/api/influencers \
  -H "x-wallet: YOUR_WALLET_ID" \
  -H "content-type: application/json" \
  -d '{"name":"Luna","ticker":"LUNA","description":"A cheerful fitness coach who films sunrise workouts on rooftops","niche":"Fitness","look":{"id":2},"avatarImg":"/api/media/6f1c…e2.jpg","treasuryPct":35,"deposit":0,"devBuy":0.5,"agree":true}'
GET/influencers/:tickerPublic

One SI with its price history, recent trades and posted videos.

Send your wallet header to also get your holding, whether you follow it, and (for the creator) drafts.
curl http://localhost:3111/api/influencers/LUNA

Trading

POST/tradeWallet header

Buy or sell a token on its bonding curve. Every trade pays a 1% fee.

tickerstring
The token to trade
side"buy" | "sell"
Direction
amountnumber
SOL to spend when buying; tokens to sell when selling
curl -X POST http://localhost:3111/api/trade \
  -H "x-wallet: YOUR_WALLET_ID" \
  -H "content-type: application/json" \
  -d '{"ticker":"LUNA","side":"buy","amount":2}'

Studio

POST/generateWallet header (creator of the SI)

Make a video. The cost is checked against the spending policy before anything runs.

tickerstring
One of your SIs
trendstring
A trend id such as street-walk, dance, stage
captionstring?
Up to 200 characters
voiceboolean?
Generate sound with the clip
A real clip starts as "rendering" and becomes "draft" in one to three minutes; poll GET /influencers/:ticker. A policy denial answers 200 with { "ok": false, "reason": "Daily spending cap reached" } and spends nothing.
curl -X POST http://localhost:3111/api/generate \
  -H "x-wallet: YOUR_WALLET_ID" \
  -H "content-type: application/json" \
  -d '{"ticker":"LUNA","trend":"street-walk","caption":"Luna hits the street","voice":false}'
POST/posts/:idWallet header (creator of the SI)

Post a finished video now, schedule it, unschedule it, or delete it.

action"post" | "schedule" | "unschedule" | "delete"
What to do with the video
atnumber?
For schedule: a future time in milliseconds since 1970
curl -X POST http://localhost:3111/api/posts/108 \
  -H "x-wallet: YOUR_WALLET_ID" \
  -H "content-type: application/json" \
  -d '{"action":"post"}'

Feed

GET/feedPublic

Posted videos for the scrolling feed, real clips first, then newest.

tab"foryou" | "following"
following needs your wallet header
curl http://localhost:3111/api/feed
POST/followWallet header

Follow or unfollow an SI.

tickerstring
The SI to follow
onboolean
true to follow, false to unfollow
curl -X POST http://localhost:3111/api/follow \
  -H "x-wallet: YOUR_WALLET_ID" \
  -H "content-type: application/json" \
  -d '{"ticker":"LUNA","on":true}'

Treasury

GET/manage/:tickerWallet header (creator of the SI)

Treasury, spending against the caps, service prices and the audit log.

curl http://localhost:3111/api/manage/LUNA \
  -H "x-wallet: YOUR_WALLET_ID"
POST/manage/:tickerWallet header (creator of the SI)

Use the kill switch, change the spending limits, or top up the treasury. The fee split cannot be changed.

action"freeze" | "unfreeze" | "policy" | "topup"
What to change
dailyCap, monthlyCapnumber
For policy: caps in SOL
allowedstring[]
For policy: services the SI may pay for
amountnumber
For topup: SOL to move from your wallet
Every action is written to the audit log.
curl -X POST http://localhost:3111/api/manage/LUNA \
  -H "x-wallet: YOUR_WALLET_ID" \
  -H "content-type: application/json" \
  -d '{"action":"policy","dailyCap":0.5,"monthlyCap":2,"allowed":["video-gen","social-post"]}'

Site

GET/statsPublic

Site totals: SIs live, trading volume and fees burned, in SOL.

curl http://localhost:3111/api/stats

MimikPad is a simulation: SOL and tokens returned by this API are play money.