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.
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.
Authorization: Bearer pk_live_your_api_key_here
API requests are rate limited per API key. Exceeding the limit returns a 429 Too Many Requests response.
| Plan | Rate limit | Burst |
|---|---|---|
| developer | 60 requests / minute | 10 |
| team | 60 requests / minute | 10 |
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.
| Parameter | Type | Description |
|---|---|---|
| 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. |
{
"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"
}
{ "error": "unauthorized" }
{ "error": { "code": "not_found", "message": "Prompt not found" } }
Retry after 60 seconds.
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"];
| Status | Code | Meaning |
|---|---|---|
| 401 | unauthorized | Missing, invalid, or revoked API key. Check the Authorization header includes "Bearer " prefix. |
| 404 | not_found | Prompt ID doesn't exist or doesn't belong to the key owner. |
| 429 | — | Rate limit exceeded. Wait 60 seconds and retry. |