---
type: concept
x-llmwiki:
  schemaVersion: "0.1"
  contentHash: 14b843553d3c59141c433e40a8d9747fed4a182c87d0ac6babc58e4c3e36f234
  pageDirectory: concepts
  sources:
    - query-an-embedding-model-databricks-on-aws.md
  confidence: 0.9
  provenanceState: extracted
  freshnessStatus: unverified
  aliases:
    - embedding-models-response-format
    - EMRF
  citations:
    - file: query-an-embedding-model-databricks-on-aws.md
title: Embedding Models Response Format
description: Standard JSON response structure for embedding model queries including object type, embedding vector, model name, and token usage metadata.
tags:
  - embedding-models
  - API
  - response-format
timestamp: "2026-06-19T20:01:19.475Z"
---

# Embedding Models Response Format

**Embedding Models Response Format** refers to the standardized JSON structure returned by foundation model serving endpoints on Databricks for models optimized for embeddings tasks. These endpoints serve models available through [Foundation Models APIs](/concepts/foundation-model-apis.md) (Databricks-hosted) or [External Models](/concepts/external-models.md) (hosted outside Databricks). ^[query-an-embedding-model-databricks-on-aws.md]

## Response Format Structure

When you query an embedding model, the response follows a consistent JSON schema. The top-level object contains four keys: `object`, `data`, `model`, and `usage`. ^[query-an-embedding-model-databricks-on-aws.md]

The following is the expected response format:

```json
{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "index": 0,
      "embedding": []
    }
  ],
  "model": "text-embedding-ada-002-v2",
  "usage": {
    "prompt_tokens": 2,
    "total_tokens": 2
  }
}
```

^[query-an-embedding-model-databricks-on-aws.md]

- **`object`**: The type of the response object. For embedding requests, this is always `"list"`. ^[query-an-embedding-model-databricks-on-aws.md]
- **`data`**: An array of embedding objects. Each object contains:
  - **`object`**: Always `"embedding"`.
  - **`index`**: The index of the input in the original request (zero-based).
  - **`embedding`**: The vector representation of the input, typically an array of floating-point numbers.
- **`model`**: The name or ID of the model that generated the embeddings.
- **`usage`**: An object indicating token consumption:
  - **`prompt_tokens`**: The number of tokens in the prompt (input).
  - **`total_tokens`**: The total number of tokens processed.

^[query-an-embedding-model-databricks-on-aws.md]

## Usage Information

The `usage` object in the response provides token counts. This is consistent across all embedding model endpoints. For pay-per-token models, this information is relevant for billing and monitoring. ^[query-an-embedding-model-databricks-on-aws.md]

## Supported Models

For a list of supported embedding models, see the Foundation Model Types page. The examples in the source use the `gte-large-en` model as a representative. ^[query-an-embedding-model-databricks-on-aws.md]

## Check Whether Embeddings Are Normalized

You can check if the embeddings generated by your model are normalized (i.e., have a unit L2 norm) using the following Python function: ^[query-an-embedding-model-databricks-on-aws.md]

```python
import numpy as np

def is_normalized(vector: list[float], tol=1e-3) -> bool:
    magnitude = np.linalg.norm(vector)
    return abs(magnitude - 1) < tol
```

^[query-an-embedding-model-databricks-on-aws.md]

## Related Concepts

- Query a Chat Model – Response format for chat models.
- [Query Reasoning Models](/concepts/hybrid-reasoning-models.md) – Response format for reasoning models.
- Query Vision Models – Response format for vision models.
- [Foundation Models APIs](/concepts/foundation-model-apis.md) – How to access Databricks-hosted foundation models.
- [External Models](/concepts/external-models.md) – Foundation models hosted outside Databricks.
- [MLflow Deployments SDK](/concepts/mlflow-deployments-sdk.md) – Client option for querying endpoints.

## Sources

- query-an-embedding-model-databricks-on-aws.md

# Citations

1. [query-an-embedding-model-databricks-on-aws.md](/references/query-an-embedding-model-databricks-on-aws-18956bab.md)
