REST API

REST API overview

Understand base URLs, request conventions, response envelopes, idempotency, and the available resource families.

Verified against the implementation ·

Request conventions

  • Send requests to https://api.promptessor.com/v1.
  • Send JSON request bodies with Content-Type: application/json.
  • Authenticate with a Bearer API key or OAuth access token.
  • Send X-Request-Id when you want to correlate your identifier with PrompTessor logs; otherwise PrompTessor generates one.
  • Send a unique Idempotency-Key on every credit-consuming AI operation.
  • Send Prefer: respond-async when an AI endpoint supports deferred processing.
POST /v1/prompts/analyze HTTP/1.1
Host: api.promptessor.com
Authorization: Bearer pt_live_YOUR_API_KEY
Content-Type: application/json
X-Request-Id: req_from_your_system_123
Idempotency-Key: analysis-job-123

{"prompt":"Summarize the customer interview notes","targetModel":"Claude"}

Response conventions

Read requests return a data envelope. AI requests return an operation-shaped result. All API responses set X-Request-Id and no-store cache control. Rate-limited responses use HTTP 429.

{
  "data": { "object": "list", "data": [] },
  "requestId": "req_..."
}
HeaderPurpose
X-Request-IdCorrelation identifier generated by PrompTessor or copied from your request
RateLimit-LimitMaximum requests in the current one-minute class window
RateLimit-RemainingRequests remaining after the current request
RateLimit-ResetUnix time in seconds when the current window resets
Retry-AfterSeconds to wait when the current rate-limit window is exhausted
Idempotent-Replayedtrue when a stored AI-operation response was safely replayed
LocationOperation URL returned with an asynchronous 202 response
Preference-Appliedrespond-async when deferred processing was accepted

Resource families

FamilyPurpose
PromptsGenerate, analyze, optimize, refine, reverse, and estimate tokens
Prompt presetsStore values for reusable prompt templates and render completed prompts
UploadsUpload temporary assets through presigned URLs
OperationsTrack and cancel asynchronous work
HistoryRead, rename, and delete generated workflow history
Prompt LibraryManage private items and interact with community prompts
AccountRead capabilities, models, and unified usage
WebhooksManage signed event destinations