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.
Endpoint
Section titled “Endpoint”POST /v1/content-intelligence/runsAuthentication
Section titled “Authentication”| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer sw_api_live_... |
Content-Type | Yes | application/json |
Required scope:
content_intelligence:runs:createUse runs:read as well if the same key will poll the run.
Request Body
Section titled “Request Body”| 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.
Analysis Depth
Section titled “Analysis Depth”| 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.
Example Request
Section titled “Example Request”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:
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())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);Response
Section titled “Response”{ "action_decision_id": "act_...", "run_id": "414cee1a-...", "status": "queued", "estimated_credits": "3.00", "analysis_depth": "score"}Polling
Section titled “Polling”Poll Get Content Intelligence Run until the status is terminal.
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.
Credits
Section titled “Credits”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.
Errors
Section titled “Errors”| 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. |