Skip to main content
If the downstream LLM provider supports image processing (vision) and generation capabilities, then HasteKit SDK also supports it.

Image Processing

Models that supports image processing or vision can understand images as input. You can attach images in either as a URL or as a base64 encoded string like this:

Image Generation

To enable image generation, include the ImageGenerationTool in your request’s Tools array:
The ImageGenerationTool accepts the following options:
  • Size (string): Image dimensions, e.g. "1024x1024".
  • Quality (string): Image quality, e.g. "high" or "medium".

Image Generation Responses

When the model generates an image, it returns an ImageGenerationCallMessage in the response output. This message contains the generated image as base64-encoded data.

Streaming Image Generation

When streaming, image generation progress is reported through different chunk types:
  • response.image_generation_call.in_progress: Generation has started
  • response.image_generation_call.generating: Image is being generated
  • response.image_generation_call.partial_image: Partial image data

Image Generation Message Structure

The ImageGenerationCallMessage contains the following fields: