The following snippet shows how to use image generation to create an image using AI.

const ai = AI({
  provider: context.propsValue.provider,
  server: context.server,
});

const response = await image.generate({
  // The model to use for image generation
  model: context.propsValue.model,
  // The prompt to guide the image generation
  prompt: context.propsValue.prompt,
  // The resolution of the generated image
  size: "1024x1024",
  // Any advanced options for the image generation
  advancedOptions: {},
});