typetext
{
"aspect_ratio": "3:2",
"magic_prompt_option": "On",
"prompt": "A color film-inspired portrait of an astronaut in his ship with a shallow depth of field that blurs the surrounding elements, drawing attention to the eye. The fine grain and cast suggest a high ISO film stock, while the wide aperture lens creates a pleasing bokeh effect, enhancing the candid and natural documentary style.",
"resolution": "None",
"style_type": "Realistic"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_4t8**********************************
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 ideogram-ai/ideogram-v3-quality using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
aspect_ratio: "3:2",
magic_prompt_option: "On",
prompt: "A color film-inspired portrait of an astronaut in his ship with a shallow depth of field that blurs the surrounding elements, drawing attention to the eye. The fine grain and cast suggest a high ISO film stock, while the wide aperture lens creates a pleasing bokeh effect, enhancing the candid and natural documentary style.",
resolution: "None",
style_type: "Realistic"
};
const output = await replicate.run("ideogram-ai/ideogram-v3-quality", { input });
// 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_4t8**********************************
This is your API token. Keep it to yourself.
import replicate
Run ideogram-ai/ideogram-v3-quality using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"ideogram-ai/ideogram-v3-quality",
input={
"aspect_ratio": "3:2",
"magic_prompt_option": "On",
"prompt": "A color film-inspired portrait of an astronaut in his ship with a shallow depth of field that blurs the surrounding elements, drawing attention to the eye. The fine grain and cast suggest a high ISO film stock, while the wide aperture lens creates a pleasing bokeh effect, enhancing the candid and natural documentary style.",
"resolution": "None",
"style_type": "Realistic"
}
)
# 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_4t8**********************************
This is your API token. Keep it to yourself.
Run ideogram-ai/ideogram-v3-quality 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": "3:2",
"magic_prompt_option": "On",
"prompt": "A color film-inspired portrait of an astronaut in his ship with a shallow depth of field that blurs the surrounding elements, drawing attention to the eye. The fine grain and cast suggest a high ISO film stock, while the wide aperture lens creates a pleasing bokeh effect, enhancing the candid and natural documentary style.",
"resolution": "None",
"style_type": "Realistic"
}
}' \
https://api.replicate.com/v1/models/ideogram-ai/ideogram-v3-quality/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "4bdjtnjhydrmc0cpnd9t88xkag",
"model": "ideogram-ai/ideogram-v3-quality",
"version": "hidden",
"input": {
"aspect_ratio": "3:2",
"magic_prompt_option": "On",
"prompt": "A color film-inspired portrait of an astronaut in his ship with a shallow depth of field that blurs the surrounding elements, drawing attention to the eye. The fine grain and cast suggest a high ISO film stock, while the wide aperture lens creates a pleasing bokeh effect, enhancing the candid and natural documentary style.",
"resolution": "None",
"style_type": "Realistic"
},
"logs": "Using seed: 158452463\nModerating content...\nModeration complete in 0.38sec\nGenerating...\nPrompt used: A color film portrait captures an astronaut, helmet slightly ajar, reflecting the vastness of space in his focused gaze. He is seated within the cramped cockpit of his spacecraft, a single ray of sunlight illuminating the side of his face and highlighting the texture of his worn flight suit. Scattered around him are floating tools and equipment, bathed in a soft, diffused glow, creating a sense of quiet solitude and the immense weight of his mission - “Ad Astra”. The background fades into a dreamy bokeh of distant stars and the ship's control panels, evoking a feeling of isolation and wonder.\nImage generation took 11.96 seconds\nDownloading 1502626 bytes\nDownloaded 1.43MB in 0.67sec",
"output": "https://replicate.delivery/xezq/0HQpxu5CjUo8I9eHeraPZHzeuXpUHaSr5UHL8r4MdrO3dlUpA/tmpku96clf9.png",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-05-07T15:18:06.579Z",
"started_at": "2025-05-07T15:18:06.5875Z",
"completed_at": "2025-05-07T15:18:19.611573Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/4bdjtnjhydrmc0cpnd9t88xkag/cancel",
"get": "https://api.replicate.com/v1/predictions/4bdjtnjhydrmc0cpnd9t88xkag",
"stream": "https://stream.replicate.com/v1/files/bcwr-gyqp7fxkwzljg33wvzvegg62eqcml5edkibocbfuouxu5zwkdkna",
"web": "https://replicate.com/p/4bdjtnjhydrmc0cpnd9t88xkag"
},
"metrics": {
"image_count": 1,
"predict_time": 13.024072886,
"total_time": 13.032573
}
}