AVAILABLE

Developer Tools

Agent JSON Repair & Validation

Bounded JSON repair, extraction, schema validation, and stable hashing for AI agents, APIs, logs, and integration workflows.

CONTRACT

Predictable for agents. Legible for reviewers.

REST
POST /v1/json/repair
MCP tool
repair_json
Inputs
Up to 256 KiB of JSON-like text, one JSON value plus a caller-supplied schema, or one already-parsed JSON value depending on the operation.
Returns
A typed result with explicit repair status, canonical JSON, hashes or JSON Pointer validation errors, warnings, and a next action.
Latency
Synchronous
Usage unit
JSON operation

The focused suite also exposes /v1/json/extract, /v1/json/validate, and /v1/json/canonicalize plus the separate /mcp/json server. Payloads are not stored, remote schema references are disabled, and the stable encoding makes no RFC 8785 claim.

AGENT-READABLE EXCEPTIONS

DUPLICATE_JSON_KEYJSON_REPAIR_FAILEDREMOTE_SCHEMA_REFERENCE_DISABLEDINVALID_JSON_SCHEMAMULTIPLE_JSON_VALUESJSON_TOO_DEEP
HTTP request
POST /v1/json/repair
Authorization: Bearer apc_...
Content-Type: application/json

{
  "text": "```json\\n{'customer':'Ada','items':[1,2,],}\\n```",
  "expected_top_level": "OBJECT"
}
cURL (bash)
curl --request POST \
  --url 'https://api-production-9502.up.railway.app/v1/json/repair' \
  --header 'Authorization: Bearer ${AP_CONTROL_API_KEY}' \
  --header 'Content-Type: application/json' \
  --data '{
  "text": "```json\\n{'customer':'Ada','items':[1,2,],}\\n```",
  "expected_top_level": "OBJECT"
}'
Representative response
{
  "status": "COMPLETED",
  "repaired": true,
  "value": {
    "customer": "Ada",
    "items": [
      1,
      2
    ]
  },
  "canonical_json": "{\"customer\":\"Ada\",\"items\":[1,2]}",
  "top_level_type": "object",
  "source_sha256": "3dd6...",
  "result_sha256": "50bc...",
  "warnings": [
    "The input was structurally repaired. Review the result before using it for a consequential action."
  ],
  "next_action": "Compare the repaired value with the intended structure before continuing."
}
Explicit repair stateStrict inputs pass unchanged; repaired values carry warnings and a review action.
Stateless and boundedPayloads are not stored, and byte, depth, output, and complexity limits are enforced.
No execution or fetchingSupplied code is never run and remote or file schema references are disabled.

Use Agent JSON Repair & Validation through RapidAPI.

Choose a capped marketplace plan, copy the generated request, and route the structured result through your own authorized workflow.