← Back to Dashboard
1. InvokeModel and Streaming Basics2. Converse API Patterns3. Five Ways to Call Bedrock: Converse, Invoke, Messages, Responses, Chat Completions

Converse API Patterns

📚 Inference APIs⏱ 11 min⭐ 70 XP⌨ Hands-on lab

Message-First Orchestration

The Converse API unifies multi-turn interactions and tool-ready structures for many Bedrock-supported model families. One request shape works across Amazon Nova, Anthropic Claude, Meta Llama, Mistral, and more - swap the modelId and your code keeps working.

Anatomy of a Converse Request

response = client.converse(
    modelId="amazon.nova-pro-v1:0",
    system=[{"text": "You are a support triage assistant. Reply in strict JSON."}],
    messages=[
        {"role": "user", "content": [{"text": "Customer reports checkout 500 errors since 09:40 UTC"}]},
        {"role": "assistant", "content": [{"text": '{"severity":"P1","team":"payments"}'}]},
        {"role": "user", "content": [{"text": "They add: only EU users affected"}]}
    ],
    inferenceConfig={"maxTokens": 400, "temperature": 0.1, "stopSequences": ["###"]},
)
FieldPurposeProduction guidance
systemPolicy, persona, output rules - kept out of user-editable contentVersion it; keep stable across turns
messagesAlternating user/assistant turns; content is a list of blocks (text, image, document)You own history - the API is stateless, so trim/summarise long conversations
inferenceConfigmaxTokens, temperature, topP, stopSequencesLow temperature (0–0.3) for deterministic business tasks
toolConfigTool/function definitions for agentic loopsCovered in the Tool Use module

Design Each Turn With

  • Stable system instructions for policy and tone - changing them mid-conversation causes behavioral drift.
  • User content with clear constraints - format, length, and refusal expectations.
  • Tool invocation hooks (when applicable) via toolConfig.
  • Structured post-processing and safety checks - validate JSON against a schema before acting on it.
Key insight: Converse is stateless - Bedrock does not remember previous turns. Your application sends the full relevant history every call, which means you control context cost: prune, summarise, or window old turns deliberately.
⌨ HANDS-ON LABExecute Converse API with Structured Inference Config
⭐ +150 XP

Call the unified Bedrock Converse API with explicit temperature, maxTokens, and system prompts.

1Invoke Claude 3.5 Sonnet using Converse API with zero temperature for deterministic output.
lab-sandbox — simulated environment
INFINITY LAB SANDBOX v2.6 — simulated shell
Type the command for the current objective. Helpers: "hint", "solution", "clear".
$
OBJECTIVE 1 / 1 — type "hint" if stuck
🧪 Knowledge Check
Press 1-4 to select1 of 4
What is a key benefit of the Converse-style API?
No need for IAM
Consistent message-based workflow for multi-turn interactions
Only supports one model
Removes all safety requirements