aws-samples / aws-samples/amazon-bedrock-samples

Feature Request: Support HTTP/HTTPS image URLs in Converse API ImageSource

Open
#684 0 comments 4 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
1.5k
Forks
734
Avg merge
1d 6h
Merged PRs (30d)
4

Description

# Summary

The Bedrock Converse API's ImageSource type currently supports only two source types: `inline bytes (base64-encoded)` and `s3Location`. There is no support for passing HTTP/HTTPS image URLs directly, unlike the Anthropic Messages API (type: "image" with source.type: "url") and OpenAI's Chat Completions API (type: "image_url" with a URL string).

# Problem

When building multi-provider LLM applications, image inputs often originate as HTTP/HTTPS URLs (e.g., CDN-hosted product images, user-uploaded content). With the current Bedrock Converse API, callers must:

1. Download the image from the URL
2. Base64-encode the bytes
3. Pass them inline in the request

Or alternatively:

1. Download the image
2. Upload it to S3
3. Reference the S3 location

This adds latency, increases payload size (base64 encoding inflates data by ~33%), and requires additional application logic that isn't needed with other providers. It also makes it harder to build provider-agnostic LLM clients since Bedrock requires a fundamentally different image input path.

# Expected behavior

Support a url source type in ImageSource, allowing callers to pass an HTTP/HTTPS URL directly:

```
{
"image": {
"format": "png",
"source": {
"url": "https://example.com/images/photo.png"
}
}
}
```
This would bring Bedrock in line with:
- Anthropic Messages API: source.type: "url" with source.url (https://docs.anthropic.com/en/docs/build-with-claude/vision#providing-images-from-a-url)
- OpenAI Chat Completions API: type: "image_url" with image_url.url (https://platform.openai.com/docs/guides/vision)

Contributor guide

Open the contributing guide

Research direction

The issue names no repository file, test, or example notebook to change. Start by locating the Bedrock Converse API ImageSource examples, then determine whether this repository can implement the requested HTTP/HTTPS URL source and how support would be verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
api, cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.