Ideogram Developer API

The Ideogram API lets you integrate the Ideogram Image Generation models right into your product.

Capabilities

Character Reference

With Character reference, you can define and reuse distinctive characters, ensuring that facial features, hairstyles, and other key traits remain consistent from one image to the next.

prompt: A cinematic medium shot of a man sitting on a motorcycle in a dimly lit garage.

character_reference_images
result

Generate

Generate an image given a descriptive prompt.

prompt: A photo of a cat sleeping on a couch.

result

Remix

The Remix tool is invaluable for making changes to an existing image, whether it was generated in Ideogram or uploaded. The AI uses the original image as a basis to generate a new one, allowing you to control how much influence the original image has on the final result.

prompt: A photo of a dog sleeping on a couch

image
result

Edit

Take a starting image and modify a part of an image while keeping the rest intact.

prompt: A dog wearing a cowboy hat

image
mask
result

Reframe

Take a starting image and extend it to match your desired resolution.

resolution: 1280x768

image
result

Replace Background

Take a starting image and replace the background with a new one.

prompt: A man standing in a busy coffee shop

image
result

Face Swapping

Using the Edit endpoint, you can take a starting image and swap the face of the person in the image with a new one.

prompt: A man sitting on a motorcycle in a dimly lit garage

image
mask
character
result

For more detailed documentation on our models’ capabilities, please refer to our Official Documentation.

Start building

Quickstart

Get started by following our Setup guide and then follow this example for a simple Generation with and without a character reference image.

1import requests
2
3# Generate with Ideogram 3.0 (POST /v1/ideogram-v3/generate)
4response = requests.post(
5 "https://api.ideogram.ai/v1/ideogram-v3/generate",
6 headers={
7 "Api-Key": "<apiKey>"
8 },
9 json={
10 "prompt": "A picture of a cat",
11 "rendering_speed": "TURBO"
12 }
13)
14print(response.json())
15if response.status_code == 200:
16 with open('output.png', 'wb') as f:
17 f.write(requests.get(response.json()['data'][0]['url']).content)
18
19# Generate with character reference
20response = requests.post(
21 "https://api.ideogram.ai/v1/ideogram-v3/generate",
22 headers={
23 "Api-Key": "<apiKey>"
24 },
25 data={
26 "style_type": "AUTO",
27 "prompt": "A cinematic medium shot of a man sitting on a motorcycle in a dimly lit garage.",
28 },
29 files=[
30 ("character_reference_images", open("character_reference_image.png", "rb")),
31 ]
32)
33print(response.json())
34if response.status_code == 200:
35 with open('output_character.png', 'wb') as f:
36 f.write(requests.get(response.json()['data'][0]['url']).content)

Enterprise Scale

The Ideogram API serves thousands of API customers to generate millions of images daily. If you wish to utilize our API at a larger scale than our default rate limit of 10 inflight requests, please reach out to us at partnership@ideogram.ai and we will help fit your exact needs.