# Class EmbeddingRequest

java.lang.Object
com.codename1.ai.EmbeddingRequest

public final class EmbeddingRequest extends java.lang.Object
Request payload for `LlmClient.embed(EmbeddingRequest)`. Carries one or more input strings plus optional `dimensions` (OpenAI's `dimensions`, Gemini's `outputDimensionality`). A `null` value means "use the model's default dimensionality".

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final class`
  `EmbeddingRequest.Builder`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static EmbeddingRequest.Builder`
  `builder()`
  `Integer`
  `getDimensions()`
  `List<String>`
  `getInputs()`
  `String`
  `getModel()`
  `static EmbeddingRequest`
  `of(String model, String text)`
  Convenience for the single-input case.

  ### Methods inherited from class java.lang.Object

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

- ## Method Details

  - ### builder

    public static EmbeddingRequest.Builder builder()

  - ### of

    public static EmbeddingRequest of(String model, String text)
    Convenience for the single-input case.

  - ### getModel

    public String getModel()

  - ### getInputs

    public List<String> getInputs()

  - ### getDimensions

    public Integer getDimensions()