If you're looking for an API, you can choose from your desired programming language.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import requests
import base64
# Use this function to convert an image file from the filesystem to base64
def image_file_to_base64(image_path):
with open(image_path, 'rb') as f:
image_data = f.read()
return base64.b64encode(image_data).decode('utf-8')
# Use this function to fetch an image from a URL and convert it to base64
def image_url_to_base64(image_url):
response = requests.get(image_url)
image_data = response.content
return base64.b64encode(image_data).decode('utf-8')
api_key = "YOUR_API_KEY"
url = "https://api.segmind.com/v1/sdxl1.0-juggernaut-lightning"
# Request payload
data = {
"prompt": "Medium shot, Adorable creature with big reflective eyes, moody lighting, best quality, full body portrait, real picture, intricate details, depth of field, in a forest, fujifilm xt3, outdoors, bright day, beautiful lighting, raw photo, 8k uhd, film grain, unreal engine 5, ray tracing",
"negative_prompt": "((close up)),(octane render, render, drawing, bad photo, bad photography:1.3), (worst quality, low quality, blurry:1.2), (bad teeth, deformed teeth, deformed lips), (bad anatomy, bad proportions:1.1), (deformed iris, deformed pupils), (deformed eyes, bad eyes), (deformed face, ugly face, bad face), (deformed hands, bad hands, fused fingers), morbid, mutilated, mutation, disfigured",
"samples": 1,
"scheduler": "DPM++ SDE",
"num_inference_steps": 5,
"guidance_scale": 1,
"seed": 2360370499,
"img_width": 1024,
"img_height": 1024,
"base64": False
}
headers = {'x-api-key': api_key}
response = requests.post(url, json=data, headers=headers)
print(response.content) # The response is the generated image
Prompt to render
blur, noisy, disfigured
Number of samples to generate.
min : 1,
max : 4
Type of scheduler.
Allowed values:
Number of denoising steps.
min : 1,
max : 100
Scale for classifier-free guidance
min : 1,
max : 25
Seed for image generation.
min : -1,
max : 999999999999999
Can only be 1024 for SDXL
Allowed values:
Can only be 1024 for SDXL
Allowed values:
Base64 encoding of the output image.
To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.
The Juggernaut Lightning SDXL model is designed to generate high-quality, photorealistic images from textual descriptions. The Juggernaut Lightning SDXL is fine-tuned on photorealistic images. As an accelerated version of the Juggernaut XL, this model is aimed at creating images of exceptional quality that closely mimic reality. The images produced by this model are not just visually appealing but also incredibly detailed, making them almost indistinguishable from real-life photographs. One of the key features of the Juggernaut Lightning SDXL is its ability to generate images quickly and efficiently, this model can generate high-quality 1024px images in just a few steps.
Using the Juggernaut Lightning SDXL model is straightforward. It’s compatible with the DPM++ SDE Karras / DPM++ SDE sampler, and it’s recommended to use 4-6 sampling steps and a CFG Scale of 1-2. These settings allow for optimal image generation performance.
Audio-based Lip Synchronization for Talking Head Video
Monster Labs QrCode ControlNet on top of SD Realistic Vision v5.1
InstantID aims to generate customized images with various poses or styles from only a single reference ID image while ensuring high fidelity
CodeFormer is a robust face restoration algorithm for old photos or AI-generated faces.