Generates an image using the requested provider/model and prompt, estimating token usage and cost, recording an `OrcaRequest`, and returning the provider's generation result.
POST/studio/image_generate
- Reads and buffers the raw HTTP request body, then deserializes
ImageParameters. - Creates a persisted
OrcaRequestlinked to the user and studio, calculates prompt/completion token estimates and cost via provider-specific estimators, and stores the request id in options. - Invokes the appropriate image generator via
ImageGeneratorFactoryand returns the result. - Errors during generation are surfaced as a 400 with the provider's exception message.
Responses
- 200
- 400
Image generated successfully.
Invalid input or generation error.