PromptLabHub
/

Getting Started

OverviewAuthenticationRate Limits & Quotas

API Endpoints

GETList PromptsGETGet PromptPOSTSubmit PromptGETList Categories

HTTP Error Codes

HTTP Error Codes

Examples

Examples

Official SDKs

Official SDKs
PromptLabHub
/

Getting Started

OverviewAuthenticationRate Limits & Quotas

API Endpoints

GETList PromptsGETGet PromptPOSTSubmit PromptGETList Categories

HTTP Error Codes

HTTP Error Codes

Examples

Examples

Official SDKs

Official SDKs

API REFERENCE

PromptLabHub API Reference

Access your saved prompts, run search queries, filter by models, and query prompt categories programmatically with low latency.

Get an API KeyAPI Changelog

Authentication

All API requests must be authenticated using a Bearer token in the Authorization header. API keys can be managed from your API Settings.

Authorization Header
Authorization: Bearer plh_live_your_key_here

Rate Limits & Quotas

Rate limits are applied per API key on a daily and monthly basis based on your plan tier. Active requests return standard rate limiting headers.

Subscription Tier

Subscription TierDaily LimitMonthly Limit
Free1003,000
Pro1,00030,000
Enterprise10,000300,000

Rate Limit Response Headers

HeaderDescription
X-RateLimit-LimitThe maximum number of allowed requests per day.
X-RateLimit-RemainingThe number of remaining requests for the current day.
X-RateLimit-ResetThe UTC time when the current rate limit window resets (in seconds).

API Endpoints

GET/api/v1/prompts

Retrieve a paginated list of published prompts, with support for search keywords and category filtering.

Query Parameters

FieldTypeRequiredDescription
categorystringNoFilter by category slug or name
searchstringNoKeywords matching title, description or content
pagenumberNo (1)Pagination offset page index
limitnumberNo (20)Max returned size (1 - 50)
curl -X GET "https://promptlabhub.com/api/v1/prompts?category=photography&search=sunset" \
  -H "Authorization: Bearer plh_live_your_key_here"
JSON
{
  "data": [
    {
      "id": "triple-ice-cream-fantasy",
      "title": "Triple Ice Cream Fantasy",
      "category": "food-photography",
      "model": "Midjourney",
      "copyCount": 1420,
      "createdAt": "2025-05-10T00: 00: 00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 384
  }
}
GET/api/v1/prompts/:slug

Retrieve details of a specific prompt by its ID.

Query Parameters

FieldTypeRequiredDescription
slugstringYesThe unique slug identifying the prompt
cURL
curl -X GET "https://promptlabhub.com/api/v1/prompts/triple-ice-cream-fantasy" \
  -H "Authorization: Bearer plh_live_your_key_here"
JSON
{
  "id": "triple-ice-cream-fantasy",
  "title": "Triple Ice Cream Fantasy",
  "content": "\"resolution\": \"8K\", \"aspect_ratio\": \"3: 4\"...",
  "category": "food-photography",
  "model": "Midjourney",
  "difficulty": "Advanced",
  "copyCount": 1420,
  "createdAt": "2025-05-10T00: 00: 00Z"
}
POST/api/v1/prompts

Submit a prompt for approval/moderation dynamically.

Request Body Parameters

FieldTypeRequiredDescription
titlestringYesThe prompt creation title
descriptionstringYesShort summary / notes for options
contentstringYesThe full AI prompt text formulation
categorystring/numberYesCategory ID, name, or slug
cURL
curl -X POST "https://promptlabhub.com/api/v1/prompts" \
  -H "Authorization: Bearer plh_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Neon Tokyo Street Night",
    "description": "Cinematic cyberpunk street scene",
    "content": "neon-lit alley, rain reflections, 8K...",
    "category": "photography"
  }'
JSON
{
  "data": {
    "id": "neon-tokyo-street-night",
    "status": "pending"
  }
}
GET/api/v1/categories

List all available prompt categories.

cURL
curl -X GET "https://promptlabhub.com/api/v1/categories" \
  -H "Authorization: Bearer plh_live_your_key_here"
JSON
{
  "data": [
    { "slug": "photography", "name": "Photo Prompts" },
    { "slug": "food-photography", "name": "Food Prompts" },
    { "slug": "video", "name": "Video Prompts" }
  ]
}

HTTP Error Codes

HTTP StatusCode StringDescription
400VALIDATION_FAILEDRequest body parameters are invalid or missing.
401UNAUTHORIZEDAPI key header is missing, incorrect, or token has been revoked.
404NOT_FOUNDThe requested prompt ID or resource was not found.
429RATE_LIMIT_EXCEEDEDYour daily API key quota has been reached. Upgrade to Pro/Enterprise for higher limits.
500INTERNAL_SERVER_ERRORAn unexpected server error occurred. Try again later.

Integration Examples

JavaScript Fetch
"text-[#666]">// JavaScript fetch example
"text-[#f97583]">const apiKey = 'plh_live_your_key_here'

"text-[#f97583]">async "text-[#f97583]">function fetchPrompts() {
  "text-[#f97583]">const response = "text-[#f97583]">await fetch('https:"text-[#666]">//promptlabhub.com/api/v1/prompts?limit=5', {
    headers: {
      'Authorization': `Bearer ${apiKey}`
    }
  })
  "text-[#f97583]">const data = "text-[#f97583]">await response.json()
  "text-[#f97583]">console.log(data.data)
}

fetchPrompts()
Python Requests
"text-[#f97583]">class="text-[#666]"># Python requests example
"text-[#f97583]">import requests

api_key = 'plh_live_your_key_here'
url = 'https://promptlabhub.com/api/v1/prompts'
headers = {'Authorization': f'Bearer {api_key}'}
params = {'limit': 5}

response = requests.get(url, headers=headers, params=params)
"text-[#f97583]">print(response.json())

Official SDKs

SDKs for Node.js, Python, and Go are coming soon. For now, you can connect directly using standard HTTP libraries or curl examples.

Node.js — Coming SoonPython — Coming SoonGo — Coming Soon

On this page

OverviewAuthenticationRate Limits & QuotasAPI EndpointsList PromptsGet PromptSubmit PromptList CategoriesHTTP Error CodesExamplesOfficial SDKs