Infinite You
InfiniteYou generates high-fidelity portraits preserving identity while aligning with creative text prompts.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/infinite-you"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "seed": 6255,
12 "width": 864,
13 "height": 1152,
14 "prompt": "A sophisticated gentleman exuding confidence. He is dressed in a 1990s brown plaid jacket with a high collar, paired with a dark grey turtleneck. His trousers are tailored and charcoal in color, complemented by a sleek leather belt. The background showcases an elegant library with bookshelves, a marble fireplace, and warm lighting, creating a refined and cozy atmosphere. His relaxed posture and casual hand-in-pocket stance add to his composed and stylish demeanor",
15 "id_image": "https://segmind-resources.s3.amazonaws.com/output/e533504e-4e22-4219-88a1-152e002e1a99-man2.png",
16 "num_steps": 30,
17 "model_version": "aes_stage2",
18 "output_format": "webp",
19 "enable_realism": true,
20 "guidance_scale": 3.5,
21 "output_quality": 80,
22 "enable_anti_blur": false,
23 "infusenet_guidance_end": 1,
24 "infusenet_guidance_start": 0,
25 "infusenet_conditioning_scale": 1
26}
27
28response = requests.post(url, headers=headers, json=data)
29
30if response.status_code == 200:
31 result = response.json()
32 print(json.dumps(result, indent=2))
33else:
34 print(f"Error: {response.status_code}")
35 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/infinite-you"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "seed": 6255,
12 "width": 864,
13 "height": 1152,
14 "prompt": "A sophisticated gentleman exuding confidence. He is dressed in a 1990s brown plaid jacket with a high collar, paired with a dark grey turtleneck. His trousers are tailored and charcoal in color, complemented by a sleek leather belt. The background showcases an elegant library with bookshelves, a marble fireplace, and warm lighting, creating a refined and cozy atmosphere. His relaxed posture and casual hand-in-pocket stance add to his composed and stylish demeanor",
15 "id_image": "https://segmind-resources.s3.amazonaws.com/output/e533504e-4e22-4219-88a1-152e002e1a99-man2.png",
16 "num_steps": 30,
17 "model_version": "aes_stage2",
18 "output_format": "webp",
19 "enable_realism": true,
20 "guidance_scale": 3.5,
21 "output_quality": 80,
22 "enable_anti_blur": false,
23 "infusenet_guidance_end": 1,
24 "infusenet_guidance_start": 0,
25 "infusenet_conditioning_scale": 1
26}
27
28response = requests.post(url, headers=headers, json=data)
29
30if response.status_code == 200:
31 result = response.json()
32 print(json.dumps(result, indent=2))
33else:
34 print(f"Error: {response.status_code}")
35 print(response.text)API Endpoint
https://api.segmind.com/v1/infinite-youParameters
id_imagerequiredstring (uri)Upload a portrait image for processing. Ensure it contains a clear human face.
control_imageoptionalstring (uri)Optional: Use a secondary image for compositional control. Ideal for consistent layout.
nullenable_anti_bluroptionalbooleanActivate to reduce blur. Ideal for sharp, defined structures.
falseenable_realismoptionalbooleanToggle realism enhancement feature. Enable for lifelike representation.
trueguidance_scaleoptionalnumberAdjustment on prompt adherence. Set higher for precise, lower for creative outputs.
3.5Range: 0 - 10heightoptionalintegerOutput image height in pixels. Use 960 for standard or 1280 for a more detailed view.
1152Range: 256 - 1280infusenet_conditioning_scaleoptionalnumberControls identity influence. Lower for more creative deviation.
1Range: 0 - 1infusenet_guidance_endoptionalnumberDefines when identity guidance stops. Generally kept at 1.0 for full application.
1Range: 0 - 1infusenet_guidance_startoptionalnumberDefines when to apply identity guidance. Typical range is 0.0-0.1.
0Range: 0 - 1model_versionoptionalstringSelects model type. 'aes_stage2' for enhanced aesthetics or 'sim_stage1' for simplicity.
"aes_stage2""sim_stage1""aes_stage2"num_stepsoptionalintegerControls image refinement steps. Use 30 for good quality, 50 for best details.
30Range: 1 - 100output_formatoptionalstringChoose the image format. 'webp' for compressibility, 'png' for quality.
"webp""png""jpg""webp"output_qualityoptionalintegerDefines the output quality. 80 for general use, 100 for optimal.
80Range: 1 - 100promptoptionalstringInput your vision for the image. Example: 'Vibrant sunset over mountains, surreal, dream-like'.
seedoptionalintegerSets the random seed for reproducibility. Use a specific number for repeatability or null for randomness.
6255widthoptionalintegerOutput image width in pixels. Choose 768 for portrait or 960 for landscape.
864Range: 256 - 1280Response 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