MuAX API Documentation
Complete API reference for integrating the MuAX Mutual Advertising Exchange into your website.
JavaScript API
LLMSE_MUAX.load(options)
Load and display exchange units in the specified containers.
LLMSE_MUAX.load({
placements: [
{ id: '#header-banner', type: 'static' },
{ id: '#sidebar-unit', type: 'animated' }
],
onLoad: function(responses) {
// Called when units load successfully
responses.forEach(function(r) {
console.log('Loaded:', r.placement_id, r.target_url);
});
},
onError: function(error) {
// Called on error
console.error('MuAX error:', error.message);
}
});
LLMSE_MUAX.configure(options)
Configure the MuAX client (optional, for advanced use cases).
LLMSE_MUAX.configure({
endpoint: 'https://llmse.ai/muax/serve', // API endpoint
timeout: 5000 // Request timeout in ms
});
Server API
POST /muax/serve
Request exchange units for your placements.
Request
POST /muax/serve HTTP/1.1
Content-Type: application/json
{
"placements": [
{"id": "#header-banner", "type": "static", "width": 728, "height": 90},
{"id": "#sidebar-unit", "type": "static", "width": 300, "height": 250}
],
"screen_width": 1920,
"screen_height": 1080
}
Response
{
"responses": [
{
"placement_id": "#header-banner",
"html": "<div class=\"llmse-muax\">...</div>",
"impression_url": "https://llmse.ai/muax/impression/abc123",
"click_url": "https://llmse.ai/muax/click/abc123?dest=...",
"target_url": "https://example.com",
"asset_id": "sports-static-728x90"
}
]
}
The server automatically detects your website's category from the HTTP Referer header. Only classified websites receive exchange units.
Styling
Exchange units use the following CSS classes that you can style:
.llmse-muax {
/* Container for the exchange unit */
}
.llmse-muax img {
/* Images within the unit */
max-width: 100%;
height: auto;
}
.llmse-muax-video video {
/* Video containers */
max-width: 100%;
}
.llmse-muax-empty {
/* Empty placeholder when no unit available */
}
.llmse-muax-error {
/* Error state container */
}
Exchange Algorithm
The MuAX exchange uses progressive matching to find the best target sites:
First, we look for sites in the same subcategory (e.g., "Soccer" within "Sports").
If no subcategory matches, we broaden to the main category (e.g., any "Sports" site).
A random site is selected from the top 100 most recently classified sites in the matching pool.
Your own site is automatically excluded from results to prevent self-promotion.
Privacy & Security
- No personal data is collected or stored
- No cookies are used for tracking
- All communication uses HTTPS
- HTML is sanitized before rendering (no script execution)
- CORS is enabled for cross-origin requests