> ## Documentation Index
> Fetch the complete documentation index at: https://www.adaline.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# LogSpanEmbeddingsContent

> Span content type for embedding generation operations.

# LogSpanEmbeddingsContent

Span content for embedding generation calls. Use this type when logging operations that convert text into vector representations, such as calls to OpenAI's `text-embedding-3-large` or similar models.

## Import

```typescript theme={null}
import type { LogSpanEmbeddingsContent } from '@adaline/api';
import { LogSpanEmbeddingsContentTypeEnum } from '@adaline/api';
```

## Type Definition

```typescript theme={null}
interface LogSpanEmbeddingsContent {
  type: 'Embeddings';
  input: string;                   // JSON string (must be valid JSON)
  output: string;                  // JSON string (must be valid JSON)
}
```

## Properties

* `type` - Discriminator field, always `'Embeddings'` for this content type
* `input` - The embedding request as a JSON string (`JSON.stringify()` of the request object)
* `output` - The embedding response as a JSON string (`JSON.stringify()` of the response object)

Both `input` and `output` must be valid, parseable JSON strings (the result of `JSON.stringify()`). Passing a plain string that isn't valid JSON will cause the span to be rejected.

***

## Example

```typescript theme={null}
import OpenAI from 'openai';

const openai = new OpenAI();

const params = {
  model: 'text-embedding-3-large',
  input: ['What is quantum computing?', 'Explain neural networks.'],
  dimensions: 3072,
};

const response = await openai.embeddings.create(params);

span.update({
  content: {
    type: 'Embeddings',
    input: JSON.stringify(params),
    output: JSON.stringify(response),
  },
});
```

***

## Related

* [LogSpanContent](/docs/reference/sdk/v2/typescript/types/LogSpanContent) — union type that includes `LogSpanEmbeddingsContent`
* [LogSpanRetrievalContent](/docs/reference/sdk/v2/typescript/types/LogSpanRetrievalContent) — often used alongside embeddings for RAG pipelines
* [Span](/docs/reference/sdk/v2/typescript/classes/span) — class that accepts `LogSpanContent` via `span.update()`
