REST API · v1.0.0

API reference

All public endpoints from the production API contract. The base URL is https://api.promptessor.com/v1.

Endpoints

45 operations in the current contract.

Download OpenAPI JSON
get/Get API information

No OAuth scope is required beyond valid authentication, or this is a public service endpoint.

Responses

200 API information
get/healthCheck API and database availability

No OAuth scope is required beyond valid authentication, or this is a public service endpoint.

Responses

200 Service is available503 Service is unavailable
get/capabilitiesGet capabilities, granted scopes, and limits

No OAuth scope is required beyond valid authentication, or this is a public service endpoint.

Responses

200 Success400 401 403 429 500
get/modelsList supported target models

No OAuth scope is required beyond valid authentication, or this is a public service endpoint.

Responses

200 Success400 401 403 429 500
get/usageGet unified product usage

Required OAuth scopes

usage:read

Responses

200 Success400 401 403 429 500
post/prompts/generateGenerate a prompt

Required OAuth scopes

prompts:generate

Parameters

NameLocationTypeRequiredRules
Idempotency-KeyheaderstringYesA unique key retained for 24 hours. Reuse the same key and request body when retrying.; length: 1–255
PreferheaderstringNoUse respond-async to defer a supported AI operation.; allowed: respond-async

JSON request body

FieldTypeRequiredRules
messagestringYeslength: 1–6000
modestringNoallowed: auto, general, research, writing, planning, agent, image, video, code, automation; default: auto
outputModestringNoallowed: ready_to_use, reusable; default: ready_to_use
targetModelstringNoallowed: Universal, ChatGPT, Claude, Gemini, Grok, Llama, Mistral, DeepSeek, Perplexity, Cohere, Kimi, Qwen, GPT Image, Midjourney, Nano Banana, FLUX, Ideogram, Stable Diffusion, Lumina, Runway Image, Kling Image, Wan Image, Seedream, Veo, Runway, Kling, Seedance, Wan, MiniMax, Luma, Pika, Vidu, PixVerse, LTX, Adobe Firefly Video, Midjourney Video, Grok Imagine Video; default: Universal
languagestringNodefault: en; length: 2–20
generationIdstring | nullNolength: 1–120
currentPromptstring | nullNolength: 0–20000
conversationarray<object>Nodefault: ; items: 0–50
conversation[].rolestringYesallowed: user, assistant
conversation[].contentstringYeslength: 0–4000
attachmentIdsarray<string>Nodefault: ; items: 0–5

Responses

200 AI operation completed202 Accepted for asynchronous processing400 401 403 409 429 500 503
post/prompts/analyzeAnalyze a prompt

Required OAuth scopes

prompts:analyze

Parameters

NameLocationTypeRequiredRules
Idempotency-KeyheaderstringYesA unique key retained for 24 hours. Reuse the same key and request body when retrying.; length: 1–255
PreferheaderstringNoUse respond-async to defer a supported AI operation.; allowed: respond-async

JSON request body

FieldTypeRequiredRules
promptIdstring | nullNo
promptstringYeslength: 1–50000
languagestringNodefault: en; length: 2–20
contextstringNodefault: ; length: 0–20000
attachmentIdsarray<string>Nodefault: ; items: 0–5
targetModelstringNoallowed: Universal, ChatGPT, Claude, Gemini, Grok, Llama, Mistral, DeepSeek, Perplexity, Cohere, Kimi, Qwen, GPT Image, Midjourney, Nano Banana, FLUX, Ideogram, Stable Diffusion, Lumina, Runway Image, Kling Image, Wan Image, Seedream, Veo, Runway, Kling, Seedance, Wan, MiniMax, Luma, Pika, Vidu, PixVerse, LTX, Adobe Firefly Video, Midjourney Video, Grok Imagine Video; default: Universal
variationCountintegerNoallowed: 1, 2; default: 1

Responses

200 AI operation completed202 Accepted for asynchronous processing400 401 403 409 429 500 503
post/prompts/optimizeOptimize a prompt

Required OAuth scopes

prompts:optimize

Parameters

NameLocationTypeRequiredRules
Idempotency-KeyheaderstringYesA unique key retained for 24 hours. Reuse the same key and request body when retrying.; length: 1–255
PreferheaderstringNoUse respond-async to defer a supported AI operation.; allowed: respond-async

JSON request body

FieldTypeRequiredRules
promptIdstring | nullNo
promptstringYeslength: 1–50000
languagestringNodefault: en; length: 2–20
contextstringNodefault: ; length: 0–20000
attachmentIdsarray<string>Nodefault: ; items: 0–5
targetModelstringNoallowed: Universal, ChatGPT, Claude, Gemini, Grok, Llama, Mistral, DeepSeek, Perplexity, Cohere, Kimi, Qwen, GPT Image, Midjourney, Nano Banana, FLUX, Ideogram, Stable Diffusion, Lumina, Runway Image, Kling Image, Wan Image, Seedream, Veo, Runway, Kling, Seedance, Wan, MiniMax, Luma, Pika, Vidu, PixVerse, LTX, Adobe Firefly Video, Midjourney Video, Grok Imagine Video; default: Universal
variationCountintegerNoallowed: 1, 2; default: 1

Responses

200 AI operation completed202 Accepted for asynchronous processing400 401 403 409 429 500 503
post/prompts/analyze-and-optimizeAnalyze and optimize a prompt

Required OAuth scopes

prompts:analyzeprompts:optimize

Parameters

NameLocationTypeRequiredRules
Idempotency-KeyheaderstringYesA unique key retained for 24 hours. Reuse the same key and request body when retrying.; length: 1–255
PreferheaderstringNoUse respond-async to defer a supported AI operation.; allowed: respond-async

JSON request body

FieldTypeRequiredRules
promptIdstring | nullNo
promptstringYeslength: 1–50000
languagestringNodefault: en; length: 2–20
contextstringNodefault: ; length: 0–20000
attachmentIdsarray<string>Nodefault: ; items: 0–5
targetModelstringNoallowed: Universal, ChatGPT, Claude, Gemini, Grok, Llama, Mistral, DeepSeek, Perplexity, Cohere, Kimi, Qwen, GPT Image, Midjourney, Nano Banana, FLUX, Ideogram, Stable Diffusion, Lumina, Runway Image, Kling Image, Wan Image, Seedream, Veo, Runway, Kling, Seedance, Wan, MiniMax, Luma, Pika, Vidu, PixVerse, LTX, Adobe Firefly Video, Midjourney Video, Grok Imagine Video; default: Universal
variationCountintegerNoallowed: 1, 2; default: 1

Responses

200 AI operation completed202 Accepted for asynchronous processing400 401 403 409 429 500 503
post/prompts/refineRefine a prompt from feedback

Required OAuth scopes

prompts:refine

Parameters

NameLocationTypeRequiredRules
Idempotency-KeyheaderstringYesA unique key retained for 24 hours. Reuse the same key and request body when retrying.; length: 1–255
PreferheaderstringNoUse respond-async to defer a supported AI operation.; allowed: respond-async

JSON request body

FieldTypeRequiredRules
promptstringYeslength: 1–50000
feedbackstringYeslength: 1–10000
refinementIdstringNo
languagestringNodefault: en; length: 2–20
attachmentIdsarray<string>Nodefault: ; items: 0–5
targetModelstringNoallowed: Universal, ChatGPT, Claude, Gemini, Grok, Llama, Mistral, DeepSeek, Perplexity, Cohere, Kimi, Qwen, GPT Image, Midjourney, Nano Banana, FLUX, Ideogram, Stable Diffusion, Lumina, Runway Image, Kling Image, Wan Image, Seedream, Veo, Runway, Kling, Seedance, Wan, MiniMax, Luma, Pika, Vidu, PixVerse, LTX, Adobe Firefly Video, Midjourney Video, Grok Imagine Video; default: Universal

Responses

200 AI operation completed202 Accepted for asynchronous processing400 401 403 409 429 500 503
post/optimizations/{id}/refinementsRefine an optimized version

Required OAuth scopes

prompts:refine

Parameters

NameLocationTypeRequiredRules
idpathstringYeslength: 1–191
Idempotency-KeyheaderstringYesA unique key retained for 24 hours. Reuse the same key and request body when retrying.; length: 1–255

JSON request body

FieldTypeRequiredRules
sourceVersionIdstringYeslength: 1–unlimited
parentRefinementIdstringNolength: 1–unlimited
feedbackstringYeslength: 1–10000
languagestringNodefault: en; length: 2–20
attachmentIdsarray<string>Nodefault: ; items: 0–5
targetModelstringNoallowed: Universal, ChatGPT, Claude, Gemini, Grok, Llama, Mistral, DeepSeek, Perplexity, Cohere, Kimi, Qwen, GPT Image, Midjourney, Nano Banana, FLUX, Ideogram, Stable Diffusion, Lumina, Runway Image, Kling Image, Wan Image, Seedream, Veo, Runway, Kling, Seedance, Wan, MiniMax, Luma, Pika, Vidu, PixVerse, LTX, Adobe Firefly Video, Midjourney Video, Grok Imagine Video

Responses

200 AI operation completed400 401 403 409 429 500 503
post/reverse-promptsReverse engineer a prompt; no history is stored

Required OAuth scopes

prompts:reverse

Parameters

NameLocationTypeRequiredRules
Idempotency-KeyheaderstringYesA unique key retained for 24 hours. Reuse the same key and request body when retrying.; length: 1–255
PreferheaderstringNoUse respond-async to defer a supported AI operation.; allowed: respond-async

JSON request body

FieldTypeRequiredRules
image.typestringYesvalue: image
image.uploadIdstringYeslength: 1–191
image.languagestringNodefault: en; length: 2–20
image.targetModelstringNoallowed: Universal, ChatGPT, Claude, Gemini, Grok, Llama, Mistral, DeepSeek, Perplexity, Cohere, Kimi, Qwen, GPT Image, Midjourney, Nano Banana, FLUX, Ideogram, Stable Diffusion, Lumina, Runway Image, Kling Image, Wan Image, Seedream, Veo, Runway, Kling, Seedance, Wan, MiniMax, Luma, Pika, Vidu, PixVerse, LTX, Adobe Firefly Video, Midjourney Video, Grok Imagine Video; default: Universal
video.typestringYesvalue: video
video.framesarray<string>Yesitems: 1–30
video.frameCountintegerYesrange: 1–30
video.videoDurationnumberYesrange: unlimited–600
video.languagestringNodefault: en; length: 2–20
video.targetModelstringNoallowed: Universal, ChatGPT, Claude, Gemini, Grok, Llama, Mistral, DeepSeek, Perplexity, Cohere, Kimi, Qwen, GPT Image, Midjourney, Nano Banana, FLUX, Ideogram, Stable Diffusion, Lumina, Runway Image, Kling Image, Wan Image, Seedream, Veo, Runway, Kling, Seedance, Wan, MiniMax, Luma, Pika, Vidu, PixVerse, LTX, Adobe Firefly Video, Midjourney Video, Grok Imagine Video; default: Universal
text.typestringYesvalue: text
text.contentstringYeslength: 10–100000
text.languagestringNodefault: en; length: 2–20
text.targetModelstringNoallowed: Universal, ChatGPT, Claude, Gemini, Grok, Llama, Mistral, DeepSeek, Perplexity, Cohere, Kimi, Qwen, GPT Image, Midjourney, Nano Banana, FLUX, Ideogram, Stable Diffusion, Lumina, Runway Image, Kling Image, Wan Image, Seedream, Veo, Runway, Kling, Seedance, Wan, MiniMax, Luma, Pika, Vidu, PixVerse, LTX, Adobe Firefly Video, Midjourney Video, Grok Imagine Video; default: Universal
url.typestringYesvalue: url
url.urlstringYesformat: uri; length: 0–2048
url.languagestringNodefault: en; length: 2–20
url.targetModelstringNoallowed: Universal, ChatGPT, Claude, Gemini, Grok, Llama, Mistral, DeepSeek, Perplexity, Cohere, Kimi, Qwen, GPT Image, Midjourney, Nano Banana, FLUX, Ideogram, Stable Diffusion, Lumina, Runway Image, Kling Image, Wan Image, Seedream, Veo, Runway, Kling, Seedance, Wan, MiniMax, Luma, Pika, Vidu, PixVerse, LTX, Adobe Firefly Video, Midjourney Video, Grok Imagine Video; default: Universal

Responses

200 AI operation completed202 Accepted for asynchronous processing400 401 403 409 429 500 503
post/prompts/token-estimateEstimate prompt tokens

Required OAuth scopes

usage:read

JSON request body

FieldTypeRequiredRules
promptstringYeslength: 0–200000

Responses

200 Success400 401 403 429 500
get/prompt-presetsList owned prompt variable presets

Required OAuth scopes

prompts:presets:read

Parameters

NameLocationTypeRequiredRules
searchquerystringNolength: 0–200
limitqueryintegerNodefault: 25; range: 1–100
offsetqueryintegerNodefault: 0; range: 0–unlimited

Responses

200 Success400 401 403 429 500
post/prompt-presetsCreate a prompt variable preset

Required OAuth scopes

prompts:presets:write

JSON request body

FieldTypeRequiredRules
namestringYeslength: 1–120
templateTitlestringNolength: 0–200
promptTextstringYeslength: 1–20000
valuesobjectYesproperties: 0–100
generationIdstringNolength: 0–191
generatedVersionIdstringNolength: 0–191

Responses

200 Success400 401 403 429 500
get/prompt-presets/{id}Get an owned prompt variable preset

Required OAuth scopes

prompts:presets:read

Parameters

NameLocationTypeRequiredRules
idpathstringYeslength: 1–191

Responses

200 Success400 401 403 404 429 500
patch/prompt-presets/{id}Update a prompt variable preset

Required OAuth scopes

prompts:presets:write

Parameters

NameLocationTypeRequiredRules
idpathstringYeslength: 1–191

JSON request body

FieldTypeRequiredRules
namestringNolength: 1–120
valuesobjectNoproperties: 0–100

Responses

200 Success400 401 403 404 429 500
delete/prompt-presets/{id}Delete a prompt variable preset

Required OAuth scopes

prompts:presets:write

Parameters

NameLocationTypeRequiredRules
idpathstringYeslength: 1–191

Responses

200 Success400 401 403 404 429 500
post/prompt-presets/{id}/renderRender a prompt preset with variable overrides

Required OAuth scopes

prompts:presets:read

Parameters

NameLocationTypeRequiredRules
idpathstringYeslength: 1–191

JSON request body

FieldTypeRequiredRules
valuesobjectNoproperties: 0–100

Responses

200 Success400 401 403 404 429 500
get/operationsList AI operations

Required OAuth scopes

operations:read

Parameters

NameLocationTypeRequiredRules
statusquerystringNoallowed: PENDING, RUNNING, SUCCEEDED, FAILED, CANCELLED
kindquerystringNolength: 0–100
limitqueryintegerNodefault: 25; range: 1–100
cursorquerystringNo

Responses

200 Success400 401 403 429 500
get/operations/{id}Get an AI operation

Required OAuth scopes

operations:read

Parameters

NameLocationTypeRequiredRules
idpathstringYeslength: 1–191

Responses

200 Success400 401 403 404 429 500
delete/operations/{id}Cancel a pending AI operation

Required OAuth scopes

operations:cancel

Parameters

NameLocationTypeRequiredRules
idpathstringYeslength: 1–191

Responses

200 Success400 401 403 404 409 429 500
post/uploadsCreate a presigned temporary upload

Required OAuth scopes

uploads:write

JSON request body

FieldTypeRequiredRules
scopestringYesallowed: analysis, refinement, feedback, generation, reverse_image, reverse_video
filenamestringYeslength: 1–255
contentTypestringYeslength: 1–100; Images: image/jpeg, image/png, image/webp, image/gif. reverse_video: video/mp4, video/quicktime, video/webm.
sizeintegerYesrange: 1–unlimited; Maximum 5 MB for images and 100 MB for reverse_video.

Responses

200 Success400 401 403 429 500 503
get/uploads/{id}Get an upload

Required OAuth scopes

uploads:write

Parameters

NameLocationTypeRequiredRules
idpathstringYeslength: 1–191

Responses

200 Success400 401 403 404 429 500
delete/uploads/{id}Delete an unconsumed upload

Required OAuth scopes

uploads:write

Parameters

NameLocationTypeRequiredRules
idpathstringYeslength: 1–191

Responses

200 Success400 401 403 404 409 429 500 503
post/uploads/{id}/completeValidate and complete an uploaded object

Required OAuth scopes

uploads:write

Parameters

NameLocationTypeRequiredRules
idpathstringYeslength: 1–191

Responses

200 Success400 401 403 404 409 410 429 500 503
get/historyList product history

Required OAuth scopes

history:read

Parameters

NameLocationTypeRequiredRules
typequerystringNoallowed: generation, optimization, refinement; default: optimization
searchquerystringNolength: 0–200
limitqueryintegerNodefault: 25; range: 1–100
offsetqueryintegerNodefault: 0; range: 0–unlimited

Responses

200 Success400 401 403 429 500
get/history/{type}/{id}Get a history item

Required OAuth scopes

history:read

Parameters

NameLocationTypeRequiredRules
typepathstringYesallowed: generation, optimization, refinement
idpathstringYeslength: 1–191

Responses

200 Success400 401 403 404 429 500
patch/history/{type}/{id}Rename a history item

Required OAuth scopes

history:manage

Parameters

NameLocationTypeRequiredRules
typepathstringYesallowed: generation, optimization, refinement
idpathstringYeslength: 1–191

JSON request body

FieldTypeRequiredRules
titlestringYeslength: 1–180

Responses

200 Success400 401 403 404 429 500
delete/history/{type}/{id}Delete a history item

Required OAuth scopes

history:manage

Parameters

NameLocationTypeRequiredRules
typepathstringYesallowed: generation, optimization, refinement
idpathstringYeslength: 1–191

Responses

200 Success400 401 403 404 429 500
get/library/itemsList Prompt Library items

Required OAuth scopes

library:read

Parameters

NameLocationTypeRequiredRules
scopequerystringNoallowed: my, community, official, saved, upvoted; default: my
queryquerystringNolength: 0–200
categoryquerystringNolength: 0–120
modelsquerystringNoComma-separated model names.
sortquerystringNoallowed: recent, top; default: recent
pagequeryintegerNodefault: 1; range: 1–unlimited
pageSizequeryintegerNodefault: 30; range: 1–30

Responses

200 Success400 401 403 429 500
post/library/itemsCreate a private Prompt Library item

Required OAuth scopes

library:write

JSON request body

FieldTypeRequiredRules
titlestringYeslength: 1–90
promptTextstringYeslength: 1–20000
descriptionstringNolength: 0–400
whatThisPromptDoesstringNolength: 0–1500
tipsForThisPromptstringNolength: 0–1500
howToUsePromptstringNolength: 0–1500
recommendedModelsarray<string>Yesitems: 1–8
categorystringYeslength: 1–120
exampleTextstringNolength: 0–5000
tokenEstimateobjectNo
tokenEstimate.inputintegerNorange: 0–unlimited
tokenEstimate.outputintegerNorange: 0–unlimited
visibilitystringNovalue: private; default: private

Responses

200 Success400 401 403 429 500
get/library/items/{id}Get a Prompt Library item

Required OAuth scopes

library:read

Parameters

NameLocationTypeRequiredRules
idpathstringYeslength: 1–191

Responses

200 Success400 401 403 404 429 500
patch/library/items/{id}Update an owned item

Required OAuth scopes

library:write

Parameters

NameLocationTypeRequiredRules
idpathstringYeslength: 1–191

JSON request body

FieldTypeRequiredRules
titlestringNolength: 1–90
promptTextstringNolength: 1–20000
descriptionstringNolength: 0–400
whatThisPromptDoesstringNolength: 0–1500
tipsForThisPromptstringNolength: 0–1500
howToUsePromptstringNolength: 0–1500
recommendedModelsarray<string>Noitems: 1–8
categorystringNolength: 1–120
exampleTextstringNolength: 0–5000
tokenEstimateobjectNo
tokenEstimate.inputintegerNorange: 0–unlimited
tokenEstimate.outputintegerNorange: 0–unlimited

Responses

200 Success400 401 403 404 409 429 500
delete/library/items/{id}Delete an owned item

Required OAuth scopes

library:write

Parameters

NameLocationTypeRequiredRules
idpathstringYeslength: 1–191

Responses

200 Success400 401 403 404 429 500
post/library/items/{id}/savedToggle saved state

Required OAuth scopes

library:interact

Parameters

NameLocationTypeRequiredRules
idpathstringYeslength: 1–191

Responses

200 Success400 401 403 404 409 429 500
post/library/items/{id}/voteToggle vote

Required OAuth scopes

library:interact

Parameters

NameLocationTypeRequiredRules
idpathstringYeslength: 1–191

Responses

200 Success400 401 403 404 409 429 500
post/library/items/{id}/publishPublish an owned item

Required OAuth scopes

library:publish

Parameters

NameLocationTypeRequiredRules
idpathstringYeslength: 1–191

Responses

200 Success400 401 403 404 409 429 500
delete/library/items/{id}/publishMake an owned item private

Required OAuth scopes

library:publish

Parameters

NameLocationTypeRequiredRules
idpathstringYeslength: 1–191

Responses

200 Success400 401 403 404 429 500
get/webhook-endpointsList webhook endpoints

Required OAuth scopes

webhooks:manage

Responses

200 Success400 401 403 429 500
post/webhook-endpointsCreate an endpoint; secret is returned once

Required OAuth scopes

webhooks:manage

JSON request body

FieldTypeRequiredRules
urlstringYesformat: uri; length: 0–2048; Must be a public HTTPS URL.
descriptionstringNolength: 0–300
eventsarray<string>Yesitems: 1–7

Responses

200 Success400 401 403 409 429 500 503
get/webhook-endpoints/{id}Get a webhook endpoint

Required OAuth scopes

webhooks:manage

Parameters

NameLocationTypeRequiredRules
idpathstringYeslength: 1–191

Responses

200 Success400 401 403 404 429 500
post/webhook-endpoints/{id}Send a webhook.test delivery

Required OAuth scopes

webhooks:manage

Parameters

NameLocationTypeRequiredRules
idpathstringYeslength: 1–191

Responses

200 Success400 401 403 404 429 500 503
patch/webhook-endpoints/{id}Update an endpoint or rotate its secret

Required OAuth scopes

webhooks:manage

Parameters

NameLocationTypeRequiredRules
idpathstringYeslength: 1–191

JSON request body

FieldTypeRequiredRules
urlstringNoformat: uri; length: 0–2048; Must be a public HTTPS URL.
descriptionstringNolength: 0–300
eventsarray<string>Noitems: 1–7
enabledbooleanNo
rotateSecretbooleanNo

Responses

200 Success400 401 403 404 429 500 503
delete/webhook-endpoints/{id}Delete an endpoint

Required OAuth scopes

webhooks:manage

Parameters

NameLocationTypeRequiredRules
idpathstringYeslength: 1–191

Responses

200 Success400 401 403 404 429 500

Authentication

REST accepts a scoped PrompTessor API key or OAuth access token in the Authorization: Bearer … header. MCP uses OAuth only. See Authentication & scopes for the complete lifecycle and scope catalog.

Machine-readable contract

Generate clients, validate payloads, or import the API into your preferred tooling using the canonical OpenAPI JSON document.