Api Client
Interface for an API client which issues HTTP requests to the GenAI APIs.
Inheritors
Functions
Link copied to clipboard
public abstract CompletableFuture<ApiResponse> asyncRequest(String httpMethod, String path, Array<byte> requestBytes, Optional<HttpOptions> httpOptions)
Sends an asynchronous Http request given the http method, path, request bytes, and http options.
public abstract CompletableFuture<ApiResponse> asyncRequest(String httpMethod, String path, String requestJson, Optional<HttpOptions> httpOptions)
Sends an asynchronous Http request given the http method, path, request json string, and http options.
Link copied to clipboard
Returns the GoogleCredentials for Vertex AI APIs.
Link copied to clipboard
Returns the custom base URL if provided.
Link copied to clipboard
Returns the default environment variables for the client.
Link copied to clipboard
Returns the HttpClient for API calls.
Link copied to clipboard
Returns the HTTP options for API calls.
Link copied to clipboard
public abstract ApiResponse request(String httpMethod, String path, Array<byte> requestBytes, Optional<HttpOptions> httpOptions)
Sends a Http request given the http method, path, and request bytes.
public abstract ApiResponse request(String httpMethod, String path, String requestJson, Optional<HttpOptions> httpOptions)
Sends a Http request given the http method, path, and request json string.
Link copied to clipboard
public static void setDefaultBaseUrls(Optional<String> geminiBaseUrl, Optional<String> vertexBaseUrl)
Overrides the base URLs for the Gemini API and/or Vertex AI API.