---
title: "Invoke Embed"
method: POST
path: "/model/embed"
tags: ["Model Invocation"]
---

# Invoke Embed

`POST /model/embed`

## Endpoint to Invoke Embed Models
This endpoint allows users to invoke embed models.

***

#### Request Body

| Parameter    | Type       | Description                                                      |
|--------------|------------|------------------------------------------------------------------|
| model_name   | str        | The name of the model to invoke. Must be one of the supported models. |
| input_text   | str        | The text to embed.                                               |

***

#### Response Body

| Field          | Type   | Description                          |
|----------------|--------|--------------------------------------|
| output_text    | str    | The generated text.                  |
| input_tokens   | str    | The number of input tokens used.     |
| output_tokens  | str    | The number of output tokens generated.|

***

#### Errors

- **400 Bad Request**: If the request parameters are invalid.
- **401 Unauthorized**: If the authorization header is missing or invalid.
- **500 Internal Server Error**: If there is an unexpected error during model invocation.

***

#### Notes

## Request body

- InvokeEmbedModelRequest
  - `model_name` string, required
  - `input_text` string

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

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