---
title: "Embed"
method: POST
path: "/models/embed"
tags: ["Models"]
---

# Embed

`POST /models/embed`

Embeds the provided input text with ZeroEntropy embedding models.

The results will be returned in the same order as the text provided. The embedding is such that queries will have high cosine similarity with documents that are relevant to that query.

Organizations will, by default, have a ratelimit of `2,500,000` bytes-per-minute and 1000 QPM. Ratelimits are refreshed every 15 seconds. If this is exceeded, requests will be throttled into `latency: "slow"` mode, up to `20,000,000` bytes-per-minute. If even this is exceeded, you will get a `429` error. To request higher ratelimits, please contact [founders@zeroentropy.dev](mailto:founders@zeroentropy.dev) or message us on [Discord](https://go.zeroentropy.dev/discord) or [Slack](https://go.zeroentropy.dev/slack)!

## Request body

- EmbedRequest
  - `model` string, required — The model ID to use for embedding. Options are: ["zembed-1"]
  - `input_type` 'query' | 'document', required — The input type. For retrieval tasks, either `query` or `document`.
  - `input` union, required — The string, or list of strings, to embed.
    - string
    - string[]
  - `dimensions` integer, nullable — The output dimensionality of the embedding model. For `zembed-1`, the available options are: [2560, 1280, 640, 320, 160, 80, 40].
  - `encoding_format` 'float' | 'base64' — The output format of the embedding. If `float`, an array of floats will be returned for each embeddings. If `base64`, a f32 little endian byte array will be returned, encoded as a base64 string. `base64` is significantly more efficient than `float`. The default is `float`.
  - `latency` 'fast' | 'slow', nullable — Whether the call will be inferenced "fast" or "slow". RateLimits for slow API calls are orders of magnitude higher, but you can expect 2-20 second latency. Fast inferences are guaranteed subsecond, but rate limits are lower. If not specified, first a "fast" call will be attempted, but if you have exceeded your fast rate limit, then a slow call will be executed. If explicitly set to "fast", then 429 will be returned if it cannot be executed fast.

## Response `200`

Successful Response

- EmbedResponse
  - `results` EmbedResult[], required — The list of embedding results.
    - `embedding` union, required — The embedding of the input text, as an array of floats. If `base64` format is requested, the response will be an fp32 little endian byte array, encoded as a base64 string.
      - number[]
      - string
  - `usage` EmbedUsage, required
    - `total_bytes` integer, required — The total number of bytes in the request. This is used for ratelimiting.
    - `total_tokens` integer, required — The total number of tokens in the request. This is used for billing.

## Other responses

- `404` — Not Found
- `422` — Validation Error

## Changes

- **2026-03-03** `5ff1b24060b9` — 2 warning, 2 info
  - removed the request property `output_dimensions`
  - removed the request property `output_format`
  - added the new optional request property `dimensions`
  - added the new optional request property `encoding_format`
- **2026-03-03** `cd86445a8ef0` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/zeroentropy-ai/apis/zeroentropy-api/changes/models/embed/post.md)

---

[API](https://skmtc.dev/zeroentropy-ai/apis/zeroentropy-api.md) · [All operations](https://skmtc.dev/zeroentropy-ai/apis/zeroentropy-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/zeroentropy-ai/zeroentropy-api/revisions/5ff1b24060b9/schema)
