We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://docs.anthropic.com/en/api/messages per docs you should pass base64 for type, not image:
Starting with Claude 3 models, you can also send image content blocks:
{"role": "user", "content": [ { "type": "image", "source": { "type": "base64", "media_type": "image/jpeg", "data": "/9j/4AAQSkZJRg...", } }, {"type": "text", "text": "What is in this image?"} ]}
The text was updated successfully, but these errors were encountered:
public static ContentBlock CreateImage(string mediaType, string data) { return new() { Type = "image", Source = new() { MediaType = mediaType, Data = data } }; }
Sorry, something went wrong.
No branches or pull requests
https://docs.anthropic.com/en/api/messages
per docs you should pass base64 for type, not image:
Starting with Claude 3 models, you can also send image content blocks:
{"role": "user", "content": [
{
"type": "image",
"source": {
"type": "base64",
"media_type": "image/jpeg",
"data": "/9j/4AAQSkZJRg...",
}
},
{"type": "text", "text": "What is in this image?"}
]}
The text was updated successfully, but these errors were encountered: