Juggernaut Pro Flux Serverless API
Juggernaut Pro FLUX: Create stunningly realistic AI images with unprecedented detail and sharpness.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/juggernaut-pro-flux"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "positivePrompt": "Middle-aged man sitting alone at diner counter, 3am, half-eaten pie, reflection in window, fluorescent lighting casting shadows.",
12 "width": 1024,
13 "height": 1024,
14 "steps": 25,
15 "seed": 1184522,
16 "CFGScale": 7,
17 "outputFormat": "JPG",
18 "scheduler": "Euler"
19}
20
21response = requests.post(url, headers=headers, json=data)
22
23if response.status_code == 200:
24 result = response.json()
25 print(json.dumps(result, indent=2))
26else:
27 print(f"Error: {response.status_code}")
28 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/juggernaut-pro-flux"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "positivePrompt": "Middle-aged man sitting alone at diner counter, 3am, half-eaten pie, reflection in window, fluorescent lighting casting shadows.",
12 "width": 1024,
13 "height": 1024,
14 "steps": 25,
15 "seed": 1184522,
16 "CFGScale": 7,
17 "outputFormat": "JPG",
18 "scheduler": "Euler"
19}
20
21response = requests.post(url, headers=headers, json=data)
22
23if response.status_code == 200:
24 result = response.json()
25 print(json.dumps(result, indent=2))
26else:
27 print(f"Error: {response.status_code}")
28 print(response.text)API Endpoint
https://api.segmind.com/v1/juggernaut-pro-fluxParameters
CFGScalerequiredintegerCFG Scale for the generation process
7Range: 0 - 30heightrequiredintegerHeight of the generated image
1024Range: 128 - 2048outputFormatrequiredstringSpecifies the format of the output image. Supported formats are: PNG, JPG and WEBP.
"JPG""JPG""PNG""WEBP"positivePromptrequiredstringText prompt for generating the image
"Middle-aged man sitting alone at diner counter, 3am, half-eaten pie, reflection in window, fluorescent lighting casting shadows."schedulerrequiredstringScheduler to control the inference process
"Euler""Euler""FlowMatchEulerDiscreteScheduler""DPM++""DPM++ SDE""DPM++ 2M""DPM++ 2M SDE""DPM++ 3M""Euler Beta""Euler Exponential""Euler Karras"+15 morestepsrequiredintegerNumber of inference steps for image generation
25Range: 1 - 100widthrequiredintegerWidth of the generated image
1024Range: 128 - 2048seedoptionalintegerSeed for random number generation
1184522Response Type
Returns: Text/JSON
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