Op den Inhalt sprangen

Fooocus Inpainting

Integréieren

Modell-ID 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"

Dës Ufro: ≈0,055 $ 55 API-Kreditter Op dëser Säit ausféieren

API-Schlëssel kréien
Open model Bildbearbechtung #stylized#editing

Inpaint oder Outpaint fir e Bild mat optionaler Mask, mat Modi fir Detailkorrekturen oder Inhaltsännerungen

Open model · Bild

Ä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.

Standard

Beschreift d'Bild, dat Dir generéiere wëllt, mat esou vill Detailer wéi méiglech, fir déi bescht Resultater ze kréien.

•obligatoresch
Fichier erofzéien, oder

Referenzbild, dat beim Inpainting benotzt gëtt.

Standard 1024x1024

Dimensioune vum Output-Bild, aus Presets ausgewielt oder als personaliséiert Breet an Héicht uginn. Béid personaliséiert Dimensioune mussen duerch 8 deelbar sinn.

num_images Standard 1

Zuel vu Biller, déi pro Ufro generéiert ginn.

Erweidert negative_prompt · inpaint_additional_prompt · mask_image_url · performance · output_format · inpaint_engine · refiner_model · inpaint_mode · guidance_scale · sharpness · refiner_switch · inpaint_strength · inpaint_respective_field · inpaint_erode_or_dilate · seed · override_inpaint_options · inpaint_disable_initial_latent · invert_mask · mixing_image_prompt_and_inpaint · enable_safety_checker · styles · outpaint_selections · loras · image_prompt_1 · image_prompt_2 · image_prompt_3 · image_prompt_4
Standard

Negativen Prompt, deen auszeschléissend Bilddetailer ugëtt, dorënner Faarwen, Objeten, Landschaften oder méi fein Feature. Beispiller si Moustache, Onschäerft oder niddreg Opléisung.

Standard

Beschreiwung vum gewënschten Inpainting-Inhalt.

Fichier erofzéien, oder

Maskebild, dat während der Bildgeneratioun ugewannt gëtt.

performance Standard Extreme Speed

Performance-Auswiel: Speed oder Quality.

output_format Standard jpeg

Dateiformat vum resultéierende Bild.

inpaint_engine Standard v2.6

Modellversioun fir Fooocus-Inpainting.

Standard None

Refiner-Auswiel: SDXL oder SD 1.5.

Standard Inpaint or Outpaint (...

Modus, deen beim Inpainting ugewannt gëtt.

Standard 4

Stäerkt vun der Prompt-Entspriechung bei der Bildauswiel, ausgedréckt als CFG (Classifier Free Guidance).

Standard 2

Schäerftastellung fir d'Output-Bild. Eng Erhéijung mécht d'Bild a seng Texturen méi schaarf.

Standard 0.8

Refiner-Schaltwäert: benotzt 0.4 mat realistesche SD1.5-Modeller, 0.667 mat Anime-SD1.5-Modeller an 0.8 mat XL-Refiners. Beim Wiessel tëscht zwee SDXL-Modeller ass all Wäert erlaabt.

Standard 1

Denoising-Stäerkt fir Inpainting, gläichwäerteg mat der Inpaint-Astellung vun A1111. Si gëllt net fir Outpainting, dat ëmmer 1.0 benotzt.

Standard 0.618

Wielt de Beräich fir Inpainting mat den Entspriechunge vun A1111: "Only Masked" entsprécht 0 an "Whole Image" entsprécht 1. Outpainting ignoréiert dës Astellung a benotzt ëmmer 1.0.

Standard 0

Passt de wäisse Beräich vun der Mask virun all Inversioun un; de Standardwäert ass 0. Positiv Wäerter vergréisseren de Beräich, negativ Wäerter maachen en méi kleng.

Seed fir d'Reproduktioun vu Biller a Stable Diffusion. E Bild kann bei all Duerchlaf genee reproduzéiert ginn, wann d'Modellversioun, de Prompt an de Seed onverännert bleiwen.

Standard ["Fooocus Enhance","F...

Stil, deen während der Generatioun ugewannt gëtt.

Standard []

Richtungen, an deenen Outpainting d'Bild erweidert.

Standard [{"path":"https://hug...

LoRA-Auswiel, déi fir d'final Bildgeneratioun zesummegefouert gëtt; limitéiert op 5 LoRAs.

POST /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"

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

NummTyp StandardErlaabt Beschreiwung
promptoptional
Typstring
Standard
Beschreift d'Bild, dat Dir generéiere wëllt, mat esou vill Detailer wéi méiglech, fir déi bescht Resultater ze kréien.
negative_promptoptional
Typstring
Standard
Negativen Prompt, deen auszeschléissend Bilddetailer ugëtt, dorënner Faarwen, Objeten, Landschaften oder méi fein Feature. Beispiller si Moustache, Onschäerft oder niddreg Opléisung.
stylesoptional
Typenum[]
Standard["Fooocus Enhance","Fooocus Sharp","Fooocus V2"]
Stil, deen während der Generatioun ugewannt gëtt.
performanceoptional
Typenum
StandardExtreme Speed
SpeedQualityExtreme SpeedLightning
Performance-Auswiel: Speed oder Quality.
guidance_scaleoptional
Typnumber
Standard4
1 – 30
Stäerkt vun der Prompt-Entspriechung bei der Bildauswiel, ausgedréckt als CFG (Classifier Free Guidance).
sharpnessoptional
Typnumber
Standard2
0 – 30
Schäerftastellung fir d'Output-Bild. Eng Erhéijung mécht d'Bild a seng Texturen méi schaarf.
aspect_ratiooptional
Typstring
Standard1024x1024
Dimensioune vum Output-Bild, aus Presets ausgewielt oder als personaliséiert Breet an Héicht uginn. Béid personaliséiert Dimensioune mussen duerch 8 deelbar sinn.
num_imagesoptional num_outputs
Typinteger
Standard1
1 – 4
Zuel vu Biller, déi pro Ufro generéiert ginn.
lorasoptional
Typobject[]
Standard[{"path":"https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_offset_example-lora_1.0.safetensors","scale":0.1}]
LoRA-Auswiel, déi fir d'final Bildgeneratioun zesummegefouert gëtt; limitéiert op 5 LoRAs.
loras[].pathobligatoresch
Typstring
Plaz vun de LoRA-Gewiichter, uginn als URL oder Pad.
loras[].scaleoptional
Typnumber
Standard0.1
0 – 1
Multiplikator, deen op d'LoRA-Gewiicht applizéiert gëtt, ier et an de Basismodell zesummegefouert gëtt.
refiner_modeloptional
Typenum
StandardNone
NonerealisticVisionV60B1_v51VAE.safetensors
Refiner-Auswiel: SDXL oder SD 1.5.
refiner_switchoptional
Typnumber
Standard0.8
0 – 1
Refiner-Schaltwäert: benotzt 0.4 mat realistesche SD1.5-Modeller, 0.667 mat Anime-SD1.5-Modeller an 0.8 mat XL-Refiners. Beim Wiessel tëscht zwee SDXL-Modeller ass all Wäert erlaabt.
output_formatoptional
Typenum
Standardjpeg
pngjpegwebp
Dateiformat vum resultéierende Bild.
seedoptional
Typinteger | null
Seed fir d'Reproduktioun vu Biller a Stable Diffusion. E Bild kann bei all Duerchlaf genee reproduzéiert ginn, wann d'Modellversioun, de Prompt an de Seed onverännert bleiwen.
inpaint_image_urlobligatoresch
Typurl · image
Referenzbild, dat beim Inpainting benotzt gëtt.
mask_image_urloptional
Typurl · image
Maskebild, dat während der Bildgeneratioun ugewannt gëtt.
inpaint_modeoptional
Typenum
StandardInpaint or Outpaint (default)
Inpaint or Outpaint (default)Improve Detail (face, hand, eyes, etc.)Modify Content (add objects, change background, etc.)
Modus, deen beim Inpainting ugewannt gëtt.
inpaint_additional_promptoptional
Typstring
Standard
Beschreiwung vum gewënschten Inpainting-Inhalt.
outpaint_selectionsoptional
Typenum[]
Standard[]
Richtungen, an deenen Outpainting d'Bild erweidert.
override_inpaint_optionsoptional
Typboolean
Standardfalse
Iwwerschreiwschalter fir erweidert Inpainting-Astellungen: `inpaint_disable_initial_latent`, `inpaint_engine`, `inpaint_strength`, `inpaint_respective_field`, an `inpaint_erode_or_dilate`. Wann dëst op true gesat gëtt, iwwerschreift et dës Optiounen; soss gëllen hir Standardwäerter.
inpaint_disable_initial_latentoptional
Typboolean
Standardfalse
Schalter fir initial Virveraarbechtung: true deaktivéiert dës Virveraarbechtung.
inpaint_engineoptional
Typenum
Standardv2.6
Nonev1v2.5v2.6
Modellversioun fir Fooocus-Inpainting.
inpaint_strengthoptional
Typnumber
Standard1
≤ 1> 0
Denoising-Stäerkt fir Inpainting, gläichwäerteg mat der Inpaint-Astellung vun A1111. Si gëllt net fir Outpainting, dat ëmmer 1.0 benotzt.
inpaint_respective_fieldoptional
Typnumber
Standard0.618
0 – 1
Wielt de Beräich fir Inpainting mat den Entspriechunge vun A1111: "Only Masked" entsprécht 0 an "Whole Image" entsprécht 1. Outpainting ignoréiert dës Astellung a benotzt ëmmer 1.0.
inpaint_erode_or_dilateoptional
Typnumber
Standard0
-64 – 64
Passt de wäisse Beräich vun der Mask virun all Inversioun un; de Standardwäert ass 0. Positiv Wäerter vergréisseren de Beräich, negativ Wäerter maachen en méi kleng.
invert_maskoptional
Typboolean
Standardfalse
Schalter fir d'Inversioun vun der Mask; true dréint d'Mask ëm.
image_prompt_1optional
Typobject
image_prompt_1.typeoptional
Typenum
StandardImagePrompt
ImagePromptPyraCannyCPDSFaceSwap
image_prompt_1.image_urloptional
Typurl · image
image_prompt_1.stop_atoptional
Typnumber
Standard0.5
0 – 1
image_prompt_1.weightoptional
Typnumber
Standard1
0 – 2
image_prompt_2optional
Typobject
image_prompt_2.typeoptional
Typenum
StandardImagePrompt
ImagePromptPyraCannyCPDSFaceSwap
image_prompt_2.image_urloptional
Typurl · image
image_prompt_2.stop_atoptional
Typnumber
Standard0.5
0 – 1
image_prompt_2.weightoptional
Typnumber
Standard1
0 – 2
image_prompt_3optional
Typobject
image_prompt_3.typeoptional
Typenum
StandardImagePrompt
ImagePromptPyraCannyCPDSFaceSwap
image_prompt_3.image_urloptional
Typurl · image
image_prompt_3.stop_atoptional
Typnumber
Standard0.5
0 – 1
image_prompt_3.weightoptional
Typnumber
Standard1
0 – 2
image_prompt_4optional
Typobject
image_prompt_4.typeoptional
Typenum
StandardImagePrompt
ImagePromptPyraCannyCPDSFaceSwap
image_prompt_4.image_urloptional
Typurl · image
image_prompt_4.stop_atoptional
Typnumber
Standard0.5
0 – 1
image_prompt_4.weightoptional
Typnumber
Standard1
0 – 2
mixing_image_prompt_and_inpaintoptional
Typboolean
Standardfalse
Verknëppt Bild Prompt mat Inpaint.
enable_safety_checkeroptional
Typboolean
Standardtrue
Schalter vun der Sécherheetskontroll; wann en op false gesat gëtt, gëtt d'Kontroll deaktivéiert.
obligatoresch Kanoneschen Numm, och akzeptéiert

Fichierparameter akzeptéieren eng ëffentlech https:// URL, eng data: URI bis zu 10 MB oder de file_url vun engem Upload. Fichieren

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "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"
  }
}
Är Fichieren, Är WielAll outputs[].url ass eng Kopie an eiser Späicherung: fir ëmmer gespäichert (bezuelbar pro GB-Mount) oder 7 Deeg gratis, jee no Ärer Kontastellung oder ?storage=.
D'selwecht Struktur bei all Modelltype, url, content_type, width, height an duration, fir Biller, Video an Audio gläichermoossen. output ass dem Modell säin eegent Resultatobjet.
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.

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