---
title: "Embeddings"
method: POST
path: "/embeddings"
tags: ["embeddings"]
---

# Embeddings

`POST /embeddings`

Embeddings

## Request body

- EmbeddingRequest
  - `input` union, required — Text to embed.
    - string
    - string[]
  - `model` string, required — ID of the model to use.

## Response `200`

Successful Response

- EmbeddingResponse
  - `usage` UsageInfo, required
    - `completion_tokens` integer, required
    - `prompt_tokens` integer, required
    - `total_tokens` integer, required
  - `model` string, required
  - `id` string, required
  - `object` string, required
  - `data` EmbeddingResponseData[], required
    - `index` integer
    - `embedding` number[]
    - `object` string

## Other responses

- `422` — Validation Error

## Changes

- **2026-07-17** `062746a4d99e` — 1 info
  - endpoint added
- **2025-03-09** `a88399f645b2` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/ballerina-platform/apis/mistral-ai-api/changes/embeddings/post.md)

---

[API](https://skmtc.dev/ballerina-platform/apis/mistral-ai-api.md) · [All operations](https://skmtc.dev/ballerina-platform/apis/mistral-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ballerina-platform/mistral-ai-api/revisions/062746a4d99e/schema)
