typetext
{
"aspect_ratio": "1:1",
"cfg": 4.5,
"output_format": "webp",
"output_quality": 90,
"prompt": "a claymation dinosaur with a giant taco in its mouth, set against a bright and colorful background. Holding a sign that says 'Eat Moar Tacos'",
"prompt_strength": 0.85,
"steps": 40
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_fTF**********************************
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 stability-ai/stable-diffusion-3.5-large using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
aspect_ratio: "1:1",
cfg: 4.5,
output_format: "webp",
output_quality: 90,
prompt: "a claymation dinosaur with a giant taco in its mouth, set against a bright and colorful background. Holding a sign that says 'Eat Moar Tacos'",
prompt_strength: 0.85,
steps: 40
};
const output = await replicate.run("stability-ai/stable-diffusion-3.5-large", { input });
// 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_fTF**********************************
This is your API token. Keep it to yourself.
import replicate
Run stability-ai/stable-diffusion-3.5-large using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"stability-ai/stable-diffusion-3.5-large",
input={
"aspect_ratio": "1:1",
"cfg": 4.5,
"output_format": "webp",
"output_quality": 90,
"prompt": "a claymation dinosaur with a giant taco in its mouth, set against a bright and colorful background. Holding a sign that says 'Eat Moar Tacos'",
"prompt_strength": 0.85,
"steps": 40
}
)
# 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_fTF**********************************
This is your API token. Keep it to yourself.
Run stability-ai/stable-diffusion-3.5-large 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 $'{
"input": {
"aspect_ratio": "1:1",
"cfg": 4.5,
"output_format": "webp",
"output_quality": 90,
"prompt": "a claymation dinosaur with a giant taco in its mouth, set against a bright and colorful background. Holding a sign that says \'Eat Moar Tacos\'",
"prompt_strength": 0.85,
"steps": 40
}
}' \
https://api.replicate.com/v1/models/stability-ai/stable-diffusion-3.5-large/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "e1gp2tmm71rm40cjvdtvgjfaj4",
"model": "stability-ai/stable-diffusion-3.5-large",
"version": "hidden",
"input": {
"aspect_ratio": "1:1",
"cfg": 4.5,
"output_format": "webp",
"output_quality": 90,
"prompt": "a claymation dinosaur with a giant taco in its mouth, set against a bright and colorful background. Holding a sign that says 'Eat Moar Tacos'",
"prompt_strength": 0.85,
"steps": 40
},
"logs": "Seed set to: 2032196349\nRunning workflow\ngot prompt\nExecuting node 294, title: KSampler, class type: KSampler\n0%| | 0/40 [00:00<?, ?it/s]\n2%|▎ | 1/40 [00:00<00:05, 7.43it/s]\n5%|▌ | 2/40 [00:00<00:08, 4.58it/s]\n8%|▊ | 3/40 [00:00<00:07, 4.68it/s]\n10%|█ | 4/40 [00:00<00:07, 4.75it/s]\n12%|█▎ | 5/40 [00:01<00:07, 4.78it/s]\n15%|█▌ | 6/40 [00:01<00:07, 4.81it/s]\n18%|█▊ | 7/40 [00:01<00:06, 4.83it/s]\n20%|██ | 8/40 [00:01<00:06, 4.84it/s]\n22%|██▎ | 9/40 [00:01<00:06, 4.84it/s]\n25%|██▌ | 10/40 [00:02<00:06, 4.85it/s]\n28%|██▊ | 11/40 [00:02<00:05, 4.86it/s]\n30%|███ | 12/40 [00:02<00:05, 4.86it/s]\n32%|███▎ | 13/40 [00:02<00:05, 4.85it/s]\n35%|███▌ | 14/40 [00:02<00:05, 4.85it/s]\n38%|███▊ | 15/40 [00:03<00:05, 4.85it/s]\n40%|████ | 16/40 [00:03<00:04, 4.84it/s]\n42%|████▎ | 17/40 [00:03<00:04, 4.85it/s]\n45%|████▌ | 18/40 [00:03<00:04, 4.85it/s]\n48%|████▊ | 19/40 [00:03<00:04, 4.86it/s]\n50%|█████ | 20/40 [00:04<00:04, 4.86it/s]\n52%|█████▎ | 21/40 [00:04<00:03, 4.86it/s]\n55%|█████▌ | 22/40 [00:04<00:03, 4.86it/s]\n57%|█████▊ | 23/40 [00:04<00:03, 4.87it/s]\n60%|██████ | 24/40 [00:04<00:03, 4.87it/s]\n62%|██████▎ | 25/40 [00:05<00:03, 4.87it/s]\n65%|██████▌ | 26/40 [00:05<00:02, 4.87it/s]\n68%|██████▊ | 27/40 [00:05<00:02, 4.87it/s]\n70%|███████ | 28/40 [00:05<00:02, 4.87it/s]\n72%|███████▎ | 29/40 [00:05<00:02, 4.87it/s]\n75%|███████▌ | 30/40 [00:06<00:02, 4.87it/s]\n78%|███████▊ | 31/40 [00:06<00:01, 4.87it/s]\n80%|████████ | 32/40 [00:06<00:01, 4.87it/s]\n82%|████████▎ | 33/40 [00:06<00:01, 4.87it/s]\n85%|████████▌ | 34/40 [00:06<00:01, 4.87it/s]\n88%|████████▊ | 35/40 [00:07<00:01, 4.87it/s]\n90%|█████████ | 36/40 [00:07<00:00, 4.87it/s]\n92%|█████████▎| 37/40 [00:07<00:00, 4.87it/s]\n95%|█████████▌| 38/40 [00:07<00:00, 4.87it/s]\n98%|█████████▊| 39/40 [00:08<00:00, 4.88it/s]\n100%|██████████| 40/40 [00:08<00:00, 4.88it/s]\n100%|██████████| 40/40 [00:08<00:00, 4.86it/s]\nExecuting node 8, title: VAE Decode, class type: VAEDecode\nExecuting node 309, title: Save Image, class type: SaveImage\nPrompt executed in 8.53 seconds\noutputs: {'309': {'images': [{'filename': 'R8_sd3.5L_00001_.png', 'subfolder': '', 'type': 'output'}]}}\n====================================\nR8_sd3.5L_00001_.png",
"output": [
"https://replicate.delivery/yhqm/Ybc2g49y4GJnOFGffi8aRhiBI5tztOFTlTjj4RWJSv8Zl1rTA/R8_sd3.5L_00001_.webp"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-10-30T03:26:08.952Z",
"started_at": "2024-10-30T03:26:08.956068Z",
"completed_at": "2024-10-30T03:26:17.812852Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/e1gp2tmm71rm40cjvdtvgjfaj4/cancel",
"get": "https://api.replicate.com/v1/predictions/e1gp2tmm71rm40cjvdtvgjfaj4",
"stream": "https://stream.replicate.com/v1/files/wcdb-tccc7lkbatq5zzgcwv6zfyzujtrxnk54lqhk2ita6npll43nxria",
"web": "https://replicate.com/p/e1gp2tmm71rm40cjvdtvgjfaj4"
},
"metrics": {
"image_count": 1,
"predict_time": 8.856783563,
"total_time": 8.860852
}
}