コンテンツへスキップ

Fooocus Inpainting

統合

モデル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"

このリクエスト: ≈$0.055 55 APIクレジット このページで実行

APIキーを取得
Open model 画像編集 #stylized#editing

オプションのマスクを使って画像をインペイントまたはアウトペイントし、細部修正や内容変更のモードを提供

Open model · 画像

最初の結果がここに表示されます

以下でリクエストを作成し、APIキーで実行してください。出力はストレージにコピーされ、永久保存または無料で7日保存されます。

リクエストを作成

コントロールはモデルスキーマから生成されます。値を変更するとコードと価格が更新されます。

デフォルト

生成したい画像をできるだけ詳しく説明してください。最良の結果を得るには詳細な記述を使用します。

•必須
ファイルをドロップ、または

インペイントに使用する参照画像。

デフォルト 1024x1024

プリセットから選択するか、カスタムの幅と高さを指定する出力画像の寸法。カスタム寸法はどちらも8で割り切れる必要があります。

num_images デフォルト 1

1回のリクエストで生成する画像数。

詳細設定 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
デフォルト

除外する画像の内容を指定するネガティブプロンプト。色、オブジェクト、景色、細部などを指定できます。例:口ひげ、ぼけ、低解像度。

デフォルト

希望するインペイント内容の説明。

ファイルをドロップ、または

画像生成時に適用するマスク画像。

performance デフォルト Extreme Speed

パフォーマンス設定:SpeedまたはQuality。

output_format デフォルト jpeg

結果の画像のファイル形式。

inpaint_engine デフォルト v2.6

Fooocusインペイントのモデルバージョン。

デフォルト None

リファイナーの選択:SDXLまたはSD 1.5。

デフォルト Inpaint or Outpaint (...

インペイント時に適用するモード。

デフォルト 4

画像選択におけるプロンプト準拠度。CFG(Classifier Free Guidance)として表します。

デフォルト 2

出力画像のシャープネス設定。値を上げると画像とテクスチャがより鮮明になります。

デフォルト 0.8

リファイナー切り替え値。リアル系SD1.5モデルには0.4、アニメ系SD1.5モデルには0.667、XL-refinersには0.8を使用します。2つのSDXLモデル間で切り替える場合は任意の値を指定できます。

デフォルト 1

インペイントのデノイズ強度。A1111のインペイント設定に相当します。常に1.0を使用するアウトペイントには適用されません。

デフォルト 0.618

A1111相当の値でインペイント領域を選択します。"Only Masked"は0、"Whole Image"は1に対応します。アウトペイントでは無視され、常に1.0が使用されます。

デフォルト 0

反転前のマスクの白い領域を調整します。デフォルト値は0です。正の値で拡大し、負の値で縮小します。

Stable Diffusionで画像を再現するためのシード。モデルバージョン、プロンプト、シードを変更しなければ、毎回画像を完全に再現できます。

デフォルト ["Fooocus Enhance","F...

生成時に適用するスタイル。

デフォルト []

アウトペイントで画像を拡張する方向。

デフォルト [{"path":"https://hug...

最終画像生成に統合するLoRA。最大5個まで。

POST /run/fooocus/inpaint?wait=20 見積もり → $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"

このリクエストを実行

キーはこのブラウザ内に保持されます。Doitong APIにのみ送信され、「記憶する」にチェックを入れた場合のみlocalStorageに保存されます。 APIキーを取得

Fooocus Inpaintingについて

マスク領域を再生成するか境界を拡張して既存画像を編集します。`inpaint_image_url`を指定し、必要に応じて`mask_image_url`を指定してから、`inpaint_mode`で通常のインペイント/アウトペイント、細部改善、内容変更を選択します。LoRA、最大4つの画像プロンプト、リファイナーの選択、png、jpeg、webpでのリクエストごとの1〜4出力にも対応します。Strengthおよび各フィールドの設定で変更量を細かく制御できます。

パラメータ

正式名称またはネイティブ名のいずれか一方を送信してください。両方は送信しないでください。 正式名称

名前型 デフォルト許可される値 説明
prompt任意
型string
デフォルト
生成したい画像をできるだけ詳しく説明してください。最良の結果を得るには詳細な記述を使用します。
negative_prompt任意
型string
デフォルト
除外する画像の内容を指定するネガティブプロンプト。色、オブジェクト、景色、細部などを指定できます。例:口ひげ、ぼけ、低解像度。
styles任意
型enum[]
デフォルト["Fooocus Enhance","Fooocus Sharp","Fooocus V2"]
生成時に適用するスタイル。
performance任意
型enum
デフォルトExtreme Speed
SpeedQualityExtreme SpeedLightning
パフォーマンス設定:SpeedまたはQuality。
guidance_scale任意
型number
デフォルト4
1 – 30
画像選択におけるプロンプト準拠度。CFG(Classifier Free Guidance)として表します。
sharpness任意
型number
デフォルト2
0 – 30
出力画像のシャープネス設定。値を上げると画像とテクスチャがより鮮明になります。
aspect_ratio任意
型string
デフォルト1024x1024
プリセットから選択するか、カスタムの幅と高さを指定する出力画像の寸法。カスタム寸法はどちらも8で割り切れる必要があります。
num_images任意 num_outputs
型integer
デフォルト1
1 – 4
1回のリクエストで生成する画像数。
loras任意
型object[]
デフォルト[{"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。最大5個まで。
loras[].path必須
型string
URLまたはパスで指定するLoRAウェイトの場所。
loras[].scale任意
型number
デフォルト0.1
0 – 1
ベースモデルに統合する前にLoRAウェイトへ適用する倍率。
refiner_model任意
型enum
デフォルトNone
NonerealisticVisionV60B1_v51VAE.safetensors
リファイナーの選択:SDXLまたはSD 1.5。
refiner_switch任意
型number
デフォルト0.8
0 – 1
リファイナー切り替え値。リアル系SD1.5モデルには0.4、アニメ系SD1.5モデルには0.667、XL-refinersには0.8を使用します。2つのSDXLモデル間で切り替える場合は任意の値を指定できます。
output_format任意
型enum
デフォルトjpeg
pngjpegwebp
結果の画像のファイル形式。
seed任意
型integer | null
Stable Diffusionで画像を再現するためのシード。モデルバージョン、プロンプト、シードを変更しなければ、毎回画像を完全に再現できます。
inpaint_image_url必須
型url · image
インペイントに使用する参照画像。
mask_image_url任意
型url · image
画像生成時に適用するマスク画像。
inpaint_mode任意
型enum
デフォルトInpaint or Outpaint (default)
Inpaint or Outpaint (default)Improve Detail (face, hand, eyes, etc.)Modify Content (add objects, change background, etc.)
インペイント時に適用するモード。
inpaint_additional_prompt任意
型string
デフォルト
希望するインペイント内容の説明。
outpaint_selections任意
型enum[]
デフォルト[]
アウトペイントで画像を拡張する方向。
override_inpaint_options任意
型boolean
デフォルトfalse
詳細設定のインペイント設定を上書きする切り替え:`inpaint_disable_initial_latent`、`inpaint_engine`、`inpaint_strength`、`inpaint_respective_field`、`inpaint_erode_or_dilate`。trueにするとこれらのオプションを上書きし、それ以外の場合はデフォルトを適用します。
inpaint_disable_initial_latent任意
型boolean
デフォルトfalse
初期前処理の切り替え。trueにするとその前処理を無効化します。
inpaint_engine任意
型enum
デフォルトv2.6
Nonev1v2.5v2.6
Fooocusインペイントのモデルバージョン。
inpaint_strength任意
型number
デフォルト1
≤ 1> 0
インペイントのデノイズ強度。A1111のインペイント設定に相当します。常に1.0を使用するアウトペイントには適用されません。
inpaint_respective_field任意
型number
デフォルト0.618
0 – 1
A1111相当の値でインペイント領域を選択します。"Only Masked"は0、"Whole Image"は1に対応します。アウトペイントでは無視され、常に1.0が使用されます。
inpaint_erode_or_dilate任意
型number
デフォルト0
-64 – 64
反転前のマスクの白い領域を調整します。デフォルト値は0です。正の値で拡大し、負の値で縮小します。
invert_mask任意
型boolean
デフォルトfalse
マスク反転の切り替え。trueにするとマスクを反転します。
image_prompt_1任意
型object
image_prompt_1.type任意
型enum
デフォルトImagePrompt
ImagePromptPyraCannyCPDSFaceSwap
image_prompt_1.image_url任意
型url · image
image_prompt_1.stop_at任意
型number
デフォルト0.5
0 – 1
image_prompt_1.weight任意
型number
デフォルト1
0 – 2
image_prompt_2任意
型object
image_prompt_2.type任意
型enum
デフォルトImagePrompt
ImagePromptPyraCannyCPDSFaceSwap
image_prompt_2.image_url任意
型url · image
image_prompt_2.stop_at任意
型number
デフォルト0.5
0 – 1
image_prompt_2.weight任意
型number
デフォルト1
0 – 2
image_prompt_3任意
型object
image_prompt_3.type任意
型enum
デフォルトImagePrompt
ImagePromptPyraCannyCPDSFaceSwap
image_prompt_3.image_url任意
型url · image
image_prompt_3.stop_at任意
型number
デフォルト0.5
0 – 1
image_prompt_3.weight任意
型number
デフォルト1
0 – 2
image_prompt_4任意
型object
image_prompt_4.type任意
型enum
デフォルトImagePrompt
ImagePromptPyraCannyCPDSFaceSwap
image_prompt_4.image_url任意
型url · image
image_prompt_4.stop_at任意
型number
デフォルト0.5
0 – 1
image_prompt_4.weight任意
型number
デフォルト1
0 – 2
mixing_image_prompt_and_inpaint任意
型boolean
デフォルトfalse
画像 PromptとInpaintを組み合わせます。
enable_safety_checker任意
型boolean
デフォルトtrue
安全性チェッカーの切り替え。falseにするとチェックが無効になります。
必須 正式名称(こちらも使用可能)

ファイルパラメータには、公開されたhttps:// URL、10 MBまでのdata: URI、またはアップロードしたファイルのfile_urlを指定します。 ファイル

出力

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"
  }
}
ファイルの保存期間を選択すべてのoutputs[].urlはストレージ上のコピーです。アカウント設定または?storage=により、永久保存(GB・月単位で有料)または無料で7日保存できます。
すべてのモデルで同じ形式画像、動画、音声のいずれでも、type、url、content_type、width、height、durationが含まれます。outputはモデル独自の結果オブジェクトです。
出力フィールド
images
array of object {url, content_type, file_name, file_size, width, height}生成された画像のファイル情報。
timings
object生成にかかった経過時間。
has_nsfw_concepts
array of boolean生成画像に NSFW 概念が含まれるかどうかを示します。

その他のモデル: 画像編集

AIエージェント向け:このページのMarkdown版はこちらです: https://doitong.com/ja/developers/models/fooocus/inpaint.md. すべてのモデルとガイド: https://doitong.com/developers/llms.txt