Qwen Image 3
Edit images from an instruction and one to three ordered references with Qwen Image 3.
import { config, higgsfield } from "@higgsfield/client/v2"; config({ credentials: process.env.HF_CREDENTIALS,}); const result = await higgsfield.subscribe( "alibaba/qwen-image-3/edit", { input: { "prompt": "A cinematic scene at sunset", "image_urls": [ "https://example.com/input.jpg" ], "resolution": "1k", "aspect_ratio": "1:1", "prompt_extend": true, "enable_thinking": true, "prompt_extend_mode": "direct" }, withPolling: true, },); console.log(result);Calling the API
Use alibaba/qwen-image-3/edit with the Higgsfield API. Keep credentials on your server.
import { config, higgsfield } from "@higgsfield/client/v2"; config({ credentials: process.env.HF_CREDENTIALS,}); const result = await higgsfield.subscribe( "alibaba/qwen-image-3/edit", { input: { "prompt": "A cinematic scene at sunset", "image_urls": [ "https://example.com/input.jpg" ], "resolution": "1k", "aspect_ratio": "1:1", "prompt_extend": true, "enable_thinking": true, "prompt_extend_mode": "direct" }, withPolling: true, },); console.log(result);Request parameters
promptstring · required
Positive prompt or editing instruction in Chinese or English. Alibaba recommends at most 4,500 tokens.
{
"type": "string",
"minLength": 1,
"description": "Positive prompt or editing instruction in Chinese or English. Alibaba recommends at most 4,500 tokens."
}image_urlsarray · required
One to three ordered public image URLs used as editing references.
{
"type": "array",
"items": {
"type": "string",
"format": "uri"
},
"maxItems": 3,
"minItems": 1,
"description": "One to three ordered public image URLs used as editing references."
}aspect_ratiostring · optional
Output aspect ratio. Exact provider-recommended dimensions are selected automatically.
Options: 1:1, 2:3, 3:2, 3:4, 4:3, 7:9, 9:7, 9:16, 16:9, 21:9
Default: "1:1"
{
"enum": [
"1:1",
"2:3",
"3:2",
"3:4",
"4:3",
"7:9",
"9:7",
"9:16",
"16:9",
"21:9"
],
"type": "string",
"default": "1:1",
"description": "Output aspect ratio. Exact provider-recommended dimensions are selected automatically."
}resolutionstring · optional
Output resolution tier. Both tiers produce PNG images.
Options: 1k, 2k
Default: "1k"
{
"enum": [
"1k",
"2k"
],
"type": "string",
"default": "1k",
"description": "Output resolution tier. Both tiers produce PNG images."
}negative_promptstring · optional
Content, styles, or artifacts to avoid in the output.
{
"type": "string",
"description": "Content, styles, or artifacts to avoid in the output."
}prompt_extendboolean · optional
Improve the prompt before generation. Required when thinking mode is enabled.
Default: true
{
"type": "boolean",
"default": true,
"description": "Improve the prompt before generation. Required when thinking mode is enabled."
}prompt_extend_modestring · optional
Direct enhancement is available for every request; agent enhancement is text-to-image only.
Options: direct
Default: "direct"
{
"enum": [
"direct"
],
"type": "string",
"default": "direct",
"description": "Direct enhancement is available for every request; agent enhancement is text-to-image only."
}enable_thinkingboolean · optional
Use model reasoning to improve image quality. Requires prompt enhancement.
Default: true
{
"type": "boolean",
"default": true,
"description": "Use model reasoning to improve image quality. Requires prompt enhancement."
}seedinteger · optional
Optional random seed for similar, reproducible results.
{
"type": "integer",
"maximum": 2147483647,
"minimum": 0,
"description": "Optional random seed for similar, reproducible results."
}Price
From $0.0400 per image.
View all pricing