Fooocus Inpainting
Integréieren
fooocus/inpaint
# 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/fooocus/inpaint?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"inpaint_image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
}'
# 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/fooocus/inpaint?wait=20", {
method: "POST",
headers,
body: JSON.stringify({
"inpaint_image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
}),
});
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 = {
"inpaint_image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/fooocus/inpaint", 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": "fooocus/inpaint",
"input": {
"inpaint_image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
}
}
Rufft de Fooocus Inpainting-Modell (fooocus/inpaint) iwwer d'Doitong API op. Dokumentatioun fir Agenten: https://doitong.com/lb/developers/models/fooocus/inpaint.md
POST https://api.doitong.com/v1/run/fooocus/inpaint?wait=20
Authorization: Bearer $DOITONG_API_KEY
Content-Type: application/json
{
"inpaint_image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
}
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/fooocus/inpaint mam selwechte Body gëtt de geneeë Präis virun der Ausféierung zréck.
Dës Ufro: ≈0,055 $ 55 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/fooocus/inpaint?wait=20
Präis → 0,055 $
# 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/fooocus/inpaint?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"inpaint_image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
}'
# 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/fooocus/inpaint?wait=20", {
method: "POST",
headers,
body: JSON.stringify({
"inpaint_image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
}),
});
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 = {
"inpaint_image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/fooocus/inpaint", 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": "fooocus/inpaint",
"input": {
"inpaint_image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
},
"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 Fooocus Inpainting
Ännert en existent Bild andeems e maskéierte Beräich nei generéiert oder d’Ränner verlängert ginn. Gitt `inpaint_image_url` an optional `mask_image_url` un a wielt en `inpaint_mode`: normale Inpaint/Outpaint, Detailverbesserung oder Inhaltsännerung. Och LoRAs, bis zu véier Bild-Prompts, eng Refiner-Wiel an 1 bis 4 Ausgaben pro Ufro als png, jpeg oder webp ginn ënnerstëtzt. Strength an entspriechend Feldastellunge erlaben eng méi fein Kontroll iwwer d’Ännerungen.
Parameteren
Schéck entweder den kanoneschen Numm oder den natierlechen Numm, net béid. Kanonesch Nimm
promptoptional
negative_promptoptional
stylesoptional
performanceoptional
guidance_scaleoptional
sharpnessoptional
aspect_ratiooptional
num_imagesoptional
num_outputs
lorasoptional
loras[].pathobligatoresch
loras[].scaleoptional
refiner_modeloptional
refiner_switchoptional
output_formatoptional
seedoptional
inpaint_image_urlobligatoresch
mask_image_urloptional
inpaint_modeoptional
inpaint_additional_promptoptional
outpaint_selectionsoptional
override_inpaint_optionsoptional
inpaint_disable_initial_latentoptional
inpaint_engineoptional
inpaint_strengthoptional
inpaint_respective_fieldoptional
inpaint_erode_or_dilateoptional
invert_maskoptional
image_prompt_1optional
image_prompt_1.typeoptional
image_prompt_1.image_urloptional
image_prompt_1.stop_atoptional
image_prompt_1.weightoptional
image_prompt_2optional
image_prompt_2.typeoptional
image_prompt_2.image_urloptional
image_prompt_2.stop_atoptional
image_prompt_2.weightoptional
image_prompt_3optional
image_prompt_3.typeoptional
image_prompt_3.image_urloptional
image_prompt_3.stop_atoptional
image_prompt_3.weightoptional
image_prompt_4optional
image_prompt_4.typeoptional
image_prompt_4.image_urloptional
image_prompt_4.stop_atoptional
image_prompt_4.weightoptional
mixing_image_prompt_and_inpaintoptional
enable_safety_checkeroptional
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": "fooocus/inpaint",
"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": 55,
"usd": "0.055",
"charged": 55,
"refunded": 0
},
"input": {
"inpaint_image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
},
"output": {
"images": [
{
"url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
"content_type": "image/jpeg",
"file_name": "0-output.jpeg",
"file_size": 1843200,
"width": 1024,
"height": 768
}
],
"timings": {},
"has_nsfw_concepts": [
false
]
},
"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, content_type, file_name, file_size, width, height}Dateiinformatioune fir dat generéiert Bild.
- timings
- objectVergaangen Zäit fir d'Generatioun.
- has_nsfw_concepts
- array of booleanGëtt un, ob NSFW-Konzepter an de generéierte Biller optrieden.
Aner Fooocus-Varianten
Méi Modeller: Bildbearbechtung
Fir AI-Agenten: dës Säit als Markdown ass ënner https://doitong.com/lb/developers/models/fooocus/inpaint.md. All Modeller a Guiden: https://doitong.com/developers/llms.txt






