defaultHighly detailed photograph of darth vader. artstation
typetext
{
"num_outputs": 6,
"prompt": "Highly detailed photograph of darth vader. artstation"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_9yF**********************************
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 arielreplicate/paella_fast_text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"arielreplicate/paella_fast_text2image:481ea32fad34b0df3b74151c74e7572f7759d9712bbea169b4a75fba780324da",
{
input: {
num_outputs: 6,
prompt: "Highly detailed photograph of darth vader. artstation"
}
}
);
// 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=r8_9yF**********************************
This is your API token. Keep it to yourself.
import replicate
Run arielreplicate/paella_fast_text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"arielreplicate/paella_fast_text2image:481ea32fad34b0df3b74151c74e7572f7759d9712bbea169b4a75fba780324da",
input={
"num_outputs": 6,
"prompt": "Highly detailed photograph of darth vader. artstation"
}
)
# To access the file URL:
print(output[0].url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output[0].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_9yF**********************************
This is your API token. Keep it to yourself.
Run arielreplicate/paella_fast_text2image 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": "arielreplicate/paella_fast_text2image:481ea32fad34b0df3b74151c74e7572f7759d9712bbea169b4a75fba780324da",
"input": {
"num_outputs": 6,
"prompt": "Highly detailed photograph of darth vader. artstation"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "7xzx3qr3snh5dfppuz6bm5fisu",
"model": "arielreplicate/paella_fast_text2image",
"version": "481ea32fad34b0df3b74151c74e7572f7759d9712bbea169b4a75fba780324da",
"input": {
"num_outputs": 6,
"prompt": "Highly detailed photograph of darth vader. artstation"
},
"logs": "2.9098408222198486",
"output": [
"https://replicate.delivery/pbxt/ZRtsJWC8Mu4RI5uKqslp5xB9hPuoWQhXkb8EIc4e2fzgLpFQA/output-0.png",
"https://replicate.delivery/pbxt/LpFhYy3frd0dUKYB6BkABLpufhkfppVEsrjxuA9JNYiBXSLgA/output-1.png",
"https://replicate.delivery/pbxt/8c5RwCzfTPU9NCuJ6BpzPwTl7nSSLNpYAao2vVIoB7ehLpFQA/output-2.png",
"https://replicate.delivery/pbxt/4spLStsZkDIBIdfZHDnowIeRxSExWeUcPZj8JoDQxyDCXSLgA/output-3.png",
"https://replicate.delivery/pbxt/1SIc3HiUFrpJOtLCx4i7DfrfxjtK290QPferhY1ImzFHukWAB/output-4.png",
"https://replicate.delivery/pbxt/InRmxpRRoAJ3EVMyIvM0LlUeJrZFYR2tLPrnRNBWZ8qwl0CIA/output-5.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2022-12-01T17:14:04.625886Z",
"started_at": "2022-12-01T17:14:04.655788Z",
"completed_at": "2022-12-01T17:14:09.915856Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/7xzx3qr3snh5dfppuz6bm5fisu/cancel",
"get": "https://api.replicate.com/v1/predictions/7xzx3qr3snh5dfppuz6bm5fisu"
},
"metrics": {
"predict_time": 5.260068,
"total_time": 5.28997
}
}




