Skip to content

Fooocus

Integrate

Model id fooocus
# 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?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": ""
  }'

# 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"

This request: ≈$0.444 444 API credits Run it on this page

Get API key
Open model Text to Image #stylized

Text-to-image generator with style presets, LoRA merging, refiner option and image-based control modes

Open model · Image

Your first result goes here

Build a request below and run it with your API key. Outputs are copied to our storage, kept forever or 7 days for free.

Build a request

Controls are generated from the model schema. The code and the price update as you change them.

Describe the image you want generated, using as much detail as possible to get the best results.

default 1024x1024

Output image dimensions, selected from presets or specified as custom width and height. Both custom dimensions must be divisible by 8.

num_images default 1

Image count to generate per request.

Advanced negative_prompt · control_image_url · inpaint_image_url · mask_image_url · performance · output_format · control_type · refiner_model · guidance_scale · sharpness · refiner_switch · control_image_weight · control_image_stop_at · seed · mixing_image_prompt_and_inpaint · enable_safety_checker · styles · loras
default

Negative prompt specifying image details to exclude, including colors, objects, scenery, or finer features. Examples include a moustache, blur, or low resolution.

Drop a file, or

Reference image that guides image generation.

Drop a file, or

Reference image used during inpainting.

Drop a file, or

Mask image applied during image generation.

performance default Extreme Speed

Performance choice: Speed or Quality.

output_format default jpeg

File format for the resulting image.

control_type default PyraCanny

Image control method.

default None

Refiner selection: SDXL or SD 1.5.

default 4

Prompt-adherence strength for image selection, expressed as CFG (Classifier Free Guidance).

default 2

Sharpness setting for the output image. Increasing it makes both the image and its textures sharper.

default 0.8

Refiner switch value: use 0.4 with realistic SD1.5 models, 0.667 with anime SD1.5 models, and 0.8 with XL-refiners. Switching between two SDXL models permits any value.

default 1

Control image strength, determining the degree of resemblance between the output and the control image.

default 1

Control image stopping value, governing how closely the output resembles the control image.

Seed for reproducing images in Stable Diffusion. An image can be reproduced exactly on every run by keeping the model version, prompt, and seed unchanged.

default ["Fooocus Enhance","F...

Style applied during generation.

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

LoRA selection merged for final image generation, limited to 5 LoRAs.

POST /run/fooocus?wait=20 quote → $0.444
# 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?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": ""
  }'

# 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"

Run this request

Your key stays in this browser: it is sent only to the Doitong API and saved (localStorage) only if you tick Remember. Get an API key

About Fooocus

Generates images from a prompt using Fooocus with its default style stack. Choose a `performance` mode (Speed, Quality, Extreme Speed, Lightning), set `sharpness` and `aspect_ratio`, and request 1 to 4 images. Up to 5 LoRAs can be merged, and an optional control image supports ImagePrompt, PyraCanny, CPDS or FaceSwap guidance. Output is png, jpeg or webp.

Parameters

Send either the canonical name or the native name, not both. Canonical names

NameType DefaultAllowed Description
promptoptional
Typestring
Default
Describe the image you want generated, using as much detail as possible to get the best results.
negative_promptoptional
Typestring
Default
Negative prompt specifying image details to exclude, including colors, objects, scenery, or finer features. Examples include a moustache, blur, or low resolution.
stylesoptional
Typeenum[]
Default["Fooocus Enhance","Fooocus Sharp","Fooocus V2"]
Style applied during generation.
performanceoptional
Typeenum
DefaultExtreme Speed
SpeedQualityExtreme SpeedLightning
Performance choice: Speed or Quality.
guidance_scaleoptional
Typenumber
Default4
1 – 30
Prompt-adherence strength for image selection, expressed as CFG (Classifier Free Guidance).
sharpnessoptional
Typenumber
Default2
0 – 30
Sharpness setting for the output image. Increasing it makes both the image and its textures sharper.
aspect_ratiooptional
Typestring
Default1024x1024
Output image dimensions, selected from presets or specified as custom width and height. Both custom dimensions must be divisible by 8.
num_imagesoptional num_outputs
Typeinteger
Default1
1 – 4
Image count to generate per request.
lorasoptional
Typeobject[]
Default[{"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 selection merged for final image generation, limited to 5 LoRAs.
loras[].pathrequired
Typestring
Location of the LoRA weights, specified as a URL or path.
loras[].scaleoptional
Typenumber
Default0.1
0 – 1
Multiplier applied to the LoRA weight before it is merged into the base model.
refiner_modeloptional
Typeenum
DefaultNone
NonerealisticVisionV60B1_v51VAE.safetensors
Refiner selection: SDXL or SD 1.5.
refiner_switchoptional
Typenumber
Default0.8
0 – 1
Refiner switch value: use 0.4 with realistic SD1.5 models, 0.667 with anime SD1.5 models, and 0.8 with XL-refiners. Switching between two SDXL models permits any value.
output_formatoptional
Typeenum
Defaultjpeg
pngjpegwebp
File format for the resulting image.
seedoptional
Typeinteger | null
Seed for reproducing images in Stable Diffusion. An image can be reproduced exactly on every run by keeping the model version, prompt, and seed unchanged.
control_image_urloptional
Typeurl · image
Reference image that guides image generation.
control_typeoptional
Typeenum
DefaultPyraCanny
ImagePromptPyraCannyCPDSFaceSwap
Image control method.
control_image_weightoptional
Typenumber
Default1
0 – 2
Control image strength, determining the degree of resemblance between the output and the control image.
control_image_stop_atoptional
Typenumber
Default1
0 – 1
Control image stopping value, governing how closely the output resembles the control image.
inpaint_image_urloptional
Typeurl · image
Reference image used during inpainting.
mask_image_urloptional
Typeurl · image
Mask image applied during image generation.
mixing_image_prompt_and_inpaintoptional
Typeboolean
Defaultfalse
enable_safety_checkeroptional
Typeboolean
Defaulttrue
Safety checker toggle: false disables checking only with account authorization. Requests without that authorization always undergo checks, and unsafe images are replaced with black images.
required Canonical name, also accepted

File parameters take a public https:// URL, a data: URI up to 10 MB, or the file_url of an upload. Files

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "fooocus",
  "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": 444,
    "usd": "0.444",
    "charged": 444,
    "refunded": 0
  },
  "input": {
    "prompt": ""
  },
  "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"
  }
}
Your files, your choiceEvery outputs[].url is a copy on our storage: kept forever (paid per GB-month) or 7 days for free, by your account setting or ?storage=.
Same shape on every modeltype, url, content_type, width, height and duration, for images, video and audio alike. output is the model’s own result object.
Fields of output
images
array of object {url, content_type, file_name, file_size, width, height}File information for the generated image.
timings
objectElapsed time for generation.
has_nsfw_concepts
array of booleanIndicates whether NSFW concepts appear in the generated images.

More models: Text to Image

For AI agents: this page as Markdown is at https://doitong.com/en-GB/developers/models/fooocus.md. All models and guides: https://doitong.com/developers/llms.txt