Open-Use Endpoints

AI Output Utilities

Stateless helper endpoints for cleaning up LLM-generated output. Fix busted JSON, strip AI typography quirks, naturalize robotic wording. More utilities coming soon.

{}

Clean JSON

POST /v1/utilities/clean-json

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.

Markdown fence removal Preamble stripping Trailing commas Single-quoted strings Unquoted keys Python True/False/None JS comments Control characters Unescaped newlines
Quick Start
cURL
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```"
  }'
JavaScript
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"]
Python
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"]
PHP
$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"]
Aa

Humanize Text

POST /v1/utilities/humanize-text

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.

Em/en dash cleanup Curly quote removal Ellipsis normalization Exotic whitespace Zero-width characters Fancy arrows Bullet normalization Multi-space collapse LLM wording detection Natural rephrasing
Option Set naturalizeWording: true to enable the two-step LLM pipeline. First it detects whether the text sounds AI-generated, then rephrases it if needed. Typography cleanup always runs regardless.
Quick Start
cURL
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
  }'
JavaScript
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...", ...]
Python
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...", ...]
PHP
$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...", ...]