API overview

Prompt Optimizer

Structure rough ideas via a plain REST endpoint.

POST /api/v1/optimize-prompt turns a rough, messy request into a complete, structured, ready-to-paste prompt — adds role anchoring, explicit steps, negative constraints, and an output format tailored to the mode you pick.

Request

bash
curl -X POST https://cuelara.com/api/v1/optimize-prompt \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-d '{
"text": "build me a login page",
"mode": "Coding",
"level": "Detailed"
}'

The Authorization header is optional — omit it to call anonymously (lower rate limit). Get a token from /dashboard/mcp.

Body

  • text (string, required) — the rough idea or request to turn into a full prompt.
  • mode (string, optional) — "General" (default), "Coding", "Writing", "Business", or "Research".
  • level (string, optional) — "Concise", "Balanced" (default), "Detailed", or "Comprehensive".

Response

json
{ "optimized": "### ROLE\nYou are a Senior Frontend Engineer...\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 Optimizer, keyed by IP. Signed-in calls use your own account's plan limits instead. See the API overview for auth and CORS details.