typefile
{
"image": "https://replicate.delivery/pbxt/MgRQMM6Jd3M5C4p1Xgyrj9Eg9TjmbVdspQLjLs97Tbzehv24/example_4.jpg",
"return_probabilities": false,
"use_rotation_averaging": false
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_4MN**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run grace-raper/resnet-rot using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"grace-raper/resnet-rot:349fc7e1ff0f308ca33aecab35219b2f25ef0053565bcbe9a9cfeeed01a865bc",
{
input: {
image: "https://replicate.delivery/pbxt/MgRQMM6Jd3M5C4p1Xgyrj9Eg9TjmbVdspQLjLs97Tbzehv24/example_4.jpg",
return_probabilities: false,
use_rotation_averaging: false
}
}
);
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_4MN**********************************
This is your API token. Keep it to yourself.
import replicate
Run grace-raper/resnet-rot using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"grace-raper/resnet-rot:349fc7e1ff0f308ca33aecab35219b2f25ef0053565bcbe9a9cfeeed01a865bc",
input={
"image": "https://replicate.delivery/pbxt/MgRQMM6Jd3M5C4p1Xgyrj9Eg9TjmbVdspQLjLs97Tbzehv24/example_4.jpg",
"return_probabilities": False,
"use_rotation_averaging": False
}
)
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_4MN**********************************
This is your API token. Keep it to yourself.
Run grace-raper/resnet-rot 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": "grace-raper/resnet-rot:349fc7e1ff0f308ca33aecab35219b2f25ef0053565bcbe9a9cfeeed01a865bc",
"input": {
"image": "https://replicate.delivery/pbxt/MgRQMM6Jd3M5C4p1Xgyrj9Eg9TjmbVdspQLjLs97Tbzehv24/example_4.jpg",
"return_probabilities": false,
"use_rotation_averaging": false
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "ejpw4rr6nsrme0cnnet8yyheaw",
"model": "grace-raper/resnet-rot",
"version": "349fc7e1ff0f308ca33aecab35219b2f25ef0053565bcbe9a9cfeeed01a865bc",
"input": {
"image": "https://replicate.delivery/pbxt/MgRQMM6Jd3M5C4p1Xgyrj9Eg9TjmbVdspQLjLs97Tbzehv24/example_4.jpg",
"return_probabilities": false,
"use_rotation_averaging": false
},
"logs": "Processing image: /tmp/tmpsuy187htexample_4.jpg",
"output": {
"best_angle": 0
},
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-03-19T00:00:57.006Z",
"started_at": "2025-03-19T00:00:57.012651Z",
"completed_at": "2025-03-19T00:01:00.112446Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/ejpw4rr6nsrme0cnnet8yyheaw/cancel",
"get": "https://api.replicate.com/v1/predictions/ejpw4rr6nsrme0cnnet8yyheaw",
"web": "https://replicate.com/p/ejpw4rr6nsrme0cnnet8yyheaw"
},
"metrics": {
"predict_time": 3.099794976,
"total_time": 3.106446
}
}