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
HeaderRequiredValue
AuthorizationYesBearer sw_api_live_...
Content-TypeYesapplication/json

Required scope:

content_intelligence:runs:create

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

FieldTypeRequiredDescription
urlstringYesURL to analyze.
languagestringNoLanguage code. Defaults to en. Maximum 20 characters.
countrystringNoCountry/market code. Defaults to US. Maximum 20 characters.
analysis_depthstringNoscore or full. Defaults to full.
idempotency_keystringNoRetry-safe key. Maximum 160 characters.

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

DepthUse whenCredits
scoreYou need the page score, trend scores, freshness, sufficiency, and top recommendations.3
fullYou 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.

StatusMeaning
400Invalid URL or unsupported analysis depth.
401Missing or invalid API key.
402Insufficient credits.
403API key is missing content_intelligence:runs:create, or this action is unavailable.