FREE TOOL

Bedrock InvokeModel Body Generator

The InvokeModel request body every Amazon Bedrock model takes, with its Converse equivalent; paste a body to see which format it really is and what the model expects, or paste a ValidationException to see what it means.

  • Your data never leaves your browser: everything is calculated by JavaScript on this page, not on a server.
  • Nothing you enter is uploaded, processed on a server or stored. Check it in your browser's developer tools (Network tab).
  • Once the page has loaded, the tool works without an internet connection.

Model

The Region you call Amazon Bedrock in and the model the request goes to - each model family takes a body of its own.

Request

What to send. Leave a field empty to leave it out of the body.

See the body ↓
Calling AWS APIs from code and reading their errors is a core AWS Developer Associate topicTry free DVA-C02 practice questions with answers and explanations.DVA-C02 questions →

InvokeModel body formats by model family

InvokeModel passes its body to the model as it is, so the body has to be in the format of the model family the request goes to. Switching the model ID without changing the body is the most common cause of ValidationException: Malformed input request. These are the formats AWS documents on its inference parameters pages, with the keys each requires and the models of today's model cards that take it:

FormatRequiredModels
Anthropic Claude Messages APIanthropic_version, max_tokens, messagesClaude Sonnet 5.5, Claude Opus 5.5, Claude Fable 5.1, Claude Mythos 5.1, Claude Opus 5, Claude Sonnet 5, Claude Fable 5, Claude Opus 4.8, Claude Opus 4.7, Claude Opus 4.6, Claude Sonnet 4.6, Claude Haiku 4.5, Claude Opus 4.5, Claude Sonnet 4.5, Claude Sonnet 4, Claude Opus 4.1, Claude 3.5 Haiku, Claude 3 Haiku
Amazon Nova (messages-v1)messagesNova 2 Lite, Nova Lite, Nova Micro, Nova Premier, Nova Pro
Meta Llama (prompt)promptLlama 3.3 70B Instruct, Llama 3.2 11B Instruct, Llama 3.2 1B Instruct, Llama 3.2 3B Instruct, Llama 3.2 90B Instruct, Llama 3.1 70B Instruct, Llama 3.1 8B Instruct, Llama 3 70B Instruct, Llama 3 8B Instruct, Llama 4 Maverick 17B Instruct, Llama 4 Scout 17B Instruct
Mistral AI text completion (prompt)promptMistral 7B Instruct, Mistral Large, Mistral Small, Mixtral 8x7B Instruct
DeepSeek-R1 text completion (prompt)promptDeepSeek-R1
OpenAI-style chat completion (messages)messagesDeepSeek V3.2, DeepSeek-V3.1, Gemma 3 12B IT, Gemma 3 27B PT, Gemma 3 4B IT, MiniMax M2.5, MiniMax M2.1, MiniMax M2, Ministral 14B 3.0, Devstral 2 123B, Magistral Small 2509, Ministral 3 8B, Ministral 3B, Mistral Large, Mistral Large 3, Pixtral Large, Voxtral Mini 3B 2507, Voxtral Small 24B 2507, Kimi K3, Kimi K2.5, Kimi K2 Thinking, NVIDIA Nemotron Nano 12B v2 VL BF16, NVIDIA Nemotron Nano 9B v2, Nemotron Nano 3 30B, NVIDIA Nemotron 3 Super 120B, GPT OSS Safeguard 120B, GPT OSS Safeguard 20B, gpt-oss-120b, gpt-oss-20b, Qwen3 235B A22B 2507, Qwen3 32B, Qwen3 Coder 480B A35B Instruct, Qwen3 Coder Next, Qwen3 Next 80B A3B, Qwen3 VL 235B A22B, Qwen3-Coder-30B-A3B-Instruct, Palmyra X4, Palmyra X5, Palmyra Vision 7B, GLM 4.7, GLM 4.7 Flash, GLM 5
AI21 Labs Jamba (messages)messagesJamba 1.5 Large, Jamba 1.5 Mini
Cohere Command R (message)messageCommand R, Command R+
Amazon Titan Text Embeddings V2inputTextTitan Text Embeddings V2
Amazon Titan Embeddings G1 - TextinputTextTitan Embeddings G1 - Text
Amazon Titan Multimodal Embeddings G1An inputTitan Multimodal Embeddings G1
Cohere Embedinput_typeEmbed English, Embed Multilingual, Embed v4

Image, video, speech and rerank models (Stability AI, Nova Canvas and Reel, Titan Image Generator, TwelveLabs, Nova Sonic, Cohere Rerank) take bodies of their own that the tool does not cover - their model cards have them.

Why a model card's example body can fail

Every Bedrock model card has an "Invoke API" example with the same body: messages and max_tokens. For Llama, Mistral 7B, Mixtral, Mistral Small and DeepSeek-R1, the inference parameters pages say the body is a prompt in the model's template - and Bedrock answers a messages body to Llama 3 with required key [prompt] not found. The tool follows the parameters pages.

InvokeModel or Converse?

Converse takes the same request for every model that supports it: messages with content blocks such as {"text": "..."}, a system list and inferenceConfig (maxTokens, temperature, topP, stopSequences). Bedrock translates it into each model's own format, so switching models changes only the modelId. Parameters only one family has go into additionalModelRequestFields, such as Claude's top_k. Use InvokeModel when you need a model feature Converse does not pass on, or a model Converse does not serve - embeddings models, for example, take only InvokeModel.

A Converse request is not an InvokeModel body: modelId, inferenceConfig and additionalModelRequestFields sent to InvokeModel are extraneous keys for every model but Amazon Nova, whose body has the Converse shape without modelId.

Reading "Malformed input request"

Bedrock checks the body against the model's JSON schema and lists every place it fails, each after a JSON pointer: # is the body itself, #/messages/0/content the first message's content.

  • required key [prompt] not found - the model's format requires the key and the body has none. Which keys are missing says which format the model wants.
  • extraneous key [messages] is not permitted - the key is not in the model's format. The extraneous keys together usually name the format the body was written for.
  • expected type: JSONArray, found: String - the value has the wrong type, here a string where an array goes.
  • expected maximum item count: 10, found: 12 and -1 is not greater or equal to 0 - a list or a number is out of the model's range.
  • subject must not be valid against schema - comes with the lines that name the real problem.

Errors from the model itself start with The model returned the following errors or name a field, such as messages: roles must alternate - the Check a body or error mode explains those too, and the Bedrock model finder the access and model ID errors.

Frequently asked questions

Where does the system prompt go?

Into the body's own field: system for Claude and Nova, preamble for Cohere Command R, a system message for the chat completion and Jamba bodies, and the template's system header for Llama. Claude, Nova and Converse refuse a message with the role system. AWS documents no system slot for the Mistral and DeepSeek-R1 prompts; the tool puts the system prompt ahead of the user's text there.

Does the body change with a cross-Region inference profile?

No. A Geo or Global profile ID takes the same body as the model ID - only the ID in the request changes.

Is what I paste sent anywhere?

No. The body is generated and checked in your browser. The page only counts that it was used, with the body format and what the check found, never the text.

References

Inference request parameters and response fields for foundation models (Amazon Bedrock User Guide)
Carry out a conversation with the Converse API operations (Amazon Bedrock User Guide)
InvokeModel (Amazon Bedrock API Reference)
Converse (Amazon Bedrock API Reference)
How do I resolve validation exceptions in Amazon Bedrock? (AWS re:Post)