Ideogram Image To Image
Ideogram Image to Image: Transform your images with ease! Enhance, modify, or create entirely new visuals using advanced AI. Perfect for artists, designers, and anyone seeking creative inspiration.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/ideogram-img-2-img"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "cinematic film still, 4k, realistic, ((cinematic photo:1.3)) of panda wearing a blue spacesuit, sitting in a bar, Fujifilm XT3, long shot, ((low light:1.4)), ((looking straight at the camera:1.3)), upper body shot, somber, shallow depth of field, vignette, highly detailed, high budget Hollywood movie, bokeh, cinemascope, moody, epic, gorgeous, film grain, grainy",
12 "magic_prompt_option": "AUTO",
13 "style_type": "GENERAL",
14 "resolution": "RESOLUTION_1024_1024"
15}
16
17response = requests.post(url, headers=headers, json=data)
18
19if response.status_code == 200:
20 result = response.json()
21 print(json.dumps(result, indent=2))
22else:
23 print(f"Error: {response.status_code}")
24 print(response.text)
1import requests
2import json
3
4url = "https://api.segmind.com/v1/ideogram-img-2-img"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "cinematic film still, 4k, realistic, ((cinematic photo:1.3)) of panda wearing a blue spacesuit, sitting in a bar, Fujifilm XT3, long shot, ((low light:1.4)), ((looking straight at the camera:1.3)), upper body shot, somber, shallow depth of field, vignette, highly detailed, high budget Hollywood movie, bokeh, cinemascope, moody, epic, gorgeous, film grain, grainy",
12 "magic_prompt_option": "AUTO",
13 "style_type": "GENERAL",
14 "resolution": "RESOLUTION_1024_1024"
15}
16
17response = requests.post(url, headers=headers, json=data)
18
19if response.status_code == 200:
20 result = response.json()
21 print(json.dumps(result, indent=2))
22else:
23 print(f"Error: {response.status_code}")
24 print(response.text)
API Endpoint
https://api.segmind.com/v1/ideogram-img-2-img
Parameters
image_file
requiredstring (uri)
Image File
prompt
requiredstring
Prompt to render
color_palette
optionalany | any
A color palette for generation
Preset Color Palette
optionalany
name
requiredstring
Custom Color Palette
optionalany
members
requiredobject[]
image_weight
optionalinteger
Image Weight
50
magic_prompt_option
optionalstring
Option for magic prompt
"AUTO"
"AUTO"
"ON"
"OFF"
negative_prompt
optionalstring
Negative prompt to avoid specific elements
resolution
optionalstring
Resolution of the output image
"RESOLUTION_1024_1024"
"RESOLUTION_512_1536"
"RESOLUTION_576_1408"
"RESOLUTION_576_1472"
"RESOLUTION_576_1536"
"RESOLUTION_640_1024"
"RESOLUTION_640_1344"
"RESOLUTION_640_1408"
"RESOLUTION_640_1472"
"RESOLUTION_640_1536"
"RESOLUTION_704_1152"
+68 moreseed
optionalinteger
Seed for random generation
style_type
optionalstring
Style type for the output
"GENERAL"
"GENERAL"
"REALISTIC"
"DESIGN"
"RENDER_3D"
"ANIME"
Response Type
Returns: Image
Common Error Codes
The API returns standard HTTP status codes. Detailed error messages are provided in the response body.
Bad Request
Invalid parameters or request format
Unauthorized
Missing or invalid API key
Forbidden
Insufficient permissions
Not Found
Model or endpoint not found
Insufficient Credits
Not enough credits to process request
Rate Limited
Too many requests
Server Error
Internal server error
Bad Gateway
Service temporarily unavailable
Timeout
Request timed out