AI Image Generation API
Generate images with Stability AI, fal.ai, and Replicate — pay per image with no subscriptions. Your AI agent creates visuals on demand.
Image generation for autonomous agents
AI agents increasingly need to create visual content as part of their workflows. A content creation agent needs blog post images. A marketing agent needs social media graphics. A product agent needs mockups and prototypes. An e-commerce agent needs product images from descriptions. Through Locus, your agent can call multiple image generation providers — Stability AI, fal.ai, and Replicate — and pay per image generated. No subscriptions to any provider, no separate accounts, no API key management. Just specify the model, send a prompt, and receive an image.
Available image generation providers
Stability AI
Creator of Stable Diffusion. Access Stability models through Locus for photorealistic images, illustrations, and concept art. Pricing depends on the selected model and generation settings, with the current basis published in the catalog.
fal.ai
A fast inference platform hosting open-source image models including FLUX, SDXL Turbo, and community fine-tuned models. The catalog publishes the current usage-based price for each available operation.
Replicate
A platform for running open-source ML models in the cloud, including specialized fine-tunes for particular styles, subjects, and use cases. Usage is metered by the selected operation rather than a fixed category-wide price range.
Agent image generation workflows
- •Content creation — Agent writes a blog post, generates a matching header image with Stability AI, and publishes the complete article. End-to-end automated content pipeline.
- •Social media automation — Generate platform-specific visuals for posts, ads, and stories. Agent creates images in the right dimensions and style for each platform.
- •Product visualization — Generate product mockups from text descriptions. E-commerce agents can create listing images, variation previews, and lifestyle shots on demand.
- •Design iteration — Agent generates multiple variations of a design concept, uses an LLM to evaluate them against criteria, and selects the best option — all autonomously.
Multi-provider flexibility
Different image generation tasks call for different models. Stability AI's latest models excel at photorealism. fal.ai offers the fastest generation for iterative workflows. Replicate gives access to niche fine-tuned models for specific styles. Through Locus, your agent can dynamically choose the best provider for each task — all from the same wallet and API key. A smart agent might use a fast, cheap model for initial drafts and a high-quality model for final outputs, optimizing both speed and cost.