Skip to main content
Use Sudo SDKs to generate images with models like DALL·E, GPT-Image, Imagen, and others. This page shows basic usage and common parameters.
Not all parameters are supported across providers. For example, quality may be supported by DALL·E 3 but not by Grok or Imagen. Always consult the respective provider’s model documentation to construct the request body correctly.

Basic Image Generation

TypeScript

Response Formats

Request either a hosted URL or base64 data.
TypeScript

Parameters

  • model: The image model to use (e.g., dall-e-3, gpt-image-1, provider-specific models). See Overview → Models for availability.
  • prompt: Text description of the image to generate.
  • n: Number of images to generate.
  • size: Output image size, e.g., 256x256, 512x512, 1024x1024 (availability varies by model/provider).
  • responseFormat / response_format: url or b64_json.
  • quality: Optional quality preset (e.g., standard, hd) for providers that support it (often OpenAI/DALL·E only).
If a parameter isn’t supported by your chosen model/provider, remove it or adjust to a supported value per provider documentation.

Notes

  • Image generation capabilities and parameters vary across providers and model versions.
  • If a request fails due to unsupported options, check the error message and consult the provider’s docs.