Higgsfield Text 2 Image Soul Serverless API
SOUL AI transforms text into stunning, customizable visuals with unparalleled style control and precision.
POST /v2/higgsfield-text2image-soul · submit + poll 1# pip install "segmind>=1.1.0"
2# export SEGMIND_API_KEY="YOUR_API_KEY"
3import segmind
4
5# Async (v2): submit to the queue and block until COMPLETED.
6# run() returns the final result dict (600s deadline, 1.0s poll by default).
7result = segmind.run(
8 "higgsfield-text2image-soul",
9 prompt="Heroic dragonborn warrior standing proudly on a rocky cliff, wearing ancient armor infused with glowing runes, holding a massive battle axe.",
10 width_and_height="1536x2048",
11 enhance_prompt=False,
12 style_id="b3c8075a-cb4c-42de-b8b3-7099dd2df672",
13 style_strength=1,
14 quality="1080p",
15)
16print(result["status"]) # COMPLETED
17print(result.get("output")) # model output (e.g. media URL)
18print(result["metrics"]["inference_time"]) # server compute seconds
19
20# --- Or submit + poll manually (track request_id, control the cadence) ---
21from segmind import SegmindClient, InferenceFailed, InferenceTimeout
22
23client = SegmindClient() # reads SEGMIND_API_KEY
24payload = {
25 "prompt": "Heroic dragonborn warrior standing proudly on a rocky cliff, wearing ancient armor infused with glowing runes, holding a massive battle axe.",
26 "width_and_height": "1536x2048",
27 "enhance_prompt": False,
28 "style_id": "b3c8075a-cb4c-42de-b8b3-7099dd2df672",
29 "style_strength": 1,
30 "quality": "1080p",
31}
32job = client.submit_async("higgsfield-text2image-soul", **payload)
33print(job.request_id) # available immediately
34try:
35 result = job.wait(timeout=600, interval=1.0)
36except InferenceTimeout as e:
37 print("still running:", e.request_id)
38except InferenceFailed as e:
39 print("failed:", e.detail) 1# pip install "segmind>=1.1.0"
2# export SEGMIND_API_KEY="YOUR_API_KEY"
3import segmind
4
5# Async (v2): submit to the queue and block until COMPLETED.
6# run() returns the final result dict (600s deadline, 1.0s poll by default).
7result = segmind.run(
8 "higgsfield-text2image-soul",
9 prompt="Heroic dragonborn warrior standing proudly on a rocky cliff, wearing ancient armor infused with glowing runes, holding a massive battle axe.",
10 width_and_height="1536x2048",
11 enhance_prompt=False,
12 style_id="b3c8075a-cb4c-42de-b8b3-7099dd2df672",
13 style_strength=1,
14 quality="1080p",
15)
16print(result["status"]) # COMPLETED
17print(result.get("output")) # model output (e.g. media URL)
18print(result["metrics"]["inference_time"]) # server compute seconds
19
20# --- Or submit + poll manually (track request_id, control the cadence) ---
21from segmind import SegmindClient, InferenceFailed, InferenceTimeout
22
23client = SegmindClient() # reads SEGMIND_API_KEY
24payload = {
25 "prompt": "Heroic dragonborn warrior standing proudly on a rocky cliff, wearing ancient armor infused with glowing runes, holding a massive battle axe.",
26 "width_and_height": "1536x2048",
27 "enhance_prompt": False,
28 "style_id": "b3c8075a-cb4c-42de-b8b3-7099dd2df672",
29 "style_strength": 1,
30 "quality": "1080p",
31}
32job = client.submit_async("higgsfield-text2image-soul", **payload)
33print(job.request_id) # available immediately
34try:
35 result = job.wait(timeout=600, interval=1.0)
36except InferenceTimeout as e:
37 print("still running:", e.request_id)
38except InferenceFailed as e:
39 print("failed:", e.detail)API Endpoint
https://api.segmind.com/v1/higgsfield-text2image-soulParameters
enhance_promptrequiredbooleanBoosts prompt detail accuracy. Use for scenes with complexities.
falsepromptrequiredstringGuides the thematic direction of the image. For landscapes, use prompts like 'Misty forest at dusk'.
style_idrequiredstringSelects visual style. Opt for 'Realistic' for authenticity or 'Medieval' for imaginative renditions.
"b3c8075a-cb4c-42de-b8b3-7099dd2df672""b3c8075a-cb4c-42de-b8b3-7099dd2df672""1fc861ed-5923-41a6-9963-b9f04681dddd""40ff999c-f576-443c-b5b3-c7d1391a666e""a5f63c3b-70eb-4979-af5e-98c7ee1e18e8""d2e8ba04-9935-4dee-8bc4-39ac789746fc""6fb3e1f5-d721-4523-ac38-9902f2b2b850""1cb4b936-77bf-4f9a-9039-f3d349a4cdbe""ca4e6ad3-3e93-4e03-81a0-d1722d2c128b""255f4045-d68b-42b1-9e4c-f49d3263a9d7""cc099663-9621-422e-8626-c8ee68953a0c"width_and_heightrequiredstringDefines the image size. Choose '1080p' for general use or '4K' for detailed visuals.
"1152x2048""2048x1152""2048x1536""1536x2048""1344x2016""2016x1344""960x1696""1536x1536""1536x1152""1696x960"+3 moreimage_urloptionalstring (uri)Enhance or adjust an existing image with a URL. Use for precise edits or style transfers.
nullqualityoptionalstringControls resolution quality. Select '720p' for preview or '1080p' for clarity.
"1080p""720p""1080p"seedoptionalintegerSets generation reproducibility. Use a fixed number for consistent results.
nullRange: 1 - 1000000style_strengthoptionalnumberModulates style influence. Use 0.5 for subtle and 1 for bold stylization.
1Range: 0 - 1Response Type
Returns: Image
Asynchronous requests (v2)
Use Async for video, long-running (>~60s), or high-concurrency workloads; Sync is simplest for fast image & LLM calls. Async submits a request and you poll it to completion.
- 1
POST /v2/higgsfield-text2image-soulSubmit — returns request_id, status_url, response_url
- 2
GET /v2/requests/{id}/statusPoll — until COMPLETED or FAILED
- 3
GET /v2/requests/{id}Result — final response body
Status states
- A FAILED request is served as HTTP 422 — the body still carries the error detail.
- An unknown or expired request_id returns HTTP 404.
- Results are retained for 1 hour, then expire.
- Content / RAI blocks surface as FAILED, not a separate state.
- Track completion by polling the status endpoint.
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