SDXL ControlNet Union
Integréieren
sdxl-controlnet-union
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/sdxl-controlnet-union?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
}'
# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY"
const API = "https://api.doitong.com/v1";
const headers = {
"Authorization": "Bearer " + process.env.DOITONG_API_KEY,
"Content-Type": "application/json",
};
// Run the model; wait up to 20 s for the finished result in the same call
let res = await fetch(API + "/run/sdxl-controlnet-union?wait=20", {
method: "POST",
headers,
body: JSON.stringify({
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
}),
});
let request = await res.json();
if (!res.ok) throw new Error(request.error.code + ": " + request.error.message);
// Not finished yet: long-poll until it is
while (request.status === "queued" || request.status === "running") {
res = await fetch(API + "/requests/" + request.id + "?wait=20", { headers });
request = await res.json();
}
if (request.status !== "succeeded") throw new Error(JSON.stringify(request.error));
console.log(request.outputs.map((o) => o.url), request.cost.credits + " API credits ($" + request.cost.usd + ")");
import os
import requests
API = "https://api.doitong.com/v1"
headers = {"Authorization": "Bearer " + os.environ["DOITONG_API_KEY"]}
payload = {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/sdxl-controlnet-union", params={"wait": 20}, json=payload, headers=headers)
request = r.json()
if not r.ok:
raise RuntimeError(request["error"]["code"] + ": " + request["error"]["message"])
# Not finished yet: long-poll until it is
while request["status"] in ("queued", "running"):
request = requests.get(API + "/requests/" + request["id"], params={"wait": 20}, headers=headers).json()
if request["status"] != "succeeded":
raise RuntimeError(request["error"])
print([o["url"] for o in request["outputs"]], request["cost"]["credits"], "API credits", "$" + request["cost"]["usd"])
# 1. Connect once (Claude Code; Cursor, VS Code, Claude Desktop: https://doitong.com/lb/developers/docs/mcp)
claude mcp add --transport http doitong-models https://api.doitong.com/v1/mcp \
--header "Authorization: Bearer $DOITONG_API_KEY"
# 2. Your agent calls the "run" tool with:
{
"model_id": "sdxl-controlnet-union",
"input": {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
}
}
Rufft de SDXL ControlNet Union-Modell (sdxl-controlnet-union) iwwer d'Doitong API op. Dokumentatioun fir Agenten: https://doitong.com/lb/developers/models/sdxl-controlnet-union.md
POST https://api.doitong.com/v1/run/sdxl-controlnet-union?wait=20
Authorization: Bearer $DOITONG_API_KEY
Content-Type: application/json
{
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
}
Wann de Äntwertstatus "queued" oder "running" ass, frot GET https://api.doitong.com/v1/requests/REQUEST_ID?wait=20 of, bis en "succeeded" ass; d'Dateie stinn an outputs[].url. POST https://api.doitong.com/v1/quote/sdxl-controlnet-union mam selwechte Body gëtt de geneeë Präis virun der Ausféierung zréck.
Dës Ufro: ≈0,014 $ 14 API-Kreditter Op dëser Säit ausféieren
Ären neien API-Schlëssel. Si gëtt nëmmen elo ugewisen a steet schonn am Code an am API-Schlëssel-Feld hei drënner. Halt se geheim: Setz se ni an Code, deen an engem Browser leeft.
Äin éischt Resultat kënnt hei hin
Baut hei drënner eng Ufro a féiert se mat Ärem API-Schlëssel aus. Output gëtt an eis Späicherung kopéiert, fir ëmmer oder 7 Deeg gratis gespäichert.
Eng Ufro erstellen
D'Kontrolle ginn aus dem Modellschema generéiert. De Code an de Präis aktualiséiere sech, wann s du se ännerst.
/run/sdxl-controlnet-union?wait=20
Präis → 0,014 $
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/sdxl-controlnet-union?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
}'
# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY"
const API = "https://api.doitong.com/v1";
const headers = {
"Authorization": "Bearer " + process.env.DOITONG_API_KEY,
"Content-Type": "application/json",
};
// Run the model; wait up to 20 s for the finished result in the same call
let res = await fetch(API + "/run/sdxl-controlnet-union?wait=20", {
method: "POST",
headers,
body: JSON.stringify({
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
}),
});
let request = await res.json();
if (!res.ok) throw new Error(request.error.code + ": " + request.error.message);
// Not finished yet: long-poll until it is
while (request.status === "queued" || request.status === "running") {
res = await fetch(API + "/requests/" + request.id + "?wait=20", { headers });
request = await res.json();
}
if (request.status !== "succeeded") throw new Error(JSON.stringify(request.error));
console.log(request.outputs.map((o) => o.url), request.cost.credits + " API credits ($" + request.cost.usd + ")");
import os
import requests
API = "https://api.doitong.com/v1"
headers = {"Authorization": "Bearer " + os.environ["DOITONG_API_KEY"]}
payload = {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/sdxl-controlnet-union", params={"wait": 20}, json=payload, headers=headers)
request = r.json()
if not r.ok:
raise RuntimeError(request["error"]["code"] + ": " + request["error"]["message"])
# Not finished yet: long-poll until it is
while request["status"] in ("queued", "running"):
request = requests.get(API + "/requests/" + request["id"], params={"wait": 20}, headers=headers).json()
if request["status"] != "succeeded":
raise RuntimeError(request["error"])
print([o["url"] for o in request["outputs"]], request["cost"]["credits"], "API credits", "$" + request["cost"]["usd"])
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "run",
"arguments": {
"model_id": "sdxl-controlnet-union",
"input": {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
},
"wait_seconds": 20
}
}
}
Dës Ufro ausféieren
Äre Schlëssel bleift an dësem Browser: e gëtt nëmmen un d'Doitong API geschéckt an nëmme gespäichert (localStorage), wann s du „Erënneren“ aktivéiers. En API-Schlëssel kréien
Iwwer SDXL ControlNet Union
Generéiert SDXL-Biller aus engem `prompt`, gesteiert vu Kontrollbiller wéi openpose, Déiftekaart, teed, canny, normal oder Segmentéierung, jidderee mat sengem eegene Preprocess-Schalter. `controlnet_conditioning_scale` geet vun 0 bis 1. D'Bildgréisst kann aus dem Kontrollbild ofgeleet ginn. Ënnerstëtzt LoRAs, Embeddings, 1 bis 8 Biller an jpeg- oder png-Output.
Parameteren
Schéck entweder den kanoneschen Numm oder den natierlechen Numm, net béid. Kanonesch Nimm
promptobligatoresch
controlnet_conditioning_scaleoptional
negative_promptoptional
image_sizeoptional
num_inference_stepsoptional
seedoptional
guidance_scaleoptional
num_imagesoptional
num_outputs
lorasoptional
loras[].forceoptional
loras[].pathobligatoresch
loras[].scaleoptional
embeddingsoptional
embeddings[].pathobligatoresch
embeddings[].tokensoptional
enable_safety_checkeroptional
safety_checker_versionoptional
expand_promptoptional
formatoptional
request_idoptional
openpose_image_urloptional
openpose_preprocessoptional
depth_image_urloptional
depth_preprocessoptional
teed_image_urloptional
teed_preprocessoptional
canny_image_urloptional
canny_preprocessoptional
normal_image_urloptional
normal_preprocessoptional
segmentation_image_urloptional
segmentation_preprocessoptional
Fichierparameter akzeptéieren eng ëffentlech https:// URL, eng data: URI bis zu 10 MB oder de file_url vun engem Upload. Fichieren
Output
{
"id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
"object": "request",
"model": "sdxl-controlnet-union",
"status": "succeeded",
"created_at": "2026-10-20T12:00:00Z",
"started_at": "2026-10-20T12:00:02Z",
"completed_at": "2026-10-20T12:00:09Z",
"queue_position": null,
"cost": {
"credits": 14,
"usd": "0.014",
"charged": 14,
"refunded": 0
},
"input": {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
},
"output": {
"images": [
{
"url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
"width": 1024,
"height": 768,
"content_type": "image/jpeg"
}
],
"timings": {},
"seed": 42,
"has_nsfw_concepts": [
false
],
"prompt": "string"
},
"outputs": [
{
"type": "image",
"url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
"content_type": "image/jpeg",
"file_size": 1843200,
"width": 1024,
"height": 768,
"stored": true
}
],
"error": null,
"metrics": {
"inference_seconds": 6.8
},
"urls": {
"self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
"cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
}
}
Output-Felder
- images
- array of object {url, width, height, content_type}Dateiinformatioun fir déi generéiert Biller.
- timings
- object
- seed
- integerSeed fir d'Bild-Generatioun, inklusiv dem zoufälleg gewielte Wäert, wann am Input kee Seed uginn ass; soss gëtt de geliwwerte Wäert widderholl.
- has_nsfw_concepts
- array of booleanGëtt un, ob NSFW-Konzepter an de generéierte Biller optrieden.
- prompt
- stringPrompt, deen während der Bild-Generatioun benotzt gëtt.
Aner SDXL ControlNet Union-Varianten
Méi Modeller: Text zu Bild
Fir AI-Agenten: dës Säit als Markdown ass ënner https://doitong.com/lb/developers/models/sdxl-controlnet-union.md. All Modeller a Guiden: https://doitong.com/developers/llms.txt







