API integration
HTTP API for prompt analysis and optimization
Integrate prompt analysis and optimization directly into your applications. Stateless JSON endpoints, no key, nothing stored, and the same engine as every other PromptFlowEngine product.
- Live
- No API key
- 60 requests / minute
What it does
The HTTP API exposes the engine at https://promptflowengine.com/api/v1. You send JSON and get JSON back. There is no sign-up and no key, because the API holds no user data: every response is computed from the request body and then forgotten.
Endpoints cover the whole engine: analyze, validate, optimize, restructure, compare, tokens, scan, and sanitize, plus read-only catalogues of rules and models. Token counts for OpenAI models are exact.
The API is rate limited to 60 POST requests a minute per client. For bulk work or sensitive text, run the same engine locally with the CLI, where there is no network and no limit.
Practical example
One request
A call to the analyze endpoint. The response values shown were computed by the engine when this page was built, for the prompt in the request.
curl -s https://promptflowengine.com/api/v1/analyze \
-H 'content-type: application/json' \
-d '{"prompt":"Write something about our product.","model":"gpt-4.1"}'{
"quality": {
"overall": 84,
"grade": "good"
},
"tokens": {
"tokens": 6,
"method": "exact"
},
"findings": [
{
"code": "vague_language",
"severity": "warning"
},
{
"code": "missing_output_format",
"severity": "info"
},
{
"code": "missing_length_guidance",
"severity": "info"
}
]
}Computed by the engine when this page was built. The full response also includes the message, explanation, and suggested fix for each finding, plus security and requirement details.
Key benefits
Nothing to provision
No account, key rotation, or billing. Open CORS means a browser can call it directly.
Stateless
Prompt text is processed in memory and is never stored or logged.
Typed errors
A consistent error envelope with a type, a message, and a request ID.
Same answers as local
The API runs the same engine version as the workspace and CLI.
Features
POST /analyze
Findings, quality, tokens, security, requirements, and intent.
POST /optimize
The selected candidate, all candidates with verification, changes, and a diff.
POST /restructure
A sectioned prompt with each line labeled as yours or added guidance.
POST /compare
Token, cost, and quality deltas between two prompts.
POST /scan and /sanitize
Injection risk and sensitive-data positions, and redacted text.
GET /rules and /models
The rule catalogue with penalties, and models with reference prices.
Who it is for
- Application developersAdd a prompt check to a backend, a form, or an internal tool with one HTTP call.
- Automation and no-code buildersCall it from a workflow tool or a script without installing anything.
- Teams prototypingTry the engine from curl before deciding whether to embed the package.
Use cases
- 01
Validate user-written prompts
Check prompts that users save in your product and show them the findings.
- 02
Pre-flight in a pipeline
Scan text for secrets before a job sends it to a model provider.
- 03
Token estimates in a UI
Show an exact token count and estimated cost next to a prompt editor.
- 04
Server-side restructuring
Turn short user requests into structured prompts before calling your model.
Frequently asked questions
Do I need an API key?
No. The API takes no key, token, or cookie. Abuse is limited by a rate limit of 60 POST requests a minute per client IP.
Is my prompt stored or logged?
No. Requests are processed in memory. Logs record the route, status, duration, and a size bucket, never prompt text or results.
Can I call the API from a browser?
Yes. CORS is open without credentials, so front-end code can call it directly.
What are the size limits?
The request body can be up to 256 KB, and each text field up to 100,000 characters.
Related PromptFlowEngine capabilities
Every product runs the same engine, so they combine without surprises.
- IntegrationMCPConnect PromptFlowEngine with AI agents and MCP-compatible workflows.
- ToolPrompt TestingA CI gate for prompt files: quality bar, token budget, and severity threshold.
- ToolPrompt AnalyzerFind ambiguity, missing context, conflicts, and wasted tokens in any prompt.
- DocumentationHTTP API referenceReference and setup details.
- DocumentationCLI for local and bulk useReference and setup details.
Learn the technique behind it
Guides from the prompt engineering knowledge center that explain the ideas this product applies.
- GuidePrompt engineering for developersCoding prompts that produce correct changes, and how to treat production prompts as code.
- GuideToken optimization: cost, context windows, and compressionHow tokens and context windows work, how to count them, and how to cut them safely.
- GuidePrompt management and versioningStoring, versioning, reviewing, testing, and rolling out prompts as a team.
One engine, wherever you work with AI.
Free, deterministic, and private. No sign-up.