Skip to content

Suggest prompts

Generates AI Visibility prompt ideas for one URL and brand.

Use this when you want Sleepwalker to propose realistic prompts before creating an AI Visibility run.

POST /v1/visibility/prompts/suggest
HeaderRequiredValue
AuthorizationYesBearer sw_api_live_...
Content-TypeYesapplication/json

Required scope:

visibility:prompts:suggest
FieldTypeRequiredDescription
urlstringYesPage URL to analyze.
brand_namestringYesBrand or entity the prompts should target.
languagestringNoLanguage code. Defaults to en.
countrystringNoCountry/market code. Defaults to US.
Terminal window
curl -s https://api.sleepwalker.ai/v1/visibility/prompts/suggest \
-H "Authorization: Bearer sw_api_live_..." \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.sleepwalker.ai",
"brand_name": "Sleepwalker",
"language": "en",
"country": "US"
}'

The same request in Python and JavaScript:

Python
import requests
resp = requests.post(
"https://api.sleepwalker.ai/v1/visibility/prompts/suggest",
headers={"Authorization": "Bearer sw_api_live_..."},
json={
"url": "https://www.sleepwalker.ai",
"brand_name": "Sleepwalker",
"language": "en",
"country": "US",
},
)
resp.raise_for_status()
print(resp.json())
JavaScript
const resp = await fetch("https://api.sleepwalker.ai/v1/visibility/prompts/suggest", {
method: "POST",
headers: {
Authorization: "Bearer sw_api_live_...",
"Content-Type": "application/json",
},
body: JSON.stringify({
url: "https://www.sleepwalker.ai",
brand_name: "Sleepwalker",
language: "en",
country: "US",
}),
});
const data = await resp.json();
console.log(data);
{
"prompt_suggestion": {
"url": "https://www.sleepwalker.ai",
"brand_name": "Sleepwalker",
"language": "en",
"country": "US",
"prompts": [
"What are the best AI visibility tools for SEO teams?",
"Which tools track brand mentions in AI search results?"
],
"prompt_count": 2,
"billing": {
"billable": true,
"estimated_credits": "1.00"
},
"payload_limits": {
"max_prompts": 5
}
}
}
  • The endpoint returns up to 5 prompts.
  • Prompt suggestions are not saved as a run.
  • To execute prompts, pass them to Create AI Visibility Run.

A successful billable prompt suggestion response costs 1 credit.

If prompts cannot be generated because the page is blocked or has insufficient content, the response includes billing.billable: false.

StatusMeaning
400Missing URL or brand name.
401Missing or invalid API key.
402Insufficient credits for a billable request.
403API key is missing visibility:prompts:suggest.