Stateless helper endpoints for cleaning up LLM-generated output. Fix busted JSON, strip AI typography quirks, naturalize robotic wording. More utilities coming soon.
LLMs love wrapping JSON in markdown fences, prefixing it with "Here you go!", and sprinkling in trailing commas. This endpoint takes a raw string and recovers valid JSON from the mess. It progressively applies fixes until it gets a clean parse, and tells you exactly what it corrected.
curl -X POST https://llm.quickcasa.ai/v1/utilities/clean-json \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_KEY" \ -d '{ "input": "```json\n{\"name\": \"Pat\", \"role\": \"CTO\",}\n```" }'
const response = await fetch('https://llm.quickcasa.ai/v1/utilities/clean-json', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_KEY', }, body: JSON.stringify({ input: '```json\n{"name": "Pat", "role": "CTO",}\n```', }), }); const { data, corrections } = await response.json(); console.log(data); // { name: "Pat", role: "CTO" } console.log(corrections); // ["Removed markdown code fences", "Removed trailing commas"]
import requests response = requests.post( "https://llm.quickcasa.ai/v1/utilities/clean-json", headers={ "Content-Type": "application/json", "Authorization": "Bearer YOUR_API_KEY", }, json={ "input": '```json\n{"name": "Pat", "role": "CTO",}\n```', }, ) result = response.json() print(result["data"]) # {"name": "Pat", "role": "CTO"} print(result["corrections"]) # ["Removed markdown code fences", "Removed trailing commas"]
$ch = curl_init('https://llm.quickcasa.ai/v1/utilities/clean-json'); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_HTTPHEADER => [ 'Content-Type: application/json', 'Authorization: Bearer YOUR_API_KEY', ], CURLOPT_POSTFIELDS => json_encode([ 'input' => '```json\n{"name": "Pat", "role": "CTO",}\n```', ]), ]); $result = json_decode(curl_exec($ch), true); curl_close($ch); print_r($result['data']); // ["name" => "Pat", "role" => "CTO"] print_r($result['corrections']); // ["Removed markdown code fences", "Removed trailing commas"]
LLMs have a distinct typographic fingerprint: em dashes, curly quotes, fancy ellipses, exotic whitespace characters. This endpoint strips all of that out and replaces it with plain, human-typed equivalents. Optionally, pass naturalizeWording: true to run the text through a lightweight LLM that detects and rephrases AI-sounding wording without changing the meaning.
curl -X POST https://llm.quickcasa.ai/v1/utilities/humanize-text \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_KEY" \ -d '{ "input": "It\u2019s important to note that this feature \u2014 which leverages cutting-edge technology \u2014 will transform your workflow.", "naturalizeWording": true }'
const response = await fetch('https://llm.quickcasa.ai/v1/utilities/humanize-text', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_KEY', }, body: JSON.stringify({ input: 'It’s important to note that this feature — which leverages cutting-edge technology — will transform your workflow.', naturalizeWording: true, }), }); const { text, corrections, naturalized } = await response.json(); console.log(text); // cleaned + rephrased text console.log(naturalized); // true (wording was rephrased) console.log(corrections); // ["Replaced curly single quotes...", "Replaced em dashes...", ...]
import requests response = requests.post( "https://llm.quickcasa.ai/v1/utilities/humanize-text", headers={ "Content-Type": "application/json", "Authorization": "Bearer YOUR_API_KEY", }, json={ "input": "It’s important to note that this feature — which leverages cutting-edge technology — will transform your workflow.", "naturalizeWording": True, }, ) result = response.json() print(result["text"]) # cleaned + rephrased text print(result["naturalized"]) # True (wording was rephrased) print(result["corrections"]) # ["Replaced curly single quotes...", "Replaced em dashes...", ...]
$ch = curl_init('https://llm.quickcasa.ai/v1/utilities/humanize-text'); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_HTTPHEADER => [ 'Content-Type: application/json', 'Authorization: Bearer YOUR_API_KEY', ], CURLOPT_POSTFIELDS => json_encode([ 'input' => "It’s important to note that this feature — which leverages cutting-edge technology — will transform your workflow.", 'naturalizeWording' => true, ]), ]); $result = json_decode(curl_exec($ch), true); curl_close($ch); echo $result['text']; // cleaned + rephrased text echo $result['naturalized']; // true print_r($result['corrections']); // ["Replaced curly single quotes...", ...]