Ideogram Turbo Image To Image Serverless API
Transform images instantly with Ideogram Turbo Image to Image! Fast AI for quick edits & creative remixes.
~11.02s
$0.063 per generation
1import requests
2import json
3
4url = "https://api.segmind.com/v1/ideogram-turbo-img-2-img"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "A panda playing football, caricature style",
12 "image_file": "https://segmind-resources.s3.amazonaws.com/input/a30b306b-6683-49ae-82c0-a1f18242660c-turbo-i2i-ip.jpg",
13 "magic_prompt_option": "AUTO",
14 "seed": 965220,
15 "style_type": "GENERAL",
16 "resolution": "RESOLUTION_1024_1024",
17 "image_weight": 50
18}
19
20response = requests.post(url, headers=headers, json=data)
21
22if response.status_code == 200:
23 result = response.json()
24 print(json.dumps(result, indent=2))
25else:
26 print(f"Error: {response.status_code}")
27 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/ideogram-turbo-img-2-img"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "A panda playing football, caricature style",
12 "image_file": "https://segmind-resources.s3.amazonaws.com/input/a30b306b-6683-49ae-82c0-a1f18242660c-turbo-i2i-ip.jpg",
13 "magic_prompt_option": "AUTO",
14 "seed": 965220,
15 "style_type": "GENERAL",
16 "resolution": "RESOLUTION_1024_1024",
17 "image_weight": 50
18}
19
20response = requests.post(url, headers=headers, json=data)
21
22if response.status_code == 200:
23 result = response.json()
24 print(json.dumps(result, indent=2))
25else:
26 print(f"Error: {response.status_code}")
27 print(response.text)API Endpoint
POST
https://api.segmind.com/v1/ideogram-turbo-img-2-imgParameters
image_filerequiredstring (uri)Image File
promptrequiredstringPrompt to render
color_paletteoptionalany | anyA color palette for generation
One of:
Preset Color PaletteoptionalanynamerequiredstringCustom Color Paletteoptionalanymembersrequiredobject[]image_weightoptionalintegerImage Weight
Default:
50magic_prompt_optionoptionalstringOption for magic prompt
Default:
"AUTO"Allowed values :
"AUTO""ON""OFF"negative_promptoptionalstringNegative prompt to avoid specific elements
resolutionoptionalstringResolution of the output image
Default:
"RESOLUTION_1024_1024"Allowed values (78 total):
"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 moreseedoptionalintegerSeed for random generation
Range: 100 - 999999
style_typeoptionalstringStyle type for the output
Default:
"GENERAL"Allowed values :
"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.
400
Bad Request
Invalid parameters or request format
401
Unauthorized
Missing or invalid API key
403
Forbidden
Insufficient permissions
404
Not Found
Model or endpoint not found
406
Insufficient Credits
Not enough credits to process request
429
Rate Limited
Too many requests
500
Server Error
Internal server error
502
Bad Gateway
Service temporarily unavailable
504
Timeout
Request timed out