Package-level declarations

Types

Link copied to clipboard
class Caches

Provides methods for managing cached content. Instantiating this class is not required. After instantiating a Client, access methods through client.caches directly.

Link copied to clipboard

The main entry point for the Google Gen AI SDK.

Link copied to clipboard
class ClientException(val code: Int, val status: String, message: String) : GenAiApiException

Exception thrown for 4xx client errors from the GenAI API.

Link copied to clipboard
open class GenAiApiException(val code: Int, val status: String, message: String) : GenAiException

Exception thrown when the GenAI API returns an error response.

Link copied to clipboard
sealed class GenAiException : Exception

Base exception class for all exceptions originating from the GenAI SDK.

Link copied to clipboard
expect class GoogleCredentials

Represents the credentials used to authenticate requests to the Google GenAI API.

actual typealias GoogleCredentials = <Error class: unknown class>
Link copied to clipboard
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 directly.

Link copied to clipboard
class ServerException(val code: Int, val status: String, message: String) : GenAiApiException

Exception thrown for 5xx server errors from the GenAI API.