- Ask the model “What’s in this image?” and get a concise description.
- Supply a PDF and ask targeted questions about the content.
- Provide a short video clip for summarization or to extract timestamps and captions.
- Request image or video generation as part of a creative workflow.

Always consult the model catalog to confirm input types (image, document, audio, video) and output types, plus any required metadata or formatting (for example:
format, name, or source fields).
- Single-response models return the full result in one response.
- Streaming-capable models return incremental chunks (text or media parts). Your application must handle chunked responses when using streaming endpoints or methods (for example, a
ConverseStreamor streaming variant of an invoke API).
Not all SDK methods support every workflow. Some models expose streaming APIs for incremental output while others only support non-streaming invoke-style calls. Plan routing, timeouts, and error handling based on the model’s capabilities.
- Use a small set of repeatable patterns to package inputs and parse outputs for each modality.
- Route requests in your app by modality and by the selected model’s capabilities.
- Use a conversational API (Converse) for multi-turn, contextful dialogs, or a one-shot InvokeModel-style call for single requests.
- Keep request/response handling modular to enable swapping models without large refactors.

Examples
Example 1 — Image in, Text out (local file) This example sends a local image file alongside a text prompt and uses a Converse call to ask the model to describe the image. The message content mixes text and a binary image object so you can swap models with minimal changes.- Ensure the image file is accessible to the runtime environment (local filesystem, mounted volume, or container).
- Mixing text and an image object in a single message simplifies changing models or switching from local files to remote object stores.


- Confirm model capabilities in the model catalog (input/output modalities, required metadata).
- Package binary content as the model expects (specify
format,name, and providesource.bytes). - Implement robust parsing for both single-response and streaming outputs; handle partial or chunked data.
- Add validation and fallback logic (e.g., if the model returns no text, fallback to retry or a simpler model).
- Keep request/response handling modular to enable model or workflow changes without large refactors.
- Amazon Bedrock Runtime Documentation
- Amazon S3 Developer Guide
- Model catalogs and SDK docs (check your platform/provider for the latest model capability listings and API details).