Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Send images to models that accept them.
input_modalities
image
a2
https:
reply = client.chat.completions.create( model="a2", messages=[{ "role": "user", "content": [ {"type": "text", "text": "What's in this picture?"}, {"type": "image_url", "image_url": {"url": "https://example.com/photo.jpg"}}, ], }], )
import base64 data = base64.b64encode(open("photo.png", "rb").read()).decode() message = client.messages.create( model="a2", max_tokens=1024, messages=[{ "role": "user", "content": [ {"type": "image", "source": {"type": "base64", "media_type": "image/png", "data": data}}, {"type": "text", "text": "What's in this picture?"}, ], }], )
data:image/png
jpeg
webp
gif
;base64
413 payload_too_large
document
400 unsupported_modality
400 unsupported_parameter