API Documentation

Fetch any prompt from Promptary using a stable REST endpoint. One GET request returns the assembled prompt text, ready to pass to any AI model.

Authentication Rate limits GET /prompts/:id Code examples Error codes OpenAPI spec ↗

Authentication

All API requests require a valid API key passed in the Authorization header. Create API keys in the Promptary app under API Keys. Requires a Developer or Team plan.

Bearer prefix required — always include Bearer before your key.
Authorization: Bearer pk_live_your_api_key_here

Rate limits

API requests are rate limited per API key. Exceeding the limit returns a 429 Too Many Requests response.

PlanRate limitBurst
developer60 requests / minute10
team60 requests / minute10

GET /api/v1/prompts/:id

Fetch a prompt by its stable UUID. The prompt ID never changes — update the prompt in Promptary and the next call to this endpoint returns the updated version automatically.

GET https://promptary.dev/api/v1/prompts/{id}

Path parameters

ParameterTypeDescription
id required string (UUID) The stable UUID of the prompt. Find it in the Promptary app by right-clicking any prompt → Edit → scroll to Prompt ID.

Responses

200 Prompt found
{
  "id": "432cf304-77a4-44f6-9cdb-288d920dc8ca",
  "title": "YouTube Shorts Script",
  "framework": "risen",
  "text": "Role: You are a viral video scriptwriter...",
  "topic_id": "8f3a1b2c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
  "updated_at": "2026-06-25T09:00:00.000Z"
}
401 Unauthorized
{ "error": "unauthorized" }
404 Not found
{ "error": { "code": "not_found", "message": "Prompt not found" } }
429 Rate limit exceeded

Retry after 60 seconds.

Code examples

curl "https://promptary.dev/api/v1/prompts/YOUR_PROMPT_ID" \
  -H "Authorization: Bearer YOUR_API_KEY"
const response = await fetch(
  "https://promptary.dev/api/v1/prompts/YOUR_PROMPT_ID",
  { headers: { "Authorization": "Bearer YOUR_API_KEY" } }
);
const prompt = await response.json();
console.log(prompt.text);
import requests

response = requests.get(
    "https://promptary.dev/api/v1/prompts/YOUR_PROMPT_ID",
    headers={"Authorization": "Bearer YOUR_API_KEY"}
)
response.raise_for_status()
prompt = response.json()
print(prompt["text"])
$ch = curl_init("https://promptary.dev/api/v1/prompts/YOUR_PROMPT_ID");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer YOUR_API_KEY"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = json_decode(curl_exec($ch), true);
echo $response["text"];

Error codes

StatusCodeMeaning
401unauthorizedMissing, invalid, or revoked API key. Check the Authorization header includes "Bearer " prefix.
404not_foundPrompt ID doesn't exist or doesn't belong to the key owner.
429Rate limit exceeded. Wait 60 seconds and retry.