typefile
{
"image": "https://replicate.delivery/mgxm/aea56c1a-0ae7-447e-a772-e036e44f66fc/10045.png"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_bkQ**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run tencentarc/vqfr using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"tencentarc/vqfr:f9085ea5bf9c8f2d7e5c64564234ab41b5bcd8cd61a58b59a3dde5cbb487721a",
{
input: {
image: "https://replicate.delivery/mgxm/aea56c1a-0ae7-447e-a772-e036e44f66fc/10045.png"
}
}
);
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_bkQ**********************************
This is your API token. Keep it to yourself.
import replicate
Run tencentarc/vqfr using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"tencentarc/vqfr:f9085ea5bf9c8f2d7e5c64564234ab41b5bcd8cd61a58b59a3dde5cbb487721a",
input={
"image": "https://replicate.delivery/mgxm/aea56c1a-0ae7-447e-a772-e036e44f66fc/10045.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=r8_bkQ**********************************
This is your API token. Keep it to yourself.
Run tencentarc/vqfr 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": "tencentarc/vqfr:f9085ea5bf9c8f2d7e5c64564234ab41b5bcd8cd61a58b59a3dde5cbb487721a",
"input": {
"image": "https://replicate.delivery/mgxm/aea56c1a-0ae7-447e-a772-e036e44f66fc/10045.png"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "crkshxhwozasto77ojlwtjgadm",
"model": "tencentarc/vqfr",
"version": "f9085ea5bf9c8f2d7e5c64564234ab41b5bcd8cd61a58b59a3dde5cbb487721a",
"input": {
"image": "https://replicate.delivery/mgxm/aea56c1a-0ae7-447e-a772-e036e44f66fc/10045.png"
},
"logs": "\tTile 1/6\n\tTile 2/6\n\tTile 3/6\n\tTile 4/6\n\tTile 5/6\n\tTile 6/6",
"output": [
{
"image": "https://replicate.delivery/mgxm/b5a08f7f-6653-45a5-a7f1-ff45e7abacd2/output_0.png"
},
{
"image": "https://replicate.delivery/mgxm/940751d5-01e2-4b78-a553-c75a4f3465a3/output_1.png"
},
{
"image": "https://replicate.delivery/mgxm/f9d3a224-8a76-42d4-a42e-d2b3282fe5c0/output_2.png"
},
{
"image": "https://replicate.delivery/mgxm/1efed0ec-ff65-45bf-81a3-77018c870485/output.png"
}
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2022-08-01T18:00:54.512944Z",
"started_at": "2022-08-01T18:01:52.228167Z",
"completed_at": "2022-08-01T18:02:00.056658Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/crkshxhwozasto77ojlwtjgadm/cancel",
"get": "https://api.replicate.com/v1/predictions/crkshxhwozasto77ojlwtjgadm"
},
"metrics": {
"predict_time": 7.828491,
"total_time": 65.543714
}
}