typetext
{
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"go_fast": false,
"guidance_scale": 3,
"image": "https://replicate.delivery/pbxt/MtFE70ID5jCM94NPTlef1yncdGosXWUfpPuY9b5NYOcUzAg1/templatebrom.jpg",
"lora_scale": 1,
"megapixels": "1",
"model": "dev",
"num_inference_steps": 28,
"num_outputs": 1,
"output_format": "webp",
"output_quality": 80,
"prompt": "in the style of bromdarksun25, a painting of a muscled warrior brandishing a spear in a gladiator arena, he wears a mix of bone, metal, and obsidian armor pieces. he is intimidating and yelling",
"prompt_strength": 0.5
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Wxy**********************************
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 derickson/ds-01 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"derickson/ds-01:ca4f2ed73bc8b5d9a97c49a349fc13fa50e736b15e9396eae8ea0f0634b089fd",
{
input: {
aspect_ratio: "1:1",
extra_lora_scale: 1,
go_fast: false,
guidance_scale: 3,
image: "https://replicate.delivery/pbxt/MtFE70ID5jCM94NPTlef1yncdGosXWUfpPuY9b5NYOcUzAg1/templatebrom.jpg",
lora_scale: 1,
megapixels: "1",
model: "dev",
num_inference_steps: 28,
num_outputs: 1,
output_format: "webp",
output_quality: 80,
prompt: "in the style of bromdarksun25, a painting of a muscled warrior brandishing a spear in a gladiator arena, he wears a mix of bone, metal, and obsidian armor pieces. he is intimidating and yelling",
prompt_strength: 0.5
}
}
);
// 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_Wxy**********************************
This is your API token. Keep it to yourself.
import replicate
Run derickson/ds-01 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"derickson/ds-01:ca4f2ed73bc8b5d9a97c49a349fc13fa50e736b15e9396eae8ea0f0634b089fd",
input={
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"go_fast": False,
"guidance_scale": 3,
"image": "https://replicate.delivery/pbxt/MtFE70ID5jCM94NPTlef1yncdGosXWUfpPuY9b5NYOcUzAg1/templatebrom.jpg",
"lora_scale": 1,
"megapixels": "1",
"model": "dev",
"num_inference_steps": 28,
"num_outputs": 1,
"output_format": "webp",
"output_quality": 80,
"prompt": "in the style of bromdarksun25, a painting of a muscled warrior brandishing a spear in a gladiator arena, he wears a mix of bone, metal, and obsidian armor pieces. he is intimidating and yelling",
"prompt_strength": 0.5
}
)
# 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_Wxy**********************************
This is your API token. Keep it to yourself.
Run derickson/ds-01 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": "derickson/ds-01:ca4f2ed73bc8b5d9a97c49a349fc13fa50e736b15e9396eae8ea0f0634b089fd",
"input": {
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"go_fast": false,
"guidance_scale": 3,
"image": "https://replicate.delivery/pbxt/MtFE70ID5jCM94NPTlef1yncdGosXWUfpPuY9b5NYOcUzAg1/templatebrom.jpg",
"lora_scale": 1,
"megapixels": "1",
"model": "dev",
"num_inference_steps": 28,
"num_outputs": 1,
"output_format": "webp",
"output_quality": 80,
"prompt": "in the style of bromdarksun25, a painting of a muscled warrior brandishing a spear in a gladiator arena, he wears a mix of bone, metal, and obsidian armor pieces. he is intimidating and yelling",
"prompt_strength": 0.5
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "x7sah3j1m1rme0cpcp0apxnjkw",
"model": "derickson/ds-01",
"version": "ca4f2ed73bc8b5d9a97c49a349fc13fa50e736b15e9396eae8ea0f0634b089fd",
"input": {
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"go_fast": false,
"guidance_scale": 3,
"image": "https://replicate.delivery/pbxt/MtFE70ID5jCM94NPTlef1yncdGosXWUfpPuY9b5NYOcUzAg1/templatebrom.jpg",
"lora_scale": 1,
"megapixels": "1",
"model": "dev",
"num_inference_steps": 28,
"num_outputs": 1,
"output_format": "webp",
"output_quality": 80,
"prompt": "in the style of bromdarksun25, a painting of a muscled warrior brandishing a spear in a gladiator arena, he wears a mix of bone, metal, and obsidian armor pieces. he is intimidating and yelling",
"prompt_strength": 0.5
},
"logs": "Weights already loaded\nLoaded LoRAs in 0.02s\nUsing seed: 61695\nPrompt: in the style of bromdarksun25, a painting of a muscled warrior brandishing a spear in a gladiator arena, he wears a mix of bone, metal, and obsidian armor pieces. he is intimidating and yelling\nInput image size: 1024x1024\n[!] Resizing input image from 1024x1024 to 1024x1024\n[!] img2img mode\n 0%| | 0/14 [00:00<?, ?it/s]\n 7%|▋ | 1/14 [00:00<00:02, 4.76it/s]\n 14%|█▍ | 2/14 [00:00<00:02, 4.16it/s]\n 21%|██▏ | 3/14 [00:00<00:02, 4.00it/s]\n 29%|██▊ | 4/14 [00:00<00:02, 3.93it/s]\n 36%|███▌ | 5/14 [00:01<00:02, 3.89it/s]\n 43%|████▎ | 6/14 [00:01<00:02, 3.87it/s]\n 50%|█████ | 7/14 [00:01<00:01, 3.85it/s]\n 57%|█████▋ | 8/14 [00:02<00:01, 3.84it/s]\n 64%|██████▍ | 9/14 [00:02<00:01, 3.83it/s]\n 71%|███████▏ | 10/14 [00:02<00:01, 3.83it/s]\n 79%|███████▊ | 11/14 [00:02<00:00, 3.83it/s]\n 86%|████████▌ | 12/14 [00:03<00:00, 3.82it/s]\n 93%|█████████▎| 13/14 [00:03<00:00, 3.82it/s]\n100%|██████████| 14/14 [00:03<00:00, 3.82it/s]\n100%|██████████| 14/14 [00:03<00:00, 3.88it/s]\nTotal safe images: 1 out of 1",
"output": [
"https://replicate.delivery/xezq/TgwgHSMageU8IKvf5oAEbhwkzgeL0KMDf038PeQM6z3x1lukC/out-0.webp"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-04-24T01:53:46.4Z",
"started_at": "2025-04-24T01:53:46.40687Z",
"completed_at": "2025-04-24T01:53:50.58997Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/x7sah3j1m1rme0cpcp0apxnjkw/cancel",
"get": "https://api.replicate.com/v1/predictions/x7sah3j1m1rme0cpcp0apxnjkw",
"stream": "https://stream.replicate.com/v1/files/bcwr-4fsbv4nv7mqli5ujqbpr6y26sufsuvw55rg27mxwqm7bmdjcmfwa",
"web": "https://replicate.com/p/x7sah3j1m1rme0cpcp0apxnjkw"
},
"metrics": {
"predict_time": 4.18309941,
"total_time": 4.18997
}
}
