---
title: "Invoke Model"
method: POST
path: "/model/invoke"
---

# Invoke Model

`POST /model/invoke`

Endpoint to invoke model on Bedrock with standardized input. Takes model name, prompt, and optional parameters. Please check /model/list_models for supported models and their model names.

Sample Input:
  {
       "model_name": "ANTHROPIC_CLAUDE_3_SONNET_V1",
       "prompt": "Translate the following text to French: 'Hello, how are you?'",
       "max_tokens": 100,
       "temperature": 0.7,
       "top_p": 0.9,
       "top_k": 50,
       "stop_sequences": ["\n"]
  }

## Request body

- InvokeModelRequest
  - `model_name` string, required
  - `prompt` union, required
    - string
    - object[]
  - `max_tokens` integer
  - `temperature` number
  - `top_p` number
  - `top_k` integer
  - `stop_sequences` string[]

## 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)
