Fast Flux.1 Schnell
Fast Flux.1 Schnell by Segmind is an optimized text-to-image model designed for developers needing faster image generation. It offers high efficiency without compromising quality. Perfect for startups and engineers seeking quick, resource-efficient AI models.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/fast-flux-schnell"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "A wallpaper image of sports car with 'Flux' written on it, motion blur, side view, long shot",
12 "steps": 4,
13 "seed": 1184522,
14 "aspect_ratio": "1:1",
15 "base64": false
16}
17
18response = requests.post(url, headers=headers, json=data)
19
20if response.status_code == 200:
21 result = response.json()
22 print(json.dumps(result, indent=2))
23else:
24 print(f"Error: {response.status_code}")
25 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/fast-flux-schnell"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "A wallpaper image of sports car with 'Flux' written on it, motion blur, side view, long shot",
12 "steps": 4,
13 "seed": 1184522,
14 "aspect_ratio": "1:1",
15 "base64": false
16}
17
18response = requests.post(url, headers=headers, json=data)
19
20if response.status_code == 200:
21 result = response.json()
22 print(json.dumps(result, indent=2))
23else:
24 print(f"Error: {response.status_code}")
25 print(response.text)API Endpoint
https://api.segmind.com/v1/fast-flux-schnellParameters
promptrequiredstringText prompt for generating the image
"A wallpaper image of sports car with 'Flux' written on it, motion blur, side view, long shot"aspect_ratiooptionalstringaspect ratio of the output image
"1:1""1:1""16:9""21:9""2:3""3:2""4:5""5:4""9:16""9:21"base64optionalbooleanBase64 encoding of the output image.
falseseedoptionalintegerSeed for random number generation
1184522stepsoptionalintegerNumber of inference steps for image generation
4Range: 1 - 8Response 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