typetext
{
"aspect_ratio": "3:2",
"magic_prompt_option": "Auto",
"prompt": "Vector art of a friendly robot, in a speech bubble it says \"Hello! I'm Ideogram V2A turbo\" in a friendly font, in a second speech bubble it says \"I go faster now!\", the robot is flying through the sky with turbo boosters",
"resolution": "None",
"style_type": "None"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_XNR**********************************
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-v2a-turbo 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: "Auto",
prompt: "Vector art of a friendly robot, in a speech bubble it says \"Hello! I'm Ideogram V2A turbo\" in a friendly font, in a second speech bubble it says \"I go faster now!\", the robot is flying through the sky with turbo boosters",
resolution: "None",
style_type: "None"
};
const output = await replicate.run("ideogram-ai/ideogram-v2a-turbo", { 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_XNR**********************************
This is your API token. Keep it to yourself.
import replicate
Run ideogram-ai/ideogram-v2a-turbo using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"ideogram-ai/ideogram-v2a-turbo",
input={
"aspect_ratio": "3:2",
"magic_prompt_option": "Auto",
"prompt": "Vector art of a friendly robot, in a speech bubble it says \"Hello! I'm Ideogram V2A turbo\" in a friendly font, in a second speech bubble it says \"I go faster now!\", the robot is flying through the sky with turbo boosters",
"resolution": "None",
"style_type": "None"
}
)
# 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_XNR**********************************
This is your API token. Keep it to yourself.
Run ideogram-ai/ideogram-v2a-turbo 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": "Auto",
"prompt": "Vector art of a friendly robot, in a speech bubble it says \\"Hello! I\'m Ideogram V2A turbo\\" in a friendly font, in a second speech bubble it says \\"I go faster now!\\", the robot is flying through the sky with turbo boosters",
"resolution": "None",
"style_type": "None"
}
}' \
https://api.replicate.com/v1/models/ideogram-ai/ideogram-v2a-turbo/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "hw96eg13whrm80cn8wv9vkd218",
"model": "ideogram-ai/ideogram-v2a-turbo",
"version": "hidden",
"input": {
"aspect_ratio": "3:2",
"magic_prompt_option": "Auto",
"prompt": "Vector art of a friendly robot, in a speech bubble it says \"Hello! I'm Ideogram V2A turbo\" in a friendly font, in a second speech bubble it says \"I go faster now!\", the robot is flying through the sky with turbo boosters",
"resolution": "None",
"style_type": "None"
},
"logs": "Using seed: 2136539212\nModerating content...\nModeration complete in 0.20sec\nRunning prediction...\nGenerating...\nPrompt used: Vector art of a friendly robot, in a speech bubble it says \"Hello! I'm Ideogram V2A turbo\" in a friendly font, in a second speech bubble it says \"I go faster now!\", the robot is flying through the sky with turbo boosters\nImage generation took 5.55 seconds\nDownloading 570033 bytes\nDownloaded 0.54MB in 0.35sec",
"output": "https://replicate.delivery/xezq/0MOOj7UCadZdCJ5UrIcqZT6Kieg4e2D4Pt9HvDfXtLetWAORB/tmpdiuv41kb.png",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-02-27T11:41:25.348Z",
"started_at": "2025-02-27T11:41:25.355336Z",
"completed_at": "2025-02-27T11:41:31.465107Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/hw96eg13whrm80cn8wv9vkd218/cancel",
"get": "https://api.replicate.com/v1/predictions/hw96eg13whrm80cn8wv9vkd218",
"stream": "https://stream.replicate.com/v1/files/bcwr-qh23pbdhuy6kqycwvqhoj6lwj5swr5wfhhrwz66vkdbwdrgc53la",
"web": "https://replicate.com/p/hw96eg13whrm80cn8wv9vkd218"
},
"metrics": {
"image_count": 1,
"predict_time": 6.109770568,
"total_time": 6.117107
}
}