Prompt Formatter
Clean up messy prompts via a plain REST endpoint.
POST /api/v1/format-prompt reorganizes a messy, unstructured prompt into clean semantic sections — a system role, the task, constraints, and the expected output format — without adding or dropping any of your actual instructions.
Request
bash
curl -X POST https://cuelara.com/api/v1/format-prompt \-H "Content-Type: application/json" \-H "Authorization: Bearer YOUR_TOKEN_HERE" \-d '{"text": "write a blog post about coffee, friendly tone, under 500 words, no emojis","format": "Markdown (Standard)","indent": "2 Spaces"}'
The Authorization header is optional — omit it to call anonymously (lower rate limit). Get a token from /dashboard/mcp.
Body
text(string, required, up to 20,000 characters) — the prompt to reorganize.format(string, optional) —"Markdown (Standard)"(default),"XML (Claude-Optimized)", or"JSON (API Ready)".indent(string, optional) —"2 Spaces"(default),"4 Spaces", or"Tabs". Only applies to the JSON format.
Response
json
{ "formatted": "### System Role\nYou are a friendly blog writer...\n\n### Task\n..." }
Errors
400 invalid body, 401 invalid token, 429 rate limit, 502/503/504 upstream AI failure — each returns { "error": "..." }.
Limits
Anonymous calls share the same free daily limit as the website's Prompt Formatter, keyed by IP. Signed-in calls use your own account's plan limits instead. See the API overview for auth and CORS details.