Fooocus
Generate images with Fooocus, featuring extensive controls including style presets, image prompting, inpainting, outpainting, upscaling, and custom LoRA support.
Quick Start
Requires an each::labs API key. Get one at eachlabs.ai.
curl -X POST https://api.eachlabs.ai/v1/prediction \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"model": "fooocus-api",
"version": "0.0.1",
"input": {
"prompt": "a majestic dragon flying over a medieval castle at sunset, epic fantasy art",
"aspect_ratios_selection": "1152*896",
"performance_selection": "Quality",
"style_selections": "Fooocus V2,Fooocus Enhance,Fooocus Sharp",
"guidance_scale": 7
}
}'
Parameters
| Parameter |
Type |
Default |
Description |
| aspect_ratios_selection |
string |
1152*896 |
Output resolution. enum: 7041408, 7681344, 8321216, 8961152, 9601088, 10241024, 1088960, 1152896, 1216832, 1280768, 1344768, 1408704, and more |
| cn_img1 |
string |
- |
Input image for image prompt slot 1 |
| cn_img2 |
string |
- |
Input image for image prompt slot 2 |
| cn_img3 |
string |
- |
Input image for image prompt slot 3 |
| cn_img4 |
string |
- |
Input image for image prompt slot 4 |
| cn_stop1 |
number |
0.5 |
Stop at for image prompt 1 |
| cn_type1 |
string |
ImagePrompt |
Control type for slot 1. enum: ImagePrompt, FaceSwap, PyraCanny, CPDS |
| cn_weight1 |
number |
- |
Weight for image prompt 1 |
| guidance_scale |
number |
7 |
Guidance scale |
| image_number |
integer |
1 |
How many images to generate |
| image_seed |
integer |
-1 |
Seed, -1 for random |
| inpaint_additional_prompt |
string |
- |
Prompt for inpainting |
| inpaint_input_image |
string |
- |
Input image for inpaint or outpaint |
| inpaint_input_mask |
string |
- |
Input mask for inpaint |
| loras_custom_urls |
string |
- |
Custom LoRA URLs in format 'url,weight' separated by ; |
| negative_prompt |
string |
- |
Negative prompt |
| outpaint_distance_bottom |
number |
0 |
Outpaint expansion from bottom |
| outpaint_distance_left |
number |
0 |
Outpaint expansion from left |
| outpaint_distance_right |
number |
0 |
Outpaint expansion from right |
| outpaint_distance_top |
number |
0 |
Outpaint expansion from top |
| outpaint_selections |
string |
- |
Outpaint directions: Left, Right, Top, Bottom (comma separated) |
| performance_selection |
string |
Speed |
Performance mode. enum: Speed, Quality, Extreme Speed |
| prompt |
string |
- |
Prompt for image generation |
| refiner_switch |
number |
0.5 |
Refiner switch point |
| sharpness |
number |
2 |
Sharpness |
| style_selections |
string |
Fooocus V2,Fooocus Enhance,Fooocus Sharp |
Fooocus styles, separated by comma |
| uov_input_image |
string |
- |
Input image for upscale or variation |
| uov_method |
string |
Disabled |
Upscale/variation method. enum: Disabled, Vary (Subtle), Vary (Strong), Upscale (1.5x), Upscale (2x), Upscale (Fast 2x), Upscale (Custom) |
| uov_upscale_value |
number |
0 |
Custom upscale value |
| use_default_loras |
boolean |
true |
Use default LoRAs |
Examples
Quality generation with face swap:
curl -X POST https://api.eachlabs.ai/v1/prediction \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"model": "fooocus-api",
"version": "0.0.1",
"input": {
"prompt": "a professional headshot portrait, studio lighting, clean background",
"cn_img1": "https://example.com/face-reference.jpg",
"cn_type1": "FaceSwap",
"cn_stop1": 0.8,
"performance_selection": "Quality",
"aspect_ratios_selection": "1024*1024"
}
}'
Image outpainting:
curl -X POST https://api.eachlabs.ai/v1/prediction \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"model": "fooocus-api",
"version": "0.0.1",
"input": {
"prompt": "a beautiful landscape with mountains and a lake, golden hour",
"inpaint_input_image": "https://example.com/cropped-landscape.jpg",
"outpaint_selections": "Left,Right",
"outpaint_distance_left": 200,
"outpaint_distance_right": 200,
"performance_selection": "Quality"
}
}'
Related Models
Documentation
1---2name: fooocus-api3description: Fooocus | Advanced AI Image Generation. Generate images with extensive controls including styles, LoRAs, inpainting, outpainting, and upscaling. Triggers: fooocus, image generation, styled image, inpaint, outpaint, upscale4---56# Fooocus78Generate images with Fooocus, featuring extensive controls including style presets, image prompting, inpainting, outpainting, upscaling, and custom LoRA support.910## Quick Start1112> Requires an each::labs API key. Get one at [eachlabs.ai](https://eachlabs.ai).1314```bash15curl -X POST https://api.eachlabs.ai/v1/prediction \16 -H "Content-Type: application/json" \17 -H "X-API-Key: $EACHLABS_API_KEY" \18 -d '{19 "model": "fooocus-api",20 "version": "0.0.1",21 "input": {22 "prompt": "a majestic dragon flying over a medieval castle at sunset, epic fantasy art",23 "aspect_ratios_selection": "1152*896",24 "performance_selection": "Quality",25 "style_selections": "Fooocus V2,Fooocus Enhance,Fooocus Sharp",26 "guidance_scale": 727 }28 }'29```3031## Parameters3233| Parameter | Type | Default | Description |34|-----------|------|---------|-------------|35| aspect_ratios_selection | string | 1152*896 | Output resolution. enum: 704*1408, 768*1344, 832*1216, 896*1152, 960*1088, 1024*1024, 1088*960, 1152*896, 1216*832, 1280*768, 1344*768, 1408*704, and more |36| cn_img1 | string | - | Input image for image prompt slot 1 |37| cn_img2 | string | - | Input image for image prompt slot 2 |38| cn_img3 | string | - | Input image for image prompt slot 3 |39| cn_img4 | string | - | Input image for image prompt slot 4 |40| cn_stop1 | number | 0.5 | Stop at for image prompt 1 |41| cn_type1 | string | ImagePrompt | Control type for slot 1. enum: ImagePrompt, FaceSwap, PyraCanny, CPDS |42| cn_weight1 | number | - | Weight for image prompt 1 |43| guidance_scale | number | 7 | Guidance scale |44| image_number | integer | 1 | How many images to generate |45| image_seed | integer | -1 | Seed, -1 for random |46| inpaint_additional_prompt | string | - | Prompt for inpainting |47| inpaint_input_image | string | - | Input image for inpaint or outpaint |48| inpaint_input_mask | string | - | Input mask for inpaint |49| loras_custom_urls | string | - | Custom LoRA URLs in format 'url,weight' separated by ; |50| negative_prompt | string | - | Negative prompt |51| outpaint_distance_bottom | number | 0 | Outpaint expansion from bottom |52| outpaint_distance_left | number | 0 | Outpaint expansion from left |53| outpaint_distance_right | number | 0 | Outpaint expansion from right |54| outpaint_distance_top | number | 0 | Outpaint expansion from top |55| outpaint_selections | string | - | Outpaint directions: Left, Right, Top, Bottom (comma separated) |56| performance_selection | string | Speed | Performance mode. enum: Speed, Quality, Extreme Speed |57| prompt | string | - | Prompt for image generation |58| refiner_switch | number | 0.5 | Refiner switch point |59| sharpness | number | 2 | Sharpness |60| style_selections | string | Fooocus V2,Fooocus Enhance,Fooocus Sharp | Fooocus styles, separated by comma |61| uov_input_image | string | - | Input image for upscale or variation |62| uov_method | string | Disabled | Upscale/variation method. enum: Disabled, Vary (Subtle), Vary (Strong), Upscale (1.5x), Upscale (2x), Upscale (Fast 2x), Upscale (Custom) |63| uov_upscale_value | number | 0 | Custom upscale value |64| use_default_loras | boolean | true | Use default LoRAs |6566## Examples6768**Quality generation with face swap:**69```bash70curl -X POST https://api.eachlabs.ai/v1/prediction \71 -H "Content-Type: application/json" \72 -H "X-API-Key: $EACHLABS_API_KEY" \73 -d '{74 "model": "fooocus-api",75 "version": "0.0.1",76 "input": {77 "prompt": "a professional headshot portrait, studio lighting, clean background",78 "cn_img1": "https://example.com/face-reference.jpg",79 "cn_type1": "FaceSwap",80 "cn_stop1": 0.8,81 "performance_selection": "Quality",82 "aspect_ratios_selection": "1024*1024"83 }84 }'85```8687**Image outpainting:**88```bash89curl -X POST https://api.eachlabs.ai/v1/prediction \90 -H "Content-Type: application/json" \91 -H "X-API-Key: $EACHLABS_API_KEY" \92 -d '{93 "model": "fooocus-api",94 "version": "0.0.1",95 "input": {96 "prompt": "a beautiful landscape with mountains and a lake, golden hour",97 "inpaint_input_image": "https://example.com/cropped-landscape.jpg",98 "outpaint_selections": "Left,Right",99 "outpaint_distance_left": 200,100 "outpaint_distance_right": 200,101 "performance_selection": "Quality"102 }103 }'104```105106## Related Models107108- [flux-dev](../flux-dev/) - Flux Dev text-to-image109- [stable-diffusion-3-5-large](../stable-diffusion-3-5-large/) - SD 3.5 image generation110- [recraft-v3](../recraft-v3/) - Styled image generation111112## Documentation113114- [each::labs Docs](https://docs.eachlabs.ai)115- [API Reference](https://docs.eachlabs.ai/api/overview)