API Documentation
PromptHub API is available for users with an active premium membership. Enable API access from your dashboard, then use your 32-character API key in requests.
Authentication
Use one of the following:
X-API-Key: your_32_char_keyheader (recommended)Authorization: Bearer your_32_char_key?api_key=your_32_char_keyquery param
If IP allowlist is configured in dashboard, requests are accepted only from those IPv4 addresses.
Endpoints
GET /api/v1/prompts
Returns paginated prompts with optional filters.
Query params: page, search, category
curl -H "X-API-Key: YOUR_API_KEY" "https://prompt.sysninja.net/api/v1/prompts?page=1"
Sample JSON response
{
"data": [
{
"id": 21,
"title": "AI Song Generation Rules + YouTube SEO Pack (Save to Memory)",
"content": "<p>Please save this in your memory...</p>",
"category_id": 1,
"type": "ChatGPT",
"is_featured": 1,
"is_free": 0,
"created_at": "2026-03-06 20:35:11",
"category_name": "ChatGPT"
},
{
"id": 20,
"title": "Midjourney Product Hero Scene",
"content": "<p>Create a cinematic product hero shot...</p>",
"category_id": 6,
"type": "Midjourney",
"is_featured": 0,
"is_free": 1,
"created_at": "2026-03-06 18:22:03",
"category_name": "Midjourney"
}
],
"pagination": {
"total": 89,
"per_page": 10,
"current_page": 1,
"last_page": 9,
"offset": 0
}
}
GET /api/v1/prompts/{id}
Returns a single prompt by ID.
curl -H "X-API-Key: YOUR_API_KEY" "https://prompt.sysninja.net/api/v1/prompts/1"
Sample JSON response
{
"data": {
"id": 21,
"title": "AI Song Generation Rules + YouTube SEO Pack (Save to Memory)",
"content": "<p>Please save this in your memory...</p>",
"category_id": 1,
"type": "ChatGPT",
"is_featured": 1,
"is_free": 0,
"created_at": "2026-03-06 20:35:11",
"category_name": "ChatGPT"
}
}
Error Responses
Typical status codes: 401 invalid key, 403 membership/IP restriction, 404 resource not found.
401 Invalid/disabled key
{
"error": "API key is invalid or disabled."
}
403 Membership required
{
"error": "Active premium membership is required."
}
403 IP allowlist block
{
"error": "This IP is not allowed for the API key."
}