Skip to content

Rate Limits

The Promptly API enforces monthly usage limits based on your plan tier. All limits are per API key.

PlanMonthly requestsPrice
Free5,000$0
Pro50,000$29/month

Every API response includes headers with your current usage:

HeaderDescription
X-RateLimit-LimitYour monthly request quota
X-RateLimit-RemainingRequests remaining this month
X-RateLimit-ResetUnix timestamp when the quota resets
const response = await fetch(
'https://api.promptlycms.com/prompts/my-prompt',
{
headers: { Authorization: 'Bearer pk_live_...' },
},
);
const limit = response.headers.get('X-RateLimit-Limit');
const remaining = response.headers.get('X-RateLimit-Remaining');
const reset = response.headers.get('X-RateLimit-Reset');
console.log(`${remaining}/${limit} requests remaining`);
console.log(`Resets at ${new Date(Number(reset) * 1000).toISOString()}`);

When you exceed your usage limit, the API returns a 429 status with usage details and an upgrade link:

{
"error": "Usage limit exceeded",
"code": "USAGE_LIMIT_EXCEEDED",
"usage": {
"used": 5000,
"limit": 5000
},
"upgradeUrl": "https://app.promptlycms.com/settings?upgrade"
}
FieldTypeDescription
errorstringHuman-readable error message
codestringAlways USAGE_LIMIT_EXCEEDED
usageobjectCurrent usage and limit counts
upgradeUrlstringDirect link to upgrade your plan

Cache responses. Prompt content doesn’t change between publishes. Cache the response and only re-fetch when you deploy or when you know the prompt has been updated.

Fetch at startup or per request. With response times of 50-80ms, fetching prompts on each request is practical. For high-throughput workloads, fetch once at startup and hold them in memory.

Monitor usage. Check the X-RateLimit-Remaining header periodically to avoid hitting limits unexpectedly.

Use batch fetching. If you need multiple prompts, use GET /prompts to fetch all of them in a single request rather than making individual requests for each one.