Developers
HyperPrompt API reference
The HyperPrompt web app is built on a JSON-over-HTTPS API. With a personal API key you can call the endpoints on this page from your own scripts and tools. This is the same API the app uses, not a separate SDK or a prompt registry for serving prompts in production.
Written by the HyperPrompt Team · Last updated November 5, 2026
- Base URL
https://hyperpromptai.com- Authentication
Authorization: Bearer <API key>- Plan
- Pro or Team to create API keys.
- Format
- JSON request and response bodies (
content-type: application/json)
CLI and MCP server
CLI and MCP setup documentation will be published when public installation is available. This page covers direct HTTP access only.
Create and manage API keys
- Open your account menu → Settings → Integrations tab. On the Free plan this tab shows API access requires a paid plan.
- Enter a name in the key name field (it starts as “My integration”, up to 100 characters).
- Select Create 90-day key.
- Copy the key from the box labelled Copy this key now. It will not be shown again. and store it in a secret manager or environment variable.
Expected result: the key is listed by name with its first 11 characters (for example hp_XXXXXXXX...) and “never used” or the time it was last used. Keys start with hp_. HyperPrompt stores only a SHA-256 hash of the key, so a lost key cannot be recovered. Revoke it and create a new one.
- Expiry: keys created in Settings expire after 90 days.
- Limit: 10 active keys per account. Creating an 11th returns
409“Revoke an existing API key before creating another”. - Revoke: select Revoke next to the key and confirm. Integrations that use the key stop working immediately.
A key acts as your account
Keys have no scopes. A personal key can do anything your signed-in account can do through these endpoints, including deleting prompts. Never put a key in client-side code, a public repository, or a shared prompt. Use one key per integration so you can revoke them separately. See Security for more.
Keys created by the Chrome extension connection (prefix hp_ext_) are a different kind of key. They only work for the small set of endpoints the extension uses and are not covered here.
Authentication and common errors
curl https://hyperpromptai.com/api/library \
-H "Authorization: Bearer $HYPERPROMPT_API_KEY"Throughout this page, $HYPERPROMPT_API_KEY is an environment variable holding your key, and all IDs and values in responses are illustrative placeholders.
| Status | Body | Cause |
|---|---|---|
| 401 | {"success":false,"error":"Authentication required"} | Missing, malformed, revoked, or expired key. |
| 403 | {"success":false,"error":"Verify your email before using HyperPrompt","code":"EMAIL_NOT_VERIFIED"} | The account’s email address is not verified. |
| 400 | {"success":false,"error":"Request body must be valid JSON"} | The body is not parseable JSON. |
| 400 | {"success":false,"error":"Invalid request","details":{"title":["Title is required"]}} | Validation failed. details maps each field to its messages. |
| 404 | {"success":false,"error":"Prompt not found"} | The resource does not exist or your account cannot access it. |
| 429 | {"success":false,"error":"..."} | Rate limited. Wait for the number of seconds in the retry-after header. |
Response envelopes are not uniform. Most endpoints return {"success": true, "data": ...}, but GET /api/library returns a bare array and POST /api/prompts returns the bare prompt object. Each endpoint below shows its shape.
Rate limits
| Scope | Limit |
|---|---|
| AI requests: POST /api/enhance and every model call in an evaluation run (combined) | 10 per minute |
| New prompts, rules, skills, and MCP entries (combined) | 20 per hour |
| POST /api/prompts/import | 5 per minute |
| POST /api/prompts/{id}/comments | 20 per minute |
| Workspace invitations | 20 per hour |
| Workspace creation | 5 per hour |
Free accounts also have a limit of 5 enhancements per calendar month, but API keys require Pro or Team, which have no monthly enhancement limit.
Enhance a prompt, rule, or skill
POST/api/enhance
| Field | Type | Notes |
|---|---|---|
type | string, required | prompt, rule, or skill |
content | string, required | 1–20,000 characters |
mode | string | improve, simplify, refine, or document. For prompts, simplify makes the text shorter and clearer; any other value uses the improve instruction. |
tool | string | Required when type is rule (for example cursor). Up to 100 characters. |
title | string | Optional rule title, up to 200 characters. |
name, category, version | string | Skill metadata. Defaults: my-skill, general, 1.0.0. |
curl -X POST https://hyperpromptai.com/api/enhance \
-H "Authorization: Bearer $HYPERPROMPT_API_KEY" \
-H "content-type: application/json" \
-d '{"type":"prompt","content":"write a launch email for our analytics feature","mode":"improve"}'{
"success": true,
"data": {
"enhanced": "<enhanced prompt text>",
"tokens": 512,
"originalLength": 47,
"enhancedLength": 940
}
}HyperPrompt picks the model; it cannot be set per request. Endpoint errors: 400 “Tool is required for rule enhancement”, 429 “Too many enhancement requests; try again in a minute” (retry-after: 60), 502 with code: "AI_PROVIDER_UNAVAILABLE" (retry-after: 5), 503 “AI service is not configured”.
List your library
GET/api/library?type=prompt
type is optional: prompt, rule, skill, or mcp. Without it, all four are returned. Results are sorted newest-updated first and are not paginated. Prompts include your personal prompts, prompts in workspaces you belong to, and public prompts you saved.
[
{
"id": "<prompt id>",
"type": "prompt",
"title": "Release notes writer",
"description": "",
"content": "<prompt text>",
"href": "/prompts/general/release-notes-writer",
"isPublic": false,
"isFavorite": false,
"isDraft": false,
"currentVersion": 3,
"variables": ["changes"],
"folder": "Marketing",
"workspaceName": "Acme team",
"approvalStatus": "approved",
"createdAt": "2026-11-01T10:00:00.000Z",
"updatedAt": "2026-11-04T09:30:00.000Z"
}
]Optional keys are omitted when empty. Rules add tool; skills add version. Errors use {"error": "..."}: 400 “Invalid library type”, 500 “Failed to fetch library items”.
Prompts
POST/api/prompts
Prompts are public unless you say otherwise
isPublic defaults to true. A personal prompt created without "isPublic": false (or "isDraft": true) is published to the public directory. Prompts created with a workspaceId are always private.
| Field | Type | Notes |
|---|---|---|
title | string, required | 1–200 characters |
content | string, required | 1–40,000 characters |
description | string | Up to 1,000 characters |
category | string | Default general |
tags, technologies, ides, models, useCases, variables | string[] | Up to 30 items, 100 characters each |
isPublic | boolean | Default true |
isDraft | boolean | Default false. Drafts are always private. |
workspaceId | string | Create in a workspace where you are owner or editor. |
approvalStatus | string | draft (default) or in_review. Workspace prompts only. |
curl -X POST https://hyperpromptai.com/api/prompts \
-H "Authorization: Bearer $HYPERPROMPT_API_KEY" \
-H "content-type: application/json" \
-d '{"title":"Release notes writer","content":"Summarize these changes for customers: {{changes}}","variables":["changes"],"isPublic":false}'{
"id": "<prompt id>",
"title": "Release notes writer",
"slug": "release-notes-writer",
"category": "general",
"isPublic": false,
"isDraft": false,
"currentVersion": 1,
"approvalStatus": "approved",
"workspaceId": null,
"createdAt": "2026-11-05T12:00:00.000Z"
}Version 1 is created automatically with the note “Initial version”. Errors: 404 “Workspace not found” (no edit access to workspaceId), 429 “Too many submissions; try again later”.
GET/api/prompts/{id}
Returns {"success": true, "data": { ...prompt, "author": {...}, "workspace": {...}, "similarPrompts": [...] }}. You can read your own personal prompts, prompts in your workspaces, and any public prompt.
PATCH/api/prompts/{id}
Send at least one field. Accepts the create fields above plus folderId (your folder, or null), workspaceId (or null to make it personal), approvalStatus (draft, in_review, or approved; only workspace owners can approve), and changeNote (up to 300 characters). Unknown fields are rejected. Every successful update creates a new version.
curl -X PATCH https://hyperpromptai.com/api/prompts/<prompt id> \
-H "Authorization: Bearer $HYPERPROMPT_API_KEY" \
-H "content-type: application/json" \
-d '{"content":"Summarize these changes for existing customers: {{changes}}","changeNote":"Narrow audience"}'Response: {"success": true, "data": { ...prompt }, "isPublic": false}; data.currentVersion is the new version number. Errors: 404 “Prompt not found” (also returned when you lack edit access), 400 “Folder not found” or “Workspace not found”, 403 “Only the workspace owner can approve prompts”.
DELETE/api/prompts/{id}
Permanently deletes the prompt and its versions. Personal prompts can be deleted by their author; workspace prompts by owners and editors. Returns {"success": true}.
Prompt versions
GET/api/prompts/{id}/versions
Returns {"success": true, "data": [ ...versions ]}, newest first, up to 100. Each version has version, title, content, description, category, the list fields, isPublic, isDraft, approvalStatus, changeNote, and createdAt.
POST/api/prompts/{id}/versions
Restores an earlier version as a new version. Body: {"version": 2, "changeNote": "optional"}. The default note is “Restored version 2”. Restoring an approved workspace prompt sets it back to in_review. Errors: 404 “Version not found” or “Prompt not found”.
Import prompts
POST/api/prompts/import
Body: {"prompts": [ ... ]} with 1–100 prompt objects using the create fields title, content, description, category, and the list fields. All prompts are created as private drafts in one transaction, so either all are imported or none are. Returns 201 with {"success": true, "data": [{"id": "...", "title": "..."}], "count": 1}. See Import prompts from JSON.
Evaluations
Workflow and scoring are explained in Run an evaluation suite. Suites belong to your account.
GET/api/evaluations
Lists your suites with case and run counts and the latest run summary.
POST/api/evaluations
Body: name (required, up to 120), promptTemplate (required, up to 40,000; use {{input}}), description (up to 1,000), rubric (up to 4,000). Returns 201 with the suite.
GET · PATCH · DELETE/api/evaluations/{id}
GET returns the suite with its cases and 10 most recent runs including results. PATCH updates name, description, promptTemplate, or rubric. DELETE removes the suite.
POST/api/evaluations/{id}/cases
{
"name": "Mentions pricing",
"input": "Draft a launch email for the analytics feature",
"expectedOutput": "analytics dashboard pricing",
"variables": { "tone": "friendly" },
"assertions": {
"requiredTerms": ["pricing"],
"forbiddenTerms": ["guarantee"],
"minLength": 200,
"maxLength": 1500
}
}Only name is required. Up to 20 cases per suite (409 “Each suite can have up to 20 cases”). Delete a case with DELETE /api/evaluations/{id}/cases/{caseId}.
POST/api/evaluations/{id}/run
Body: {"models": ["provider/model"], "judgeModel": "provider/model"}. Use 1–3 OpenRouter model IDs; judgeModel is optional. Requires Pro or Team. The response returns when every call has finished: {"success": true, "data": { "id": "...", "status": "completed", "results": [ ... ] }}. Each result has caseId, model, output, matchScore, assertionScore, assertionDetails, judgeScore, judgeReason, latencyMs, tokens, and error.
Errors: 403 “Multi-model evaluations require a paid plan”, 409 “Add at least one test case”, 400 “A run can make at most 10 output and 10 judge requests”, 429 “Too many AI requests; try again in a minute”, 500 “Evaluation run failed”.
Workspaces
GET/api/workspaces
Lists workspaces you belong to, each with your role and member and prompt counts.
PATCH/api/workspaces/{id}
Owner only. Body: {"name": "New name"} (1–100 characters). Membership, invitations, and ownership are covered in Team workspaces.
Account export
GET/api/account/export
Returns {"exportedAt": "<ISO timestamp>", "account": { ... }} with content-disposition: attachment; filename=hyperprompt-export.json. Requires Pro or Team (403 “Data export requires Pro”). The contents are listed in Export your account.
curl https://hyperpromptai.com/api/account/export \
-H "Authorization: Bearer $HYPERPROMPT_API_KEY" \
-o hyperprompt-export.jsonLimitations
- No official SDK, webhooks, or OpenAPI file. Call the endpoints directly over HTTPS.
- Keys are tied to one user. There are no organization-level or read-only keys.
- Responses do not use one shared envelope. Check each endpoint’s shape.
- Only the endpoints on this page are documented. Other routes the web app calls may change without notice.
Prompt comments
GET/api/prompts/{id}/comments
Returns up to 200 comments, oldest first, each with
body,createdAt, anduser(id,name,image).POST/api/prompts/{id}/comments
Body:
{"body": "1–2,000 characters"}. Works on public prompts, your own prompts, and prompts in any workspace you belong to (all roles). On workspace prompts, the comment is added to the activity feed and notifies other members. Returns201.DELETE/api/prompts/{id}/comments/{commentId}
Allowed for the comment’s author, the prompt’s author, or the workspace owner. Otherwise
403“Forbidden”.