Access your prompts programmatically via the PromptAssay REST API. All endpoints require authentication via API key.
403 API_NOT_ALLOWED. Upgrade at /billing.Generate an API key from Settings > API Keys. Include it in every request as a Bearer token.
curl -H "Authorization: Bearer pa_live_..." \ https://promptassay.ai/api/v1/prompts
Per Key
100 req/min
Global
500 req/min
When rate-limited, the API returns HTTP 429 with a Retry-After header in seconds.
All responses are JSON. Success responses wrap data in a data field. Paginated responses include a meta field.
Success
{
"data": { ... },
"meta": {
"page": 1,
"per_page": 20,
"total": 42
}
}Error
{
"error": {
"code": "NOT_FOUND",
"message": "Prompt not found"
}
}/api/v1/promptsList all prompts with optional filtering and pagination.
Query params:
page (default 1)per_page (default 20, max 100)folder_id - filter by folder UUIDtag - filter by tag nametype - filter by prompt type (system, user, assistant, template, few-shot, chain-of-thought)/api/v1/prompts/:idGet a single prompt with full content, metadata, and tags.
/api/v1/prompts/:id/versionsList all versions of a prompt (summaries only, no content). Paginated.
Query params: page, per_page
/api/v1/prompts/:id/versions/:versionGet a specific version by number, including full content.
/api/v1/prompts/:id/resolvedGet the fully resolved prompt with all fragment insertions assembled into the final content.
Use the official TypeScript SDK for a type-safe, zero-dependency client.
npm install promptassay-sdk
import { PromptAssay } from "promptassay-sdk";
const client = new PromptAssay({
apiKey: "pa_live_...",
baseUrl: "https://promptassay.ai",
});
// List prompts
const { data: prompts } = await client.prompts.list({
page: 1,
per_page: 10,
type: "system",
});
// Get a single prompt
const { data: prompt } = await client.prompts.get("uuid");
// Get resolved prompt with fragments
const { data: resolved } = await client.prompts.getResolved("uuid");
console.log(resolved.resolved_content);