defaultBig robot in a empty modern city
typetext
{
"prompt": "Big robot in a empty modern city"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_E2H**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run zelenioncode/uiai using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"zelenioncode/uiai:74be7b900ab0195aa5f01771cb8a1b5cdf6a7a5940e906da6a72ba571db494c8",
{
input: {
prompt: "Big robot in a empty modern city"
}
}
);
// To access the file URL:
console.log(output.url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", 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_E2H**********************************
This is your API token. Keep it to yourself.
import replicate
Run zelenioncode/uiai using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"zelenioncode/uiai:74be7b900ab0195aa5f01771cb8a1b5cdf6a7a5940e906da6a72ba571db494c8",
input={
"prompt": "Big robot in a empty modern city"
}
)
# To access the file URL:
print(output.url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_E2H**********************************
This is your API token. Keep it to yourself.
Run zelenioncode/uiai 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": "zelenioncode/uiai:74be7b900ab0195aa5f01771cb8a1b5cdf6a7a5940e906da6a72ba571db494c8",
"input": {
"prompt": "Big robot in a empty modern city"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "2ogqqelbduxsv3pvqvheo4thoa",
"model": "zelenioncode/uiai",
"version": "74be7b900ab0195aa5f01771cb8a1b5cdf6a7a5940e906da6a72ba571db494c8",
"input": {
"prompt": "Big robot in a empty modern city"
},
"logs": "Start create your picture...\nYour picture is ready\n/src\n['__pycache__', 'SD_UI', 'output_img2img_1.png', '.DS_Store', '.cog', '.dockerignore', 'cog.yaml', 'make_api.py', 'predict.py', 't.json']",
"output": "https://replicate.delivery/pbxt/lJaSx1RqDQbgONayNUTVlLfmwUgDdfkfrqFutGOfyKXQfMsSC/output_img2img_1.png",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-02-11T06:19:22.580299Z",
"started_at": "2024-02-11T06:23:39.432696Z",
"completed_at": "2024-02-11T06:23:50.187221Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/2ogqqelbduxsv3pvqvheo4thoa/cancel",
"get": "https://api.replicate.com/v1/predictions/2ogqqelbduxsv3pvqvheo4thoa"
},
"metrics": {
"predict_time": 10.754525,
"total_time": 267.606922
}
}