The Amazon Bedrock Converse API
Converse is Bedrock's standard way to call its chat and text models. What goes in a request (model ID, system prompt, messages, inference settings), what comes back (the message, the stop reason, token usage), how it differs from InvokeModel, and your first call in exercise 1.
Diagrams in this video · 1Free in archhy
The diagrams, full size
Copy any of them into archhy, free, and change it for your own system.
After this lesson you can
- Name the parts of a Converse request
- Read a Converse response, including stopReason and usage
- Choose between Converse and InvokeModel
- Make your first Converse call (exercise 1)
Transcript
The Amazon Bedrock Converse API
Space Llama here. Part two, calling models. And we start with the call you'll make most. The Converse API. One shape of request, for every chat and text model on Bedrock.
A Converse call
Here's a Converse call, both halves. First, the model ID. A model, or an inference profile. The system prompt. How you want the model to behave. The messages. The conversation so far, as user and assistant turns, each made of content blocks. And inference settings. Always set max tokens. More on why in lesson five. Converse takes that same shape for every model. That's the point of it. Back comes the answer, as a message. The stop reason. End turn means it finished. Max tokens means it ran out. Tool use means it wants a tool. There are others, like stop sequence, or guardrail intervened, which you'll meet in part three. And usage. Input tokens and output tokens. That's what you pay for.
In Python
In Python, with boto3, it's one call. The client is bedrock runtime. Then converse, with the model ID, a system prompt, one user message, and the settings. And you read the answer, the stop reason and the token usage from the response.
Converse or InvokeModel?
There's the original call too, invoke model, still fully supported. Invoke model sends each provider's own request body. More control, but a different shape for every provider. Embedding, image and video models use it. For chat and text, start with Converse, and reach for invoke model when you need something a model offers outside it. And if you're bringing code from elsewhere, Bedrock also speaks OpenAI-compatible and Anthropic-style APIs.
When it goes wrong
When a call fails, the exception tells you why. Access denied, your permissions. Converse needs bedrock invoke model on the model. Validation, or resource not found. Usually a wrong model ID, or a model that isn't in your Region. Throttling, you've hit a quota. And model not ready, your software development kit, the SDK, retries that for you, up to five times.
Exercise 1: your first call
Your turn. Exercise one is your first Converse call, in your own AWS account. It uses Amazon Nova Micro, costs a fraction of a cent, and leaves nothing behind. And look closely at the answer you get. Small models are fast, and sometimes wrong.
Remember
Let's recap. A Converse request has a model ID, a system prompt, messages and inference settings. The response has the message, the stop reason and the token usage. And Converse is where you start.
Practice and what's next
Next, streaming the answer as it's written. See you there.
Gazeek Flash · free
Exam questions on your phone
Free questions on Amazon Bedrock: quick-fire batches and timed exams, on the web or Android.





