# Class EmbeddingResponse

java.lang.Object
com.codename1.ai.EmbeddingResponse

public final class EmbeddingResponse extends Object
Immutable provider response containing embeddings, token accounting, and the model name reported by the service.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `EmbeddingResponse(List<Embedding> data, Usage usage, String modelUsed)`
  Creates a normalized embedding response.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<Embedding>`
  `getData()`
  `String`
  `getModelUsed()`
  `Usage`
  `getUsage()`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### EmbeddingResponse

    public EmbeddingResponse(List<Embedding> data, Usage usage, String modelUsed)
    Creates a normalized embedding response.
    Parameters:
      `data` - embedding items in provider response order; `null` becomes empty
      `usage` - provider token accounting, or `null` when omitted
      `modelUsed` - model identifier returned by the provider

- ## Method Details

  - ### getData

    public List<Embedding> getData()
    Returns:
      immutable embedding items in request order

  - ### getUsage

    public Usage getUsage()
    Returns:
      provider token accounting, or `null` when unavailable

  - ### getModelUsed

    public String getModelUsed()
    Returns:
      provider-reported model identifier, or `null` when omitted