Models

public final class Models

Provides methods for interacting with the available GenAI models. Instantiating this class is not required. After instantiating a Client, access methods through `client.models.methodName(...)` directly.

Constructors

Link copied to clipboard
public void Models(ApiClient apiClient)

Functions

Link copied to clipboard
Computes tokens given a GenAI model and a text string.
Computes tokens given a GenAI model and a list of content.
Link copied to clipboard
Counts tokens given a GenAI model and a text string.
Counts tokens given a GenAI model and a list of content.
Link copied to clipboard
Fetches information about a model by name.
Link copied to clipboard
public EditImageResponse editImage(String model, String prompt, List<ReferenceImage> referenceImages, EditImageConfig config)
Edits an image given a GenAI model, a prompt, and a list of reference images.
Link copied to clipboard
Embeds content given a GenAI model and a content object.
Embeds content given a GenAI model and a text string.
Embeds content given a GenAI model and a list of text strings.
Link copied to clipboard
Generates content given a GenAI model and a content object.
Generates content given a GenAI model and a text string.
Generates content given a GenAI model and a list of content.
Link copied to clipboard
Generates content with streaming support given a GenAI model and a content object.
Generates content with streaming support given a GenAI model and a text string.
Generates content with streaming support given a GenAI model and a list of content.
Link copied to clipboard
Generates images given a GenAI model and a prompt.
Link copied to clipboard
Generates videos given a GenAI model, and a GenerateVideosSource source.
Generates videos given a GenAI model, and an input (text, image).
public GenerateVideosOperation generateVideos(String model, String prompt, Image image, Video video, GenerateVideosConfig config)
Generates videos given a GenAI model, and an input (text, image, or video).
Link copied to clipboard
public Model get(String model, GetModelConfig config)
Fetches information about a model by name.
Link copied to clipboard
public Pager<Model> list(ListModelsConfig config)
Makes an API request to list the available models.
Link copied to clipboard
Recontextualizes an image.
Link copied to clipboard
Segments an image, creating a mask of a specified area.
Link copied to clipboard
public Model update(String model, UpdateModelConfig config)
Updates a tuned model by its name.
Link copied to clipboard
public UpscaleImageResponse upscaleImage(String model, Image image, String upscaleFactor, UpscaleImageConfig config)
Upscales an image given a GenAI model and an image and an upscale factor.