Customizing Realistic Human Photos
Customizing Realistic Human Photos To stylize the image, make sure to use the class word corresponding to the image you want to customize, followed by the trigger word: img. For example: man img, woman img, or girl img. Prompt example: Instagram photo, portrait photo of a woman img, colorful, perfect face, natural skin, hard shadows, film grain Upload the images of the individual you wish to customize. While a single image is sufficient, providing additional images can yield better results. Make sure that the face occupies the majority of the uploaded image.
Path parameters
Body Parameters
application/jsonWeights for the prompt. Increasing guidance makes generation follow more closely to the prompt.
Upload the images of the individual you wish to customize. While a single image is sufficient, providing additional images can yield better results. Ensure that the face occupies the majority of the uploaded image.
The number of images to generate (default: 1)
The prompt does not guide the image generation. The maximum length is 77 tokens, Note that the "sdxl_lightning" and "flux" model does not support this feature.
Provide a text description to stylize the image. Make sure to follow the class word you want to customize with the trigger word: img, such as: man img, woman img, or girl img
The quality of the image that will be generated (default: standard)
The format in which the generated images are returned. Currently, only 'b64_json' is supported as the response format
The size of the generated images.
Change the style to guidance for the generation
Adjust the Style strength to 15-50. The larger the number, the less ID fidelity, but the stylization ability will be better.
Response Body
Base64 image
The Unix timestamp (in seconds) of when the response was created.
Example request
<?php
use GuzzleHttp\Client;
$client = new Client();
$headers = [
'Authorization' => 'Bearer YOUR-TOKEN-HERE',
'Content-Type' => 'application/json'
];
$body = '{
"images": [
"example"
],
"prompt": "sci-fi, closeup portrait photo of a man img wearing sunglasses in an Iron Man suit, face, slim body, high quality, film grain"
}';
$request = new Request('POST', 'https://api.infomaniak.com/1/ai/{product_id}/images/generations/photo_maker', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
Example response
application/json
{"data":[{"b64_json":"example","revised_prompt":"example"}],"created":69601}