Generative AI with Amazon Bedrock (Draft)

Amazon Bedrock is the fully managed service that provides secure access to foundational models from leading AI companies, enabling to build and scale generative AI applicatios.

Bedrock has two endpoint families with 5 API styles. 

1. Two Endpoint Families

bedrock-mantle

AWS recommends to use this whenever possible. Use this when you want OpenAI-compatible or Anthropic-compatible APIs. 

It supports,
  • Responses API
  • Chat Completions API
  • Anthropic Messages API
along with this, mantle API supports stateful conversation management, tools support, projects and workspaces.

bedrock-runtime

Use this when you want more direct control with the AWS Bedrock APIs. Supported APIs are,
  • InvokeModel API
  • InvokeModelWithResponseStream
  • InvokeModelWithBidirectionalSteam
  • Converse API
  • ConverseStream API

2. Five API Styles

Responses API

Use this when:

  • You are migrating from OpenAI.
  • You want a newer OpenAI-compatible API.
  • You want stateful/agentic style interactions.
  • You want easier tool-use patterns.

Chat Completions API

Use this when:

  • You already have code using client.chat.completions.create.
  • You manually manage chat history.
  • You want a lightweight chat API.
  • You want easier migration from older OpenAI-style apps.

Anthropic Messages API

Use this when:

  • You are using Claude-specific patterns.
  • Your team already knows Anthropic SDK.
  • You want Claude request/response structure.
  • You are migrating from direct Anthropic API to Bedrock.

Converse API

Use this when:

  • You want one consistent API across multiple Bedrock models.
  • You may switch between Claude, Nova, Llama, Mistral, etc.
  • You want a clean chat/message abstraction.
  • You are building AWS-native GenAI applications.

InvokeModel API

Use this when:

  • You need model-specific request format.
  • You are calling embeddings, image generation, or non-chat models.
  • You want low-level control.
  • Converse does not expose a specific model feature you need.
  • You are dealing with raw JSON payloads.

Quick Decision Table

RequirementPick
AWS-native production chatConverse on bedrock-runtime
Raw model-specific payloadInvoke on bedrock-runtime
Existing OpenAI app migrationChat or Responses on bedrock-mantle
Stateful/agentic OpenAI-compatible appResponses on bedrock-mantle
Existing Anthropic SDK / Claude-native styleMessages on bedrock-mantle
Embeddings / reranking / image generationUsually Invoke on bedrock-runtime
Video generation / long-running media jobStartAsyncInvoke
Real-time voice conversationInvokeModelWithBidirectionalStream

Popular Posts