---
title: "Create Embeddings"
method: POST
path: "/v1/embeddings"
tags: ["openai-compat"]
---

# Create Embeddings

`POST /v1/embeddings`

Generate embeddings for one or more inputs in the OpenAI response shape.

## Request body

- EmbeddingRequest — OpenAI-compatible embeddings request payload.
  - `input` union, required — Text or list of texts to embed.
    - string
    - string[]
  - `model` string, required — Embedding model identifier.
  - `encoding_format` 'float' — Format of the returned embeddings. Only float is supported.
  - `dimensions` integer, nullable — Optional output dimensionality, when the model supports it.
  - `user` string, nullable — Opaque end-user identifier for abuse monitoring.

## Response `200`

Successful Response

- EmbeddingResponse — OpenAI-compatible embeddings response payload.
  - `object` 'list'
  - `data` EmbeddingObject[], required — One entry per input.
    - `object` 'embedding'
    - `index` integer, required — Position of this embedding in the input list.
    - `embedding` number[], required — The embedding vector.
  - `model` string, required — Model that produced the embeddings.
  - `usage` EmbeddingUsage, required — Token accounting reported by the provider.
    - `prompt_tokens` integer, required — Tokens consumed by the input.
    - `total_tokens` integer, required — Total tokens billed for the request.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/pioneer/apis/brain-api.md) · [All operations](https://skmtc.net/pioneer/apis/brain-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pioneer/brain-api/revisions/31dfe831e079/schema)
