typetext
{
"text": "{ \"data\": oh no this is not json\", \"or this\": ok, }"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_en0**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run intelligent-utilities/repair-json using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
text: "{ \"data\": oh no this is not json\", \"or this\": ok, }"
};
const output = await replicate.run("intelligent-utilities/repair-json", { input });
console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_en0**********************************
This is your API token. Keep it to yourself.
import replicate
Run intelligent-utilities/repair-json using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"intelligent-utilities/repair-json",
input={
"text": "{ \"data\": oh no this is not json\", \"or this\": ok, }"
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_en0**********************************
This is your API token. Keep it to yourself.
Run intelligent-utilities/repair-json using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"input": {
"text": "{ \\"data\\": oh no this is not json\\", \\"or this\\": ok, }"
}
}' \
https://api.replicate.com/v1/models/intelligent-utilities/repair-json/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "asbg7y15fsrm80crnaarxy5wsc",
"model": "intelligent-utilities/repair-json",
"version": "hidden",
"input": {
"text": "{ \"data\": oh no this is not json\", \"or this\": ok, }"
},
"logs": "",
"output": {
"data": "oh no this is not json",
"or this": "ok"
},
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-08-14T21:55:57.95Z",
"started_at": "2025-08-14T21:55:58.243209Z",
"completed_at": "2025-08-14T21:56:00.183799Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/asbg7y15fsrm80crnaarxy5wsc/cancel",
"children": "https://api.replicate.com/v1/predictions/asbg7y15fsrm80crnaarxy5wsc/children",
"get": "https://api.replicate.com/v1/predictions/asbg7y15fsrm80crnaarxy5wsc",
"root": "https://api.replicate.com/v1/predictions/asbg7y15fsrm80crnaarxy5wsc",
"web": "https://replicate.com/p/asbg7y15fsrm80crnaarxy5wsc"
},
"metrics": {
"predict_time": 1.940590044,
"total_time": 2.233799
}
}