Skip to main content

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 OrcaRequest linked 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 ImageGeneratorFactory and returns the result.
  • Errors during generation are surfaced as a 400 with the provider's exception message.

Responses

Image generated successfully.