Segmind-VegaRT
Segmind-VegaRT a distilled consistency adapter for Segmind-Vega that allows to reduce the number of inference steps to only between 2 - 8 steps.
~1.68s
~$0.002
1import requests
2import json
3
4url = "https://api.segmind.com/v1/segmind-vega-rt-v1"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "backlight, wilderness woman hunting in jungle hiding behind leaves, face paintings closeup face portrait, detailed eyes, nature documentary, dry skin, fuzzy skin, lens flare",
12 "num_inference_steps": 4,
13 "seed": 758143278,
14 "img_width": 1024,
15 "img_height": 1024,
16 "base64": false
17}
18
19response = requests.post(url, headers=headers, json=data)
20
21if response.status_code == 200:
22 result = response.json()
23 print(json.dumps(result, indent=2))
24else:
25 print(f"Error: {response.status_code}")
26 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/segmind-vega-rt-v1"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "backlight, wilderness woman hunting in jungle hiding behind leaves, face paintings closeup face portrait, detailed eyes, nature documentary, dry skin, fuzzy skin, lens flare",
12 "num_inference_steps": 4,
13 "seed": 758143278,
14 "img_width": 1024,
15 "img_height": 1024,
16 "base64": false
17}
18
19response = requests.post(url, headers=headers, json=data)
20
21if response.status_code == 200:
22 result = response.json()
23 print(json.dumps(result, indent=2))
24else:
25 print(f"Error: {response.status_code}")
26 print(response.text)API Endpoint
POST
https://api.segmind.com/v1/segmind-vega-rt-v1Parameters
promptrequiredstringPrompt to render
base64optionalbooleanBase64 encoding of the output image.
Default:
falseimg_heightoptionalintegerCan only be 1024 for SDXL
Default:
1024Allowed values :
1024img_widthoptionalintegerCan only be 1024 for SDXL
Default:
1024Allowed values :
1024num_inference_stepsoptionalintegerNumber of denoising steps.
Default:
4Range: 4 - 10seedoptionalintegerSeed for image generation.
Default:
-1Range: -1 - 999999999999999Response 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