Ideogram 4.0 — Generate API
Generate with Ideogram 4.0: request parameters, examples and response handling.
Endpoint: POST https://api.higgsfield.ai/ideogram/v4.0
Endpoint ID: ideogram/v4.0
#Usage notes
- Omit image_url for text-to-image; provide image_url for remix/editing.
- image_weight controls preservation of the input image and applies to editing requests only; values are integers from 1 to 100.
- The square 1:1 aspect ratio is applied by default, including when an input image is supplied.
- rendering_speed values are case-sensitive: TURBO, DEFAULT, QUALITY. prompt must contain 2–2048 characters.
#Quick start
curl --request POST \
--url https://api.higgsfield.ai/ideogram/v4.0 \
--header "Authorization: Key ${HF_API_KEY_ID}:${HF_API_KEY_SECRET}" \
--header "Content-Type: application/json" \
--header "Idempotency-Key: ${IDEMPOTENCY_KEY}" \
--data '{
"prompt": "A ceramic vase on a wooden table beside a sunlit window, soft natural shadows, editorial photograph.",
"aspect_ratio": "1:1",
"rendering_speed": "DEFAULT"
}'
import higgsfield_client
arguments = (
{'prompt': 'A ceramic vase on a wooden table beside a sunlit window, soft '
'natural shadows, editorial photograph.',
'aspect_ratio': '1:1',
'rendering_speed': 'DEFAULT'}
)
result = higgsfield_client.subscribe(
"ideogram/v4.0",
arguments=arguments,
)
print(result["images"][0]["url"])
import { config, higgsfield } from "@higgsfield/client/v2";
config({ credentials: process.env.HF_CREDENTIALS });
const result = await higgsfield.subscribe("ideogram/v4.0", {
input:
{
"prompt": "A ceramic vase on a wooden table beside a sunlit window, soft natural shadows, editorial photograph.",
"aspect_ratio": "1:1",
"rendering_speed": "DEFAULT"
},
withPolling: true,
});
if (result.status === "completed") {
console.log(result.images?.[0]?.url);
}
#Input schema
prompt string required
Write your prompt here
Minimum characters: 2.
Maximum characters: 2048.
image_url string
Public URL of the input image.
Format: uri.
aspect_ratio string (default: 1:1)
Output width-to-height ratio.
Allowed values: "1:1", "1:2", "2:1", "2:3", "3:2", "4:5", "5:4", "9:16", "16:9", "5:8", "8:5", "3:4", "4:3", "9:22", "22:9", "9:23", "23:9", "3:8", "8:3", "5:12", "12:5", "1:3", "3:1".
image_weight integer
How strongly the output should preserve the input image.
Minimum: 1.
Maximum: 100.
rendering_speed string (default: DEFAULT)
Allowed values: "TURBO", "DEFAULT", "QUALITY".
Complete JSON schema
{
"type": "object",
"title": "Ideogram 4.0 Playground",
"required": [
"prompt"
],
"properties": {
"prompt": {
"type": "string",
"title": "Prompt",
"maxLength": 2048,
"minLength": 2,
"description": "Write your prompt here"
},
"image_url": {
"type": "string",
"title": "Input image",
"format": "uri"
},
"aspect_ratio": {
"enum": [
"1:1",
"1:2",
"2:1",
"2:3",
"3:2",
"4:5",
"5:4",
"9:16",
"16:9",
"5:8",
"8:5",
"3:4",
"4:3",
"9:22",
"22:9",
"9:23",
"23:9",
"3:8",
"8:3",
"5:12",
"12:5",
"1:3",
"3:1"
],
"type": "string",
"title": "Aspect ratio",
"default": "1:1"
},
"image_weight": {
"type": "integer",
"title": "Image weight",
"maximum": 100,
"minimum": 1,
"description": "How strongly the output should preserve the input image."
},
"rendering_speed": {
"enum": [
"TURBO",
"DEFAULT",
"QUALITY"
],
"type": "string",
"title": "Rendering speed",
"default": "DEFAULT"
}
},
"additionalProperties": false
}
#Response
Submission returns a request handle. Poll status_url until status is completed, or use webhooks.
{
"status": "queued",
"request_id": "REQUEST_ID",
"status_url": "https://api.higgsfield.ai/requests/REQUEST_ID/status",
"cancel_url": "https://api.higgsfield.ai/requests/REQUEST_ID/cancel"
}
A completed response includes the following output fields:
{
"status": "completed",
"request_id": "REQUEST_ID",
"images": [
{
"url": "https://example.com/output.png"
}
]
}
See idempotent requests, polling, request errors and authentication for shared request handling.