Juggernaut Lightning Flux

Juggernaut Lightning Flux: Blazing fast (<300ms!) & powerful inference with enhanced visuals.

~6.03s
$0.01 per generation
 1import requests
 2import json
 3
 4url = "https://api.segmind.com/v1/juggernaut-lightning-flux"
 5headers = {
 6    "x-api-key": "YOUR_API_KEY",
 7    "Content-Type": "application/json"
 8}
 9
10data = {
11    "positivePrompt": "Young couple arguing in rain...",
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

POSThttps://api.segmind.com/v1/juggernaut-lightning-flux

Parameters

CFGScalerequired
integer

CFG Scale for the generation process

Default: 7Range: 0 - 30
heightrequired
integer

Height of the generated image

Default: 1024Range: 128 - 2048
outputFormatrequired
string

Specifies the format of the output image...

Default: "JPG"
Allowed values :
"JPG""PNG""WEBP"
positivePromptrequired
string

Text prompt for generating the image

Default: "Young couple arguing in rain..."
schedulerrequired
string

Scheduler to control the inference process

Default: "Euler"
Allowed values :
"Euler""DPM++""..."
stepsrequired
integer

Number of inference steps for image generation

Default: 25Range: 1 - 100
widthrequired
integer

Width of the generated image

Default: 1024Range: 128 - 2048
seedoptional
integer

Seed for random number generation

Default: 1184522

Response Type

Returns: Text/JSON

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