Skip to content

Create content run

Queues a persisted Content Intelligence run for a direct URL.

Use this endpoint when a result should be saved, pollable, visible in Activity, and available to the account later. Use Score Content for immediate one-off scoring without persistence.

Successful create requests return 200 OK with the queued run handle.

POST /v1/content-intelligence/runs
Header Required Value
Authorization Yes Bearer sw_api_live_...
Content-Type Yes application/json

Required scope:

content_intelligence:runs:create

Use runs:read as well if the same key will poll the run.

Field Type Required Description
url string Yes URL to analyze.
language string No Language code. Defaults to en. Maximum 20 characters.
country string No Country/market code. Defaults to US. Maximum 20 characters.
analysis_depth string No score or full. Defaults to full.
idempotency_key string No Retry-safe key. Maximum 160 characters.

See Enums for analysis depth, status, and code formats.

Depth Use when Credits
score You need the page score, trend scores, freshness, sufficiency, and top recommendations. 3
full You need the complete Content Intelligence synthesis path. 6

Use score for a compact saved analysis. Use full when you need the complete Content Intelligence result.

Terminal window
curl -s https://api.sleepwalker.ai/v1/content-intelligence/runs \
-H "Authorization: Bearer sw_api_live_..." \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.sleepwalker.ai",
"language": "en",
"country": "US",
"analysis_depth": "score",
"idempotency_key": "ci-sleepwalker-2026-06-10"
}'

The same request in Python and JavaScript:

Python
import requests
resp = requests.post(
"https://api.sleepwalker.ai/v1/content-intelligence/runs",
headers={"Authorization": "Bearer sw_api_live_..."},
json={
"url": "https://www.sleepwalker.ai",
"language": "en",
"country": "US",
"analysis_depth": "score",
"idempotency_key": "ci-sleepwalker-2026-06-10",
},
)
resp.raise_for_status()
print(resp.json())
JavaScript
const resp = await fetch("https://api.sleepwalker.ai/v1/content-intelligence/runs", {
method: "POST",
headers: {
Authorization: "Bearer sw_api_live_...",
"Content-Type": "application/json",
},
body: JSON.stringify({
url: "https://www.sleepwalker.ai",
language: "en",
country: "US",
analysis_depth: "score",
idempotency_key: "ci-sleepwalker-2026-06-10",
}),
});
const data = await resp.json();
console.log(data);
{
"action_decision_id": "act_...",
"run_id": "414cee1a-...",
"status": "queued",
"estimated_credits": "3.00",
"analysis_depth": "score"
}

Poll Get Content Intelligence Run until the status is terminal.

Terminal window
curl -s "https://api.sleepwalker.ai/v1/content-intelligence/runs/414cee1a-0000-0000-0000-000000000000?include_result=true" \
-H "Authorization: Bearer sw_api_live_..."

Recommended polling interval: 10 to 30 seconds.

Persisted Content Intelligence runs consume credits based on analysis_depth.

If the account does not have enough credits, the endpoint returns 402.

See Credit Lifecycle for reservation, settlement, and release behavior.

Status Meaning
400 Invalid URL or unsupported analysis depth.
401 Missing or invalid API key.
402 Insufficient credits.
403 API key is missing content_intelligence:runs:create, or this action is unavailable.
422 Required fields are missing, have the wrong type, or violate a declared field bound.

API-key rate limits and temporary storage errors are documented in Errors.