Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
vetkastar /image-slicing:800ef40b
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run vetkastar/image-slicing using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"vetkastar/image-slicing:800ef40b9592ba76f8e0ecae5c07e976b5cf415f092d35e47e3befc9c78732f5",
{
input: {
image: "https://replicate.delivery/pbxt/Lm1OaJ4R1SgY91F5hYMuziHGsPGadPbMH4Q2i2omGQvAmNb6/000a2d38183e668676f04f0cefe3606b.png",
return_zip: false,
output_format: "png"
}
}
);
// To access the file URL:
console.log(output[0].url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output[0]);
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=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run vetkastar/image-slicing using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"vetkastar/image-slicing:800ef40b9592ba76f8e0ecae5c07e976b5cf415f092d35e47e3befc9c78732f5",
input={
"image": "https://replicate.delivery/pbxt/Lm1OaJ4R1SgY91F5hYMuziHGsPGadPbMH4Q2i2omGQvAmNb6/000a2d38183e668676f04f0cefe3606b.png",
"return_zip": False,
"output_format": "png"
}
)
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=<paste-your-token-here>
Find your API token in your account settings.
Run vetkastar/image-slicing 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 $'{
"version": "vetkastar/image-slicing:800ef40b9592ba76f8e0ecae5c07e976b5cf415f092d35e47e3befc9c78732f5",
"input": {
"image": "https://replicate.delivery/pbxt/Lm1OaJ4R1SgY91F5hYMuziHGsPGadPbMH4Q2i2omGQvAmNb6/000a2d38183e668676f04f0cefe3606b.png",
"return_zip": false,
"output_format": "png"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{
"completed_at": "2024-10-11T01:15:22.192306Z",
"created_at": "2024-10-11T01:14:55.492000Z",
"data_removed": false,
"error": null,
"id": "tbbrv1wwghrge0cjf4j9fr6b50",
"input": {
"image": "https://replicate.delivery/pbxt/Lm1OaJ4R1SgY91F5hYMuziHGsPGadPbMH4Q2i2omGQvAmNb6/000a2d38183e668676f04f0cefe3606b.png",
"return_zip": false,
"output_format": "png"
},
"logs": null,
"metrics": {
"predict_time": 3.628468571,
"total_time": 26.700306
},
"output": [
"https://replicate.delivery/czjl/PuMyhLQ0K94sJ5sGMIi4FzpZUIes2sJjMfEcewcov0MTxFLnA/tmpiaxghr2x000a2d38183e668676f04f0cefe3606b_1.png",
"https://replicate.delivery/czjl/szYvAL7BfWV7Hqnyz4VgvqnyjSrefIfNESsbN2G6FGTmiLWOB/tmpiaxghr2x000a2d38183e668676f04f0cefe3606b_2.png",
"https://replicate.delivery/czjl/Fc7NvEnzsnopIVhl9CAnTtQrsqyyOT3LN6cBvzzxy2aKuY5E/tmpiaxghr2x000a2d38183e668676f04f0cefe3606b_3.png",
"https://replicate.delivery/czjl/JDjimNYImfw8Cqf2P8qaFz5im3G8YKaKAbblVe9QTJBVxFLnA/tmpiaxghr2x000a2d38183e668676f04f0cefe3606b_4.png"
],
"started_at": "2024-10-11T01:15:18.563837Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/tbbrv1wwghrge0cjf4j9fr6b50",
"cancel": "https://api.replicate.com/v1/predictions/tbbrv1wwghrge0cjf4j9fr6b50/cancel"
},
"version": "800ef40b9592ba76f8e0ecae5c07e976b5cf415f092d35e47e3befc9c78732f5"
}