API Get key

StaglightTools

Ad analyzer

Paste a winning ad or upload it and get an A to F grade, a hook score, 5 new hooks, 3 scripts and a scene-by-scene script to remake it with your product.

Price
40 crper run
Usual time
≈ 60 s
Model id
analysis.ad

Playground

Playground

Ad (video or image)

Sign in to upload a file.

Report language
Sign up to run it

Change the settings: the price and the code follow. You need an account to run it.

analysis.ad

No example of this model yet. These are its real settings.

# 1. Create the job. It is charged once and refunded if it fails.
JOB_ID=$(curl -s -X POST https://staglight.ai/api/v1/jobs \
  -H "Authorization: Bearer $STAGLIGHT_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "op": "analysis.ad",
    "params": {
      "url": "https://example.com/your-ad"
    },
    "max_credits": 40
  }' | jq -r .id)

# 2. Poll until it finishes. Each call waits up to 30 seconds.
while :; do
  JOB=$(curl -s "https://staglight.ai/api/v1/jobs/$JOB_ID?wait=30" -H "Authorization: Bearer $STAGLIGHT_API_KEY")
  case "$(echo "$JOB" | jq -r .status)" in queued|running) ;; *) break ;; esac
done

# 3. Download the result from outputs[0].download_url.
echo "$JOB" | jq '.outputs[0].download_url // .data'
import os, uuid, requests

BASE = "https://staglight.ai/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['STAGLIGHT_API_KEY']}"}

# 1. Create the job. It is charged once and refunded if it fails.
r = requests.post(f"{BASE}/jobs", timeout=60,
                  headers={**HEADERS, "Idempotency-Key": str(uuid.uuid4())},
                  json={
                    "op": "analysis.ad",
                    "params": {
                      "url": "https://example.com/your-ad"
                    },
                    "max_credits": 40
                  })
r.raise_for_status()
job = r.json()

# 2. Poll until it finishes. Each call waits up to 30 seconds.
while job["status"] in ("queued", "running"):
    job = requests.get(f"{BASE}/jobs/{job['id']}", headers=HEADERS,
                       params={"wait": 30}, timeout=60).json()

# 3. Download the result from outputs[0].download_url.
print(job["outputs"][0]["download_url"] if job["outputs"] else job["data"] or job["error"])
// Node 18 or newer. Save as run.mjs: top-level await needs a module.
const BASE = "https://staglight.ai/api/v1";
const headers = { Authorization: `Bearer ${process.env.STAGLIGHT_API_KEY}` };

// 1. Create the job. It is charged once and refunded if it fails.
let res = await fetch(`${BASE}/jobs`, {
  method: "POST",
  headers: { ...headers, "Content-Type": "application/json", "Idempotency-Key": crypto.randomUUID() },
  body: JSON.stringify({
    "op": "analysis.ad",
    "params": {
      "url": "https://example.com/your-ad"
    },
    "max_credits": 40
  }),
});
if (!res.ok) throw new Error((await res.json()).error.message);
let job = await res.json();

// 2. Poll until it finishes. Each call waits up to 30 seconds.
while (job.status === "queued" || job.status === "running") {
  job = await (await fetch(`${BASE}/jobs/${job.id}?wait=30`, { headers })).json();
}

// 3. Download the result from outputs[0].download_url.
console.log(job.outputs[0]?.download_url ?? job.data ?? job.error);
{
  "id": "job_19a2b3c4d5e6f7a8b9c0d1",
  "op": "analysis.ad",
  "status": "queued",
  "credits": 40,
  "title": "",
  "params": {
    "url": "https://example.com/your-ad"
  },
  "progress": null,
  "outputs": [],
  "data": null,
  "error": null,
  "run_id": null,
  "source": "api",
  "created_at": "2026-11-06T12:00:00Z",
  "finished_at": null,
  "eta_seconds": 60
}

What it costs

40 cr per run. The settings do not change the price.

The playground shows the exact price for your settings. A job is charged once when it is accepted, and refunded if it fails. The price is checked again with your file before it runs.

Parameters

NameTypeDefaultAllowed
fileAd (video or image) media id
urlPost link (TikTok, Instagram, Facebook, YouTube Shorts) string Up to 2,048 characters
langReport language enum es, en
notesProduct context (optional) string Up to 1,000 characters

Send these inside params. Files are media ids from POST /api/v1/uploads. View documentation

More models