---
title: "Generate Text Embedding"
method: POST
path: "/embeddings/text"
---

# Generate Text Embedding

`POST /embeddings/text`

## Request body

- object
  - `input` string[], required — List of text strings to embed
  - `model` 'gemini-embedding-001', required — Embedding model name
  - `dimensionality` integer — Output embedding dimension size

## Response `200`

Embeddings generated successfully

- union
  - object — Response for single input
    - `code` string — Response code indicating the result status
    - `msg` string — Response message describing the operation result
    - `data` object — Response data object containing the embedding
      - `embedding` number[] — Vector embedding array for the input text
    - `success` boolean — Indicates whether the operation was successful
    - `failed` boolean — Indicates whether the operation failed
  - object — Response for multiple inputs
    - `code` string — Response code indicating the result status
    - `msg` string — Response message describing the operation result
    - `data` object — Response data object containing the embeddings
      - `embeddings` array[] — Array of embedding vectors, one for each input text
        - number[]
    - `success` boolean — Indicates whether the operation was successful
    - `failed` boolean — Indicates whether the operation failed

---

[API](https://skmtc.net/memories/apis/screenplay-extraction-api.md) · [All operations](https://skmtc.net/memories/apis/screenplay-extraction-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/memories/screenplay-extraction-api/versions/720c8c144ddc/schema)
