Infinite You

InfiniteYou generates high-fidelity portraits preserving identity while aligning with creative text prompts.

~180.08s
~$0.205
 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

POSThttps://api.segmind.com/v1/infinite-you

Parameters

id_imagerequired
string (uri)

Upload a portrait image for processing. Ensure it contains a clear human face.

control_imageoptional
string (uri)

Optional: Use a secondary image for compositional control. Ideal for consistent layout.

Default: null
enable_anti_bluroptional
boolean

Activate to reduce blur. Ideal for sharp, defined structures.

Default: false
enable_realismoptional
boolean

Toggle realism enhancement feature. Enable for lifelike representation.

Default: true
guidance_scaleoptional
number

Adjustment on prompt adherence. Set higher for precise, lower for creative outputs.

Default: 3.5Range: 0 - 10
heightoptional
integer

Output image height in pixels. Use 960 for standard or 1280 for a more detailed view.

Default: 1152Range: 256 - 1280
infusenet_conditioning_scaleoptional
number

Controls identity influence. Lower for more creative deviation.

Default: 1Range: 0 - 1
infusenet_guidance_endoptional
number

Defines when identity guidance stops. Generally kept at 1.0 for full application.

Default: 1Range: 0 - 1
infusenet_guidance_startoptional
number

Defines when to apply identity guidance. Typical range is 0.0-0.1.

Default: 0Range: 0 - 1
model_versionoptional
string

Selects model type. 'aes_stage2' for enhanced aesthetics or 'sim_stage1' for simplicity.

Default: "aes_stage2"
Allowed values :
"sim_stage1""aes_stage2"
num_stepsoptional
integer

Controls image refinement steps. Use 30 for good quality, 50 for best details.

Default: 30Range: 1 - 100
output_formatoptional
string

Choose the image format. 'webp' for compressibility, 'png' for quality.

Default: "webp"
Allowed values :
"png""jpg""webp"
output_qualityoptional
integer

Defines the output quality. 80 for general use, 100 for optimal.

Default: 80Range: 1 - 100
promptoptional
string

Input your vision for the image. Example: 'Vibrant sunset over mountains, surreal, dream-like'.

seedoptional
integer

Sets the random seed for reproducibility. Use a specific number for repeatability or null for randomness.

Default: 6255
widthoptional
integer

Output image width in pixels. Choose 768 for portrait or 960 for landscape.

Default: 864Range: 256 - 1280

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