Open-Use Endpoints

AI Output Utilities

The plumbing every AI app eventually needs but nobody talks about. Stateless helper endpoints for cleaning up LLM-generated output - fixing busted JSON, stripping the AI tells from text, naturalising robotic wording. Free with any Qai key.

?

Why we built these

If you've shipped an LLM feature, you've had these two debugging days. Morning one: the model returned JSON wrapped in triple backticks and your parser exploded. Morning two: a customer flagged that the auto-generated email "sounded like AI" — em dashes, smart quotes, the word "delve" three times in one paragraph.

These utilities fix those problems as standalone endpoints. No need to spend tokens cleaning up another model's output. String in, sanitised string out.

Stateless No LLM tokens consumed Free with any Qai key Sub-100ms typical latency Returns what it changed
{}

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...", ...]
A

Which one do I need?

Quick guide to picking the right utility for a problem.

B

How is this billed?

Utilities are free with any Qai API key. They do not consume LLM tokens (except in the optional naturalizeWording: true mode of Humanize Text, which routes through a small text model to do the rephrasing). You can call them as often as your account-wide rate limit allows.

Why free? Because making you pay LLM tokens to fix LLM output would be obnoxious. We absorb the regex and the small naturalisation calls as part of being a good citizen of the AI stack.

C

FAQ

Q. Can I use these without signing up?

No. You need a free Qai account so we can rate-limit per key. Signup is two minutes.

Q. Do these utilities work with output from other providers (OpenAI, Anthropic, etc.)?

Yes. The input is just a string. We do not care which model produced it.

Q. What if Clean JSON cannot recover valid JSON from my input?

You get a 200 response with success: false and a list of every fix it tried. No exception thrown - your app stays in control of the fallback.

Q. Can I propose a new utility?

Please do. Email hi@quickcasa.ai with the use case. We are actively adding new ones - the bar is "I have hit this problem more than twice in my own builds."

Q. What is on the utility roadmap?

PII redaction, code fence extraction, markdown to plain text, plain text to safe HTML, sentiment scoring, language detection, basic moderation. All same shape: in goes a string, out comes a transformed string plus a record of what changed.