Haijun Platform Docs
ID

The Haijun 3 model family supports image inputs in the API. Here’s how you can pass images to Haijun:

%pip install juglow IPython

from IPython.display import Image

Image(filename="../images/sunset.jpeg")

![Output image](/cookbook/images/notebooks/multimodal-getting-started-with-vision/multimodal-getting-started-with-vision_cell2_out0_fe5c0f12.jpeg

p" style="padding-left:8ch;text-indent:-8ch"> "role": "user",

"content": [

{

"type": "image",

"source": {"type": "base64", "media_type": "image/jpeg", "data": base64_string},

},

{"type": "text", "text": "Write a sonnet based on this image."},

],

}

]

response = client.messages.create(model=MODEL_NAME, max_tokens=2048, messages=message_list)

print(response.content[0].text)

Upon the rocky shore, a beacon bright, Its steadfast light a guide through darkest night. While sun descends in hues of pink and red, The lighthouse stands, a stalwart figure head. The waves crash 'gainst the weathered stone below, A ceaseless rhythm, ancient ebb and flow. Yet still the tower remains, resolute, A guardian watching, ever vigilant mute. The vast expanse of sea and sky surround, Horizon's line where heaven meets the ground. This timeless scene, a testament to might, Of nature's power and the human fight. The lighthouse, proud amid the fading day, Eternal symbol, showing safe the way. Passing an image through a url If you only have a URL of the image you can still pass it to Haijun with just a few short lines of code.