Closed philkunz closed 5 months ago
Whats the status on this one?
would love to see a code example, trying multiple solutions but none of them worked
Try this one:
const message = await anthropic.messages.create({
max_tokens: 1024,
model: 'claude-3-haiku-20240307',
messages: [{
role: 'user',
content: [
{
type: 'image',
source: {
data: base64,
media_type: 'image/jpeg',
type: 'base64',
}
},
{
type: 'text',
text: 'Your instruction here',
},
],
}],
});
@philkunz @atali we have documentation with examples for image use cases: https://docs.anthropic.com/en/docs/vision.
Could you reopen with more details if you still have questions?
From the docs it is not clear how we are supposed to input binaries and images...