A typical scenario is text-to-image generation, where a user provides a prompt that the image model interprets to produce an image.

You can find the vision models guide here.

Text-to-Image Generation

Obiguard allows you to make text-to-image requests using the OpenAI-compatible API signature.

from obiguard import Obiguard

client = Obiguard(
  provider='openai',
  base_url='https://gateway.obiguard.ai/v1',
  obiguard_api_key='vk-obg***',  # Your Obiguard virtual key here
)

response = client.images.generate(
  prompt="A beautiful sunset over the mountains",
  n=1,
  size="1024x1024"
)