---
title: "Generate embeddings (deprecated)"
method: POST
path: "/api/ai/embeddings"
tags: ["Client"]
deprecated: true
---

# Generate embeddings (deprecated)

`POST /api/ai/embeddings`

> **Deprecated.**

Deprecated compatibility proxy. New integrations should call https://openrouter.ai/api/v1/embeddings directly with the provisioned OpenRouter key.

## Request body

- EmbeddingsRequest
  - `model` string, required — Embedding model identifier
  - `input` union, required
    - string — Single text input to embed
    - string[] — Array of text inputs to embed
  - `encoding_format` 'float' | 'base64' — The format to return the embeddings in. Can be either float or base64.
  - `dimensions` integer — The number of dimensions the resulting output embeddings should have. Only supported in certain models.

## Response `200`

Embeddings generated successfully

- EmbeddingsResponse
  - `object` 'list' — Object type, always "list"
  - `data` EmbeddingObject[]
    - `object` 'embedding' — Object type, always "embedding"
    - `embedding` number[] — The embedding vector (array of floats)
    - `index` integer — Index of this embedding in the input array
  - `metadata` object
    - `model` string — The model used for embedding
    - `usage` TokenUsage
      - `promptTokens` integer
      - `completionTokens` integer
      - `totalTokens` integer

## Other responses

- `400` — Invalid request - missing model or input
- `401` — Unauthorized
- `500` — Failed to generate embeddings

---

[API](https://skmtc.net/insforge/apis/insforge-authentication-api.md) · [All operations](https://skmtc.net/insforge/apis/insforge-authentication-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/insforge/insforge-authentication-api/versions/a935bb49f932/schema)
