---
title: "POST /ai/v1/embeddings"
method: POST
path: "/ai/v1/embeddings"
tags: ["AI Gateway"]
---

# POST /ai/v1/embeddings

`POST /ai/v1/embeddings`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/ai/v1/embeddings`
- Auth: HTTP bearer

## Request body

- EmbeddingRequest
  - `dimensions` integer, nullable
  - `encoding_format` string, nullable
  - `input` union, required
    - string
    - string[]
  - `model` string, required

## Response `200`

Embedding response

- EmbeddingResponse
  - `data` EmbeddingData[], required
    - `embedding` number[], required
    - `index` integer, required
    - `object` string, required
  - `model` string, required
  - `object` string, required
  - `usage` EmbeddingUsage, required
    - `prompt_tokens` integer, required
    - `total_tokens` integer, required

## Other responses

- `400`: Invalid request
- `401`: Unauthorized
- `404`: Model not found

## Changes

- **2026-04-25** `774be20905f2`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/ai/v1/embeddings/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
