---
title: "Invoke Model With Raw Input"
method: POST
path: "/model/invoke_with_raw_input"
---

# Invoke Model With Raw Input

`POST /model/invoke_with_raw_input`

Invoke model on bedrock with raw input. Takes model ID and raw input. Please check Bedrock documentation for model-specific input format and model ID.

Sample Input:
{
"model_id": "anthropic.claude-3-sonnet-20240229-v1:0",
"raw_input": {
    "anthropic_version": "bedrock-2023-05-31", 
    "max_tokens": 1024,
    "messages": [
        {
            "role": "user",
            "content": [
            
                {
                    "type": "text",
                    "text": "Hello"
                }
            ]
        }
    ]
}
}

## Request body

- InvokeModelWithRawInputRequest
  - `model_id` string, required
  - `raw_input` object, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/aws-samples/apis/generative-ai-foundations-api.md) · [All operations](https://skmtc.dev/aws-samples/apis/generative-ai-foundations-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/aws-samples/generative-ai-foundations-api/revisions/6f2e7b761d12/schema)
