---
title: "Create embeddings"
method: POST
path: "/api/embeddings"
tags: ["multimodal"]
---

# Create embeddings

`POST /api/embeddings`

Create embeddings through the Respan gateway with automatic logging.

## Headers

- `Authorization` string, required
- `X-Data-Respan-Params` string

## Request body

- object
  - `model` 'text-embedding-3-small' | 'text-embedding-3-large' | 'text-embedding-ada-002', required — Embedding model ID.
  - `input` unknown, required
  - `encoding_format` 'float' | 'base64' — Output format.
  - `dimensions` integer — Output embedding dimensions. Only supported by `text-embedding-3-*` models.
  - `customer_credentials` ApiEmbeddingsPostRequestBodyContentApplicationJsonSchemaCustomerCredentials — Per-customer LLM provider credentials.
  - `disable_log` boolean — When `true`, omits input/output from the log. Metrics still recorded.
  - `metadata` ApiEmbeddingsPostRequestBodyContentApplicationJsonSchemaMetadata — Custom key-value metadata.
  - `customer_identifier` string — End user identifier.
  - `thread_identifier` string — Conversation thread ID.

## Response `200`

Embedding results.

- MultimodalCreateEmbeddingsResponse200
  - `object` string
  - `data` ApiEmbeddingsPostResponsesContentApplicationJsonSchemaDataItems[]
    - `object` string
    - `embedding` number[] — Embedding vector.
    - `index` integer
  - `model` string
  - `usage` ApiEmbeddingsPostResponsesContentApplicationJsonSchemaUsage
    - `prompt_tokens` integer
    - `total_tokens` integer

## Other responses

- `401` — Unauthorized

---

[API](https://skmtc.net/keywordsai/apis/api-reference.md) · [All operations](https://skmtc.net/keywordsai/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/keywordsai/api-reference/revisions/4e064cf81dae/schema)
