Higgsfield Text 2 Image Soul Serverless API

SOUL AI transforms text into stunning, customizable visuals with unparalleled style control and precision.

~41.21s
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)

API Endpoint

POSThttps://api.segmind.com/v1/higgsfield-text2image-soul

Parameters

enhance_promptrequired
boolean

Boosts prompt detail accuracy. Use for scenes with complexities.

Default: false
promptrequired
string

Guides the thematic direction of the image. For landscapes, use prompts like 'Misty forest at dusk'.

style_idrequired
string

Selects visual style. Opt for 'Realistic' for authenticity or 'Medieval' for imaginative renditions.

Default: "b3c8075a-cb4c-42de-b8b3-7099dd2df672"
Allowed values (80 total):
Creatures"b3c8075a-cb4c-42de-b8b3-7099dd2df672"
Medieval"1fc861ed-5923-41a6-9963-b9f04681dddd"
Spotlight"40ff999c-f576-443c-b5b3-c7d1391a666e"
Giant People"a5f63c3b-70eb-4979-af5e-98c7ee1e18e8"
Subway"d2e8ba04-9935-4dee-8bc4-39ac789746fc"
Library"6fb3e1f5-d721-4523-ac38-9902f2b2b850"
Realistic"1cb4b936-77bf-4f9a-9039-f3d349a4cdbe"
DigitalCam"ca4e6ad3-3e93-4e03-81a0-d1722d2c128b"
Grillz Selfie"255f4045-d68b-42b1-9e4c-f49d3263a9d7"
Bleached Brows"cc099663-9621-422e-8626-c8ee68953a0c"
+70 more
width_and_heightrequired
string

Defines the image size. Choose '1080p' for general use or '4K' for detailed visuals.

Allowed values (13 total):
"1152x2048""2048x1152""2048x1536""1536x2048""1344x2016""2016x1344""960x1696""1536x1536""1536x1152""1696x960"+3 more
image_urloptional
string (uri)

Enhance or adjust an existing image with a URL. Use for precise edits or style transfers.

Default: null
qualityoptional
string

Controls resolution quality. Select '720p' for preview or '1080p' for clarity.

Default: "1080p"
Allowed values :
"720p""1080p"
seedoptional
integer

Sets generation reproducibility. Use a fixed number for consistent results.

Default: nullRange: 1 - 1000000
style_strengthoptional
number

Modulates style influence. Use 0.5 for subtle and 1 for bold stylization.

Default: 1Range: 0 - 1

Response 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. 1
    POST /v2/higgsfield-text2image-soul

    Submitreturns request_id, status_url, response_url

  2. 2
    GET /v2/requests/{id}/status

    Polluntil COMPLETED or FAILED

  3. 3
    GET /v2/requests/{id}

    Resultfinal response body

Status states

QUEUEDAccepted, waiting for a worker
PROCESSINGRunning on a worker
COMPLETEDDone — result body is ready
FAILEDErrored (incl. content/RAI blocks)
  • 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.

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