LLM
Fix JSON punctuation API
Focused JSON syntax fixer for the most common LLM mistakes only — trailing commas, single quotes to double quotes, and unquoted object keys — without stripping prose or closing truncation; use when you trust the structure but not the punctuation. Answers 'how do I fix single quotes and trailing commas in this JSON?', 'why won't this nearly-valid JSON parse?'.
Price$0.02per request
MethodPOST
Route/v1/llm/fix-json-syntax
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
llmjsonfixtrailing-commasingle-quotessyntaxpunctuationagent
API URL
Integration docshttps://x402.hexl.dev/v1/llm/fix-json-syntaxExample request
{
"text": "{'a': 1, 'b': [2,3,],}"
}Example response
{
"fixed": "{\"a\": 1, \"b\": [2,3]}",
"ok": true,
"changes": [
"single-to-double-quotes",
"removed-trailing-commas"
]
}Input schema
{
"type": "object",
"required": [
"text"
],
"properties": {
"text": {
"type": "string",
"examples": [
"{'a': 1, 'b': [2,3,],}"
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}