Use case
Creative audit API for ad-tech
Reused ad creatives, recycled placements, and copy-pasted campaign assets are everywhere — and they're hard to catch by hand. This article walks through a practical pattern for ad-tech creative audit using the MediaLayer matching APIs.
What creative audit actually has to catch
- Reused creatives across advertisers — The same image or video shows up under different campaign IDs and advertiser accounts, often with a re-encode or watermark.
- Recycled campaign assets — Old creatives quietly resurface in new campaigns with cropped frames, swapped logos, or new audio.
- Brand-safety review at scale — Reviewers triage thousands of placements per day. Without similarity grouping, near-duplicates get reviewed independently and decisions diverge.
- Audio bumpers and music reuse — Branded audio, jingles, and music beds get reused across spots. Audio fingerprinting flags overlap with offset-aligned segments instead of guessing.
The matching primitives
MediaLayer wraps image, video, and audio similarity behind one JSON request shape. POST two URLs to /image/match, /video/match, or /audio/match and you get back a similarity score, a confidence label, and (for video and audio) aligned matched segments. Same envelope, three media types — fits a creative-audit pipeline that has to cover banner ads, video pre-rolls, and audio bumpers from the same call site.
{
"match": true,
"confidence": "high",
"similarity_score": 0.91,
"processing_time_ms": 1640,
"media_type": "video",
"matched_segments": [
{ "source_start": 0.0, "source_end": 14.8, "target_start": 2.3, "target_end": 17.1, "score": 0.93 }
]
}A practical creative-audit pipeline
The simplest pattern: when a new placement enters the system, compare its creative against your reference library and route into clear, review, or block lanes based on similarity.
import requests
API_HOST = "medialayer-image-audio-video-matching-api.p.rapidapi.com"
HEADERS = {
"x-rapidapi-key": "YOUR_RAPIDAPI_KEY",
"x-rapidapi-host": API_HOST,
"Content-Type": "application/json",
}
PATH_BY_TYPE = {
"image": "/image/match",
"video": "/video/match",
"audio": "/audio/match",
}
def audit_creative(media_type: str, placement_url: str, references: list[str]):
path = PATH_BY_TYPE[media_type]
best_score = 0.0
best_ref = None
for ref_url in references:
r = requests.post(
f"https://{API_HOST}{path}",
json={"source_url": placement_url, "target_url": ref_url},
headers=HEADERS,
timeout=60,
)
r.raise_for_status()
data = r.json()
if data["similarity_score"] > best_score:
best_score = data["similarity_score"]
best_ref = ref_url
if best_score >= 0.95:
lane = "auto-block"
elif best_score >= 0.80:
lane = "review"
else:
lane = "pass"
return {"lane": lane, "best_ref": best_ref, "score": best_score}Cluster before you review
Without similarity grouping, near-duplicate placements show up as separate rows in the brand-safety queue. With it, reviewers see a cluster: 'these 12 placements share 92%+ similarity', and one decision applies to all of them. That changes review throughput from O(placements) to O(clusters).
When a creative library outgrows pairwise
Pairwise comparison is fine when the reference library is small. Once it's in the tens of thousands of creatives — common for DSPs and creative-management platforms — pairwise calls become the wrong access pattern.
Enterprise media search ingests the creative catalog into a similarity index. Each new placement runs as a one-to-many lookup that returns top-K matches with scores in a single call. Public usage stays on RapidAPI; enterprise direct API access is available after onboarding.
Production checklist
- Server-side keys — x-rapidapi-key never belongs in browser or mobile clients. Call from the audit service.
- Public reference URLs — URL validation rejects private, loopback, and cloud-metadata addresses. Reference creatives need to be publicly reachable, or they need to live on the enterprise direct surface with private deployment.
- Bound concurrency — Bound the per-placement fan-out so a single placement doesn't burst against your RapidAPI plan's per-second limit.
- Use overlap duration on video and audio — Don't act on the boolean match alone — use matched_segments to get total overlap seconds and route based on duration as well as score.
Endpoints used in this article
POST /video/match
Compare two video creatives and surface aligned matched segments — built for re-encoded copies and partial reuse.
See full reference →POST /image/match
Detect duplicate and near-duplicate display creatives. Survives re-encoding, resizing, watermarking, and minor edits.
See full reference →POST /audio/match
Match audio bumpers, music beds, and voice spots across spots. Returns offset-aligned overlapping segments.
See full reference →Related articles
Image similarity API for marketplace fraud detection
Same primitives applied to a different vertical: copied product photos, duplicate listings, coordinated seller fraud.
Read article →Near-duplicate media detection: image, video, and audio in one API
Why near-duplicate detection is harder than exact-match hashing — and how the same envelope handles all three media types.
Read article →Keep exploring
Ad-tech creative audit solution
How the matching primitives plug into pre-flight QA, programmatic placement audit, and music compliance.
Open →Duplicate Detection API
Cross-media duplicate detection — same envelope across image, video, and audio.
Open →Enterprise media search
One-to-many search across millions of indexed creatives — when pairwise stops scaling.
Open →Ready to wire it in?
Subscribe on RapidAPI to call the public API on your own key, or talk to MediaLayer AI Labs about enterprise direct API access.