Endpoint Details
/api/images/generate
Generate an image from a text prompt
Request Format
Headers
Must be set to
application/json
Your API key
Body Parameters
The text description of the image you want to generate
The model to use for generation. Defaults to
black-forest-labs/FLUX.1-schnell
Additional generation options
Example Request
Response Format
Image Serving
Endpoint
/api/images/:filename
Retrieve a generated image
- No authentication required
- Returns the image file directly
- Images are available immediately after generation
Caching
- Generated images are cached for 1 hour
- Cache key is based on prompt, model, and options
- Images are stored locally and served via public endpoint
Error Scenarios
- 400: Missing or invalid prompt
- 401: Missing API key
- 403: Invalid API key
- 404: Image not found (for serving endpoint)
- 429: Rate limit exceeded
- 500: Internal server error