Public API

SaliencyLab API docs

Async creative analysis, benchmark lookup, creative driver summaries, and webhook delivery. Test keys always return fixtures, live keys are workspace-scoped, and every submission stays job-backed.

Quick start

JavaScript

const response = await fetch('https://api.saliencylab.com/v1/analyses', {
  method: 'POST',
  headers: { Authorization: 'Bearer sl_live_xxx' },
  body: formData,
});
const { data } = await response.json();
const jobId = data.job_id;

Python

import requests

response = requests.post(
    'https://api.saliencylab.com/v1/analyses',
    headers={'Authorization': 'Bearer sl_live_xxx'},
    files={'file': open('ad.mp4', 'rb')},
    data={'platform': 'youtube', 'market': 'US'},
)

Authentication

Send either Authorization: Bearer sl_live_xxx or x-api-key: sl_live_xxx. Test keys start with sl_test_ and return deterministic fixtures without consuming quota.

Webhook receivers should verify X-SaliencyLab-Signature against the raw JSON payload using the one-time signing secret returned with the submission.

Endpoints

POST

/v1/analyses

Submit one asset and receive a job id immediately.

GET

/v1/analyses/:job_id

Poll for status or fetch the completed analysis result.

POST

/v1/analyses/batch

Submit up to 50 assets in one batch.

GET

/v1/benchmarks

Read benchmark stats for a category/platform/market slice.

GET

/v1/creative-drivers

Read creative attribute drivers for a slice.

DELETE

/v1/analyses/:id

Delete a saved analysis and linked assets.

Webhooks

When a webhook URL is supplied, SaliencyLab posts the completed analysis payload back to your server.

const signature = req.headers['x-saliencylab-signature'];
const computed = hmacSHA256(req.body, webhookSecret);
if (signature !== computed) {
  return 401;
}

Delivery is retried up to three times with backoff. Batch callbacks fire once after every job in the batch has completed.

Reference