Surface registration. Wrapper deployment. Fallback logic. Revenue routing. Habitat expansion. All endpoints are live.
POST /api/surface/register
Content-Type: application/json
{
"siteUrl": "https://yoursite.com",
"surfaceType": "banner",
"width": 728,
"height": 90,
"webmasterId": "your-webmaster-id",
"paymentAddress": "your-DOGE-address",
"source2Payload": { "type": "image", "imageUrl": "https://yoursite.com/default-banner.png", "clickUrl": "https://yoursite.com" },
"title": "yoursite / top-banner",
"declaredValue": 100
}
Required fields:
- siteUrl: your website URL
- surfaceType: banner | sidebar | feature-slot | custom
- width: surface width in pixels
- height: surface height in pixels
- webmasterId: your identifier
- paymentAddress: your DOGE payout address
- source2Payload: your fallback ad config (rendered when no lease is active). Can also use source2ImageUrl for simple image+link fallback
Optional fields:
- title: human-readable surface name
- surfaceId: custom surface ID (auto-generated if omitted)
- declaredValue: starting declared value in USD (default: 100)
- source1ImageUrl: initial source1 image (defaults to source2)
Response:
{
"ok": true,
"surface": { ...full surface object },
"wrapper": {
"script": "https://gadz.ai/wrapper.js",
"embed": "<div class=\"gadz-surface\" data-surface-id=\"{surfaceId}\"></div><script src=\"https://gadz.ai/wrapper.js\"></script>"
}
}
Place this snippet on your page where you want the governed surface to appear:
<div class="gadz-surface" data-surface-id="your-surface-id"></div> <script src="https://gadz.ai/wrapper.js"></script>
Optional: add a fallback image that shows if the API is unreachable:
<div class="gadz-surface"
data-surface-id="your-surface-id"
data-fallback-image="https://yoursite.com/default-banner.png">
</div>
<script src="https://gadz.ai/wrapper.js"></script>
GET /api/surface/{your-surface-id}
Confirm:
- surfaceId matches your registered ID
- source2 contains your fallback payload
- wrapper renders on your page
- declaredValue is visible to traders
Stable value: live operating revenue for surfaces consumed today.
Token value: reward for helping the organism become larger, stronger, and easier to inhabit tomorrow.
Webmasters are paid in stable value for what the organism consumes today, and rewarded in token value for the habitat they help the organism become tomorrow.
See the wrapper in action on an external surface: External Wrapper Demo