EACHLABS
Image Generation
Avg Run Time: 31.000s
Model Slug: fooocus-api
Playground
Input
Enter a URL or choose a file from your computer.
Click to upload or drag and drop
(Max 50MB)
Enter a URL or choose a file from your computer.
Click to upload or drag and drop
(Max 50MB)
Enter a URL or choose a file from your computer.
Click to upload or drag and drop
(Max 50MB)
Enter a URL or choose a file from your computer.
Click to upload or drag and drop
(Max 50MB)
Enter a URL or choose a file from your computer.
Click to upload or drag and drop
(Max 50MB)
Enter a URL or choose a file from your computer.
Click to upload or drag and drop
(Max 50MB)
Output
Example Result
Preview and download your result.

API & SDK
Create a Prediction
Send a POST request to create a new prediction. This will return a prediction ID that you'll use to check the result. The request should include your model inputs and API key.
Get Prediction Result
Poll the prediction endpoint with the prediction ID until the result is ready. The API uses long-polling, so you'll need to repeatedly check until you receive a success status.
Readme
Overview
fooocus-api — Text to Image AI Model
Fooocus-api is an open-source text-to-image API built on Stable Diffusion XL, designed for developers and creators who need fine-grained control over image generation without proprietary constraints. Unlike cloud-only competitors, fooocus-api solves the core problem of inflexible, rate-limited image generation by offering a customizable, self-hosted alternative that maintains full data privacy while delivering production-quality visuals.
Developed as part of the Fooocus project and integrated into Eachlabs's model ecosystem, fooocus-api empowers developers building AI-driven applications—from e-commerce platforms to creative tools—with an open-source image generation API that doesn't sacrifice control for convenience. The model excels at translating detailed text prompts into coherent, high-resolution images while supporting advanced techniques like LoRA fine-tuning and sampling method customization.
Technical Specifications
What Sets fooocus-api Apart
Fooocus-api distinguishes itself through capabilities that give developers unprecedented control over the image generation process:
- Native LoRA Integration: Fooocus-api supports multiple LoRA (Low-Rank Adaptation) models simultaneously, enabling precise style and subject control without retraining the base model. This allows developers to combine different artistic styles, character designs, or domain-specific visual patterns in a single generation request—a capability most commercial text-to-image APIs either don't offer or severely limit.
- Customizable Sampling Methods: Users can select from multiple sampling algorithms (Euler, DPM++, Heun, and others) and adjust sampling steps granularly, providing direct control over the quality-speed tradeoff. This level of algorithmic transparency is rare in proprietary APIs, which typically abstract these parameters away.
- Self-Hosted Deployment: Unlike cloud-only competitors, fooocus-api can be deployed locally or on private infrastructure, eliminating rate limits, ensuring data privacy, and removing dependency on external API availability. This is essential for enterprises handling sensitive visual content or requiring guaranteed uptime.
- Resolution and Aspect Ratio Flexibility: Supports generation across multiple resolutions and aspect ratios, from square formats to ultrawide compositions, with output in PNG and JPG formats.
- Batch Processing Capability: Developers can submit multiple generation requests efficiently, reducing per-image latency in high-volume workflows typical of e-commerce and content creation platforms.
Key Considerations
- Parameter Synergy: Combine guidance_scale, sharpness, and refiner_switch for balanced quality and prompt adherence.
- Image Inputs: Use high-resolution input images for inpainting and outpainting tasks to maintain quality.
- Prompt Alignment: Ensure prompts match your desired style and subject to avoid conflicting results.
- ControlNet Layers: Use ControlNet inputs strategically for structured outputs, limiting layers to essential elements to prevent overloading.
Tips & Tricks
How to Use fooocus-api on Eachlabs
Access fooocus-api through Eachlabs's Playground for instant experimentation or integrate it via API and SDK for production applications. Submit text prompts alongside optional parameters—resolution, aspect ratio, sampling method, LoRA models, and negative prompts—to generate high-quality images in PNG or JPG format. Eachlabs handles infrastructure scaling, allowing you to focus on prompt engineering and application logic rather than model deployment.
---END---Capabilities
- Artistic Image Generation:
- Creates visually stunning artwork in various styles, from realistic to abstract.
- Customizable Outputs:
- Tailors images to specific themes, moods, or artistic techniques.
- High-Resolution Visuals:
- Produces professional-quality images suitable for printing or digital use.
- Creative Experimentation:
- Encourages exploration of unique ideas and concepts.
What Can I Use It For?
Use Cases for fooocus-api
E-commerce Product Visualization: E-commerce platforms can use fooocus-api to generate lifestyle product images from text descriptions. For example, a developer might submit the prompt: "A minimalist white ceramic mug on a wooden desk with morning sunlight, shallow depth of field, professional product photography"—and receive a photorealistic composite without studio costs. The customizable sampling methods ensure consistent visual quality across thousands of product variations.
Creative Tool Integration: Designers and digital artists building custom creative applications can leverage fooocus-api's LoRA support to maintain consistent character designs, art styles, or brand aesthetics across multiple generated images. The open-source image generation API allows seamless integration into proprietary design workflows without vendor lock-in.
Enterprise Content Generation: Large organizations handling sensitive or proprietary visual content can deploy fooocus-api on private infrastructure, ensuring that training data, generated images, and API logs never leave their network. This self-hosted image generation model eliminates compliance concerns around cloud-based AI services.
AI Research and Model Development: Machine learning teams can use fooocus-api as a foundation for experimenting with custom LoRA models, sampling strategies, and prompt engineering techniques. The transparent, customizable architecture makes it ideal for researchers exploring how different algorithmic parameters affect image quality and generation speed.
Things to Be Aware Of
- Theme-Based Prompts:
- Experiment with themes like "futuristic cityscape," "fantasy forest," or "minimalist design."
- Artistic Styles:
- Explore styles such as watercolor, charcoal sketch, or surrealism.
- Blend Ideas:
- Combine contrasting concepts for unique results (e.g., "ancient ruins in a cyberpunk world").
- Iterative Refinement:
- Generate multiple versions of an image and select or combine elements you like.
Limitations
- Complex Prompts: Overly detailed or conflicting prompts may reduce output quality.
- Resolution Constraints: Extremely high resolutions may increase processing time.
- ControlNet Dependencies: Overusing ControlNet layers can complicate outputs and slow processing.
- Mask Accuracy: Poorly defined masks in inpainting tasks may lead to unintended edits.
Output Format:PNG
Related AI Models
You can seamlessly integrate advanced AI capabilities into your applications without the hassle of managing complex infrastructure.
