python-genai の API リファレンス
python-genai (googleapis/python-genai) の公開 API 251 件 —— クラス 176、関数 26、メソッド 49。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。
リポジトリ: googleapis/python-genai
| 種別 | 件数 |
|---|---|
| クラス | 176 |
| 関数 | 26 |
| メソッド | 49 |
API 一覧
class
google.genai._adapters.McpToGenAiToolAdapterAdapter for working with MCP tools in a GenAI client.
method
google.genai._adapters.McpToGenAiToolAdapter.call_tool(function_call:FunctionCall) -> 'mcp_types.CallToolResult'Calls a function on the MCP server.
method
google.genai._adapters.McpToGenAiToolAdapter.tools() -> list[Tool]Returns a list of Google GenAI tools.
class
google.genai._api_client.AsyncHttpxClientAsync httpx client.
class
google.genai._api_client.BaseApiClientClient for calling HTTP APIs sending and receiving JSON.
method
google.genai._api_client.BaseApiClient.aclose() -> NoneCloses the API async client.
method
google.genai._api_client.BaseApiClient.async_download_file(path:str, *http_options:Optional[HttpOptionsOrDict]=None) -> Union[Any, bytes]Downloads the file data.
method
google.genai._api_client.BaseApiClient.close() -> NoneCloses the API client.
method
google.genai._api_client.BaseApiClient.download_file(path:str, *http_options:Optional[HttpOptionsOrDict]=None) -> Union[Any, bytes]Downloads the file data.
method
google.genai._api_client.BaseApiClient.upload_file(file_path:Union[str, io.IOBase], upload_url:str, upload_size:int, *http_options:Optional[HttpOptionsOrDict]=None) -> HttpResponseTransfers a file to the given URL.
class
google.genai._api_client.EphemeralTokenAPIKeyErrorError raised when the API key is invalid.
class
google.genai._api_client.SyncHttpxClientSync httpx client.
func
google.genai._api_client.append_library_version_headers(headers:dict[str, str]) -> NoneAppends the telemetry header to the headers dict.
func
google.genai._api_client.get_timeout_in_seconds(timeout:Optional[Union[float, int]]) -> Optional[float]Converts the timeout to seconds.
func
google.genai._api_client.load_auth(*project:Union[str, None]) -> Tuple[Credentials, str]Loads google auth credentials and project id.
func
google.genai._api_client.retry_args(options:Optional[HttpRetryOptions]) -> _common.StringDictReturns the retry args for the given http retry options.
class
google.genai._common.CaseInSensitiveEnumCase insensitive enum.
class
google.genai._common.ExperimentalWarningWarning for experimental features.
func
google.genai._common.convert_to_dict(obj:object, convert_keys:bool=False) -> AnyRecursively converts a given object to a dictionary.
func
google.genai._common.experimental_warning(message:str) -> Callable[[Callable[..., Any]], Callable[..., Any]]Experimental warning, only warns once.
func
google.genai._common.maybe_snake_to_camel(snake_str:str, convert:bool=True) -> strConverts a snake_case string to CamelCase, if convert is True.
func
google.genai._common.move_value_by_path(data:Any, paths:dict[str, str]) -> NoneMoves values from source paths to destination paths.
func
google.genai._common.timestamped_unique_name() -> strComposes a timestamped unique name.
func
google.genai._extra_utils.get_usage_header(config:Optional[Union[dict[str, Any], C]], config_cls:Type[C], usage:str) -> CReturns the usage header for the config.
class
google.genai._gaos._hooks.types.AfterParseErrorContextContext for `AfterParseErrorHook`.
method
google.genai._gaos.agents.Agents.delete(id:str, *api_version:Optional[str]=None, *extra_headers:Optional[Mapping[str, str]]=None, *extra_query:Optional[Mapping[str, Any]]=None, *timeout:Optional[Union[float, httpx.Timeout]]=None) -> interactions.EmptyDeletes an Agent.
method
google.genai._gaos.agents.Agents.get(id:str, *api_version:Optional[str]=None, *extra_headers:Optional[Mapping[str, str]]=None, *extra_query:Optional[Mapping[str, Any]]=None, *timeout:Optional[Union[float, httpx.Timeout]]=None) -> agents.AgentGets a specific Agent.
class
google.genai._gaos.errors.cancelinteractionbyid.CancelInteractionByIDClientErrorError cancelling interaction
class
google.genai._gaos.errors.cancelinteractionbyid.CancelInteractionByIDServerErrorError cancelling interaction
class
google.genai._gaos.errors.createinteraction.CreateInteractionClientErrorError creating interaction
class
google.genai._gaos.errors.createinteraction.CreateInteractionServerErrorError creating interaction
class
google.genai._gaos.errors.deleteinteraction.DeleteInteractionClientErrorError deleting interaction
class
google.genai._gaos.errors.deleteinteraction.DeleteInteractionServerErrorError deleting interaction
class
google.genai._gaos.errors.genaidefaulterror.GenAiDefaultErrorThe fallback error class if no more specific error class is matched.
class
google.genai._gaos.errors.genaierror.GenAiErrorThe base class for all HTTP error responses.
class
google.genai._gaos.errors.getinteractionbyid.GetInteractionByIDClientErrorError getting interaction
class
google.genai._gaos.errors.getinteractionbyid.GetInteractionByIDServerErrorError getting interaction
class
google.genai._gaos.google_genai.GeminiNextGenAgentsPublic agents resource backed by the NextGen client.
class
google.genai._gaos.lib.compat_errors.APIErrorGeneral errors raised by the GenAI API.
class
google.genai._gaos.lib.compat_errors.GeminiNextGenAPIClientErrorRoot of the GenAI error hierarchy.
func
google.genai._gaos.lib.compat_errors.async_wrap_sdk_call(fn:Callable[..., Awaitable[T]], *args:Any, **kwargs:Any) -> TAsync variant of `wrap_sdk_call`.
func
google.genai._gaos.lib.compat_errors.is_stream(obj:Any) -> boolTrue if `obj` is a live SSE `Stream` / `AsyncStream`.
func
google.genai._gaos.lib.compat_errors.wrap_async_stream_errors(stream:AsyncStream[Any]) -> AsyncStream[Any]Async variant of `wrap_stream_errors`.
class
google.genai._gaos.types.agents.agent.AgentAn agent definition for the CreateAgent API.
class
google.genai._gaos.types.agents.agent.AgentParamAn agent definition for the CreateAgent API.
class
google.genai._gaos.types.agents.agenttool.UnknownAgentToolA AgentTool variant the SDK doesn't recognize.
func
google.genai._gaos.types.base64fileinput.encode_base64_file_input(value:Any) -> AnyConvert PathLike or IO[bytes] inputs to a base64 string.
class
google.genai._gaos.types.environments.createenvironmentrequest.CreateEnvironmentRequestRequest for `CreateEnvironment`.
class
google.genai._gaos.types.environments.createenvironmentrequest.CreateEnvironmentRequestParamRequest for `CreateEnvironment`.
class
google.genai._gaos.types.environments.environment.EnvironmentAn execution environment for an agent.
class
google.genai._gaos.types.environments.environment.EnvironmentTypedDictAn execution environment for an agent.
class
google.genai._gaos.types.environments.listenvironmentsresponse.ListEnvironmentsResponseResponse for `ListEnvironments`.
class
google.genai._gaos.types.environments.listenvironmentsresponse.ListEnvironmentsResponseTypedDictResponse for `ListEnvironments`.
class
google.genai._gaos.types.interactions.allowedtools.AllowedToolsThe configuration for allowed tools.
class
google.genai._gaos.types.interactions.allowedtools.AllowedToolsParamThe configuration for allowed tools.
class
google.genai._gaos.types.interactions.annotation.UnknownAnnotationA Annotation variant the SDK doesn't recognize.
class
google.genai._gaos.types.interactions.audiocontent.AudioContentAn audio content block.
class
google.genai._gaos.types.interactions.audiocontent.AudioContentParamAn audio content block.
class
google.genai._gaos.types.interactions.audioresponseformat.AudioResponseFormatConfiguration for audio output format.
class
google.genai._gaos.types.interactions.audioresponseformat.AudioResponseFormatParamConfiguration for audio output format.
class
google.genai._gaos.types.interactions.codeexecutioncallstep.CodeExecutionCallStepCode execution call step.
class
google.genai._gaos.types.interactions.codeexecutioncallstep.CodeExecutionCallStepParamCode execution call step.
class
google.genai._gaos.types.interactions.codeexecutionresultstep.CodeExecutionResultStepCode execution result step.
class
google.genai._gaos.types.interactions.codeexecutionresultstep.CodeExecutionResultStepParamCode execution result step.
class
google.genai._gaos.types.interactions.codemenderagentconfig.CodeMenderAgentConfigConfiguration for the CodeMender agent.
class
google.genai._gaos.types.interactions.codemenderagentconfig.CodeMenderAgentConfigParamConfiguration for the CodeMender agent.
class
google.genai._gaos.types.interactions.content.UnknownContentA Content variant the SDK doesn't recognize.
class
google.genai._gaos.types.interactions.documentcontent.DocumentContentA document content block.
class
google.genai._gaos.types.interactions.documentcontent.DocumentContentParamA document content block.
class
google.genai._gaos.types.interactions.dynamicagentconfig.DynamicAgentConfigConfiguration for dynamic agents.
class
google.genai._gaos.types.interactions.dynamicagentconfig.DynamicAgentConfigParamConfiguration for dynamic agents.
class
google.genai._gaos.types.interactions.environment.EnvironmentConfiguration for a custom environment.
class
google.genai._gaos.types.interactions.environment.EnvironmentParamConfiguration for a custom environment.
class
google.genai._gaos.types.interactions.error.ErrorError message from an interaction.
class
google.genai._gaos.types.interactions.error.ErrorTypedDictError message from an interaction.
class
google.genai._gaos.types.interactions.filecitation.FileCitationA file citation annotation.
class
google.genai._gaos.types.interactions.filecitation.FileCitationParamA file citation annotation.
class
google.genai._gaos.types.interactions.filecontent.FileContentContent of a single file in the codebase.
class
google.genai._gaos.types.interactions.filecontent.FileContentParamContent of a single file in the codebase.
class
google.genai._gaos.types.interactions.filesearchcallstep.FileSearchCallStepFile Search call step.
class
google.genai._gaos.types.interactions.filesearchcallstep.FileSearchCallStepParamFile Search call step.
class
google.genai._gaos.types.interactions.filesearchresult.FileSearchResultThe result of the File Search.
class
google.genai._gaos.types.interactions.filesearchresult.FileSearchResultTypedDictThe result of the File Search.
class
google.genai._gaos.types.interactions.filesearchresultstep.FileSearchResultStepFile Search result step.
class
google.genai._gaos.types.interactions.filesearchresultstep.FileSearchResultStepParamFile Search result step.
class
google.genai._gaos.types.interactions.filter_.FilterConfig for filters.
class
google.genai._gaos.types.interactions.filter_.FilterParamConfig for filters.
class
google.genai._gaos.types.interactions.function.FunctionA tool that can be used by the model.
class
google.genai._gaos.types.interactions.function.FunctionParamA tool that can be used by the model.
class
google.genai._gaos.types.interactions.functioncallstep.FunctionCallStepA function tool call step.
class
google.genai._gaos.types.interactions.functioncallstep.FunctionCallStepParamA function tool call step.
class
google.genai._gaos.types.interactions.functionresultstep.FunctionResultStepResult of a function tool call.
class
google.genai._gaos.types.interactions.functionresultstep.FunctionResultStepParamResult of a function tool call.
class
google.genai._gaos.types.interactions.googlemapscallstep.GoogleMapsCallStepGoogle Maps call step.
class
google.genai._gaos.types.interactions.googlemapscallstep.GoogleMapsCallStepParamGoogle Maps call step.
class
google.genai._gaos.types.interactions.googlemapsresult.GoogleMapsResultThe result of the Google Maps.
class
google.genai._gaos.types.interactions.googlemapsresult.GoogleMapsResultParamThe result of the Google Maps.
class
google.genai._gaos.types.interactions.googlemapsresultstep.GoogleMapsResultStepGoogle Maps result step.
class
google.genai._gaos.types.interactions.googlemapsresultstep.GoogleMapsResultStepParamGoogle Maps result step.
class
google.genai._gaos.types.interactions.googlesearchcallarguments.GoogleSearchCallArgumentsThe arguments to pass to Google Search.
class
google.genai._gaos.types.interactions.googlesearchcallstep.GoogleSearchCallStepGoogle Search call step.
class
google.genai._gaos.types.interactions.googlesearchcallstep.GoogleSearchCallStepParamGoogle Search call step.
class
google.genai._gaos.types.interactions.googlesearchresult.GoogleSearchResultThe result of the Google Search.
class
google.genai._gaos.types.interactions.googlesearchresult.GoogleSearchResultParamThe result of the Google Search.
class
google.genai._gaos.types.interactions.googlesearchresultstep.GoogleSearchResultStepGoogle Search result step.
class
google.genai._gaos.types.interactions.googlesearchresultstep.GoogleSearchResultStepParamGoogle Search result step.
class
google.genai._gaos.types.interactions.groundingtoolcount.GroundingToolCountThe number of grounding tool counts.
class
google.genai._gaos.types.interactions.groundingtoolcount.GroundingToolCountTypedDictThe number of grounding tool counts.
class
google.genai._gaos.types.interactions.hybridsearch.HybridSearchConfig for Hybrid Search.
class
google.genai._gaos.types.interactions.hybridsearch.HybridSearchParamConfig for Hybrid Search.
class
google.genai._gaos.types.interactions.imageconfig.ImageConfigThe configuration for image interaction.
class
google.genai._gaos.types.interactions.imageconfig.ImageConfigParamThe configuration for image interaction.
class
google.genai._gaos.types.interactions.imagecontent.ImageContentAn image content block.
class
google.genai._gaos.types.interactions.imagecontent.ImageContentParamAn image content block.
class
google.genai._gaos.types.interactions.imageresponseformat.ImageResponseFormatConfiguration for image output format.
class
google.genai._gaos.types.interactions.imageresponseformat.ImageResponseFormatParamConfiguration for image output format.
class
google.genai._gaos.types.interactions.interaction.InteractionThe Interaction resource.
class
google.genai._gaos.types.interactions.interaction.InteractionTypedDictThe Interaction resource.
class
google.genai._gaos.types.interactions.mcpservertoolcallstep.MCPServerToolCallStepMCPServer tool call step.
class
google.genai._gaos.types.interactions.mcpservertoolcallstep.MCPServerToolCallStepParamMCPServer tool call step.
class
google.genai._gaos.types.interactions.mcpservertoolresultstep.MCPServerToolResultStepMCPServer tool result step.
class
google.genai._gaos.types.interactions.mcpservertoolresultstep.MCPServerToolResultStepParamMCPServer tool result step.
class
google.genai._gaos.types.interactions.modeloutputstep.ModelOutputStepOutput generated by the model.
class
google.genai._gaos.types.interactions.modeloutputstep.ModelOutputStepParamOutput generated by the model.
class
google.genai._gaos.types.interactions.placecitation.PlaceCitationA place citation annotation.
class
google.genai._gaos.types.interactions.placecitation.PlaceCitationParamA place citation annotation.
class
google.genai._gaos.types.interactions.ragresource.RagResourceThe definition of the Rag resource.
class
google.genai._gaos.types.interactions.ragresource.RagResourceParamThe definition of the Rag resource.
class
google.genai._gaos.types.interactions.ragretrievalconfig.RagRetrievalConfigSpecifies the context retrieval config.
class
google.genai._gaos.types.interactions.ragretrievalconfig.RagRetrievalConfigParamSpecifies the context retrieval config.
class
google.genai._gaos.types.interactions.ragstoreconfig.RagStoreConfigUse to specify configuration for RAG Store.
class
google.genai._gaos.types.interactions.ragstoreconfig.RagStoreConfigParamUse to specify configuration for RAG Store.
class
google.genai._gaos.types.interactions.ranking.RankingConfig for Rank Service.
class
google.genai._gaos.types.interactions.ranking.RankingParamConfig for Rank Service.
class
google.genai._gaos.types.interactions.retrievalcallarguments.RetrievalCallArgumentsThe arguments to pass to Retrieval tools.
class
google.genai._gaos.types.interactions.sessionconfig.SessionConfigThe configuration of CodeMender sessions.
class
google.genai._gaos.types.interactions.sessionconfig.SessionConfigParamThe configuration of CodeMender sessions.
class
google.genai._gaos.types.interactions.source.SourceA source to be mounted into the environment.
class
google.genai._gaos.types.interactions.source.SourceParamA source to be mounted into the environment.
class
google.genai._gaos.types.interactions.speechconfig.SpeechConfigThe configuration for speech interaction.
class
google.genai._gaos.types.interactions.speechconfig.SpeechConfigParamThe configuration for speech interaction.
class
google.genai._gaos.types.interactions.step.UnknownStepA Step variant the SDK doesn't recognize.
class
google.genai._gaos.types.interactions.textcontent.TextContentA text content block.
class
google.genai._gaos.types.interactions.textcontent.TextContentParamA text content block.
class
google.genai._gaos.types.interactions.textresponseformat.TextResponseFormatConfiguration for text output format.
class
google.genai._gaos.types.interactions.textresponseformat.TextResponseFormatParamConfiguration for text output format.
class
google.genai._gaos.types.interactions.thoughtstep.ThoughtStepA thought step.
class
google.genai._gaos.types.interactions.thoughtstep.ThoughtStepParamA thought step.
class
google.genai._gaos.types.interactions.tool.UnknownToolA Tool variant the SDK doesn't recognize.
class
google.genai._gaos.types.interactions.urlcitation.URLCitationA URL citation annotation.
class
google.genai._gaos.types.interactions.urlcitation.URLCitationParamA URL citation annotation.
class
google.genai._gaos.types.interactions.urlcontextcallstep.URLContextCallStepURL context call step.
class
google.genai._gaos.types.interactions.urlcontextcallstep.URLContextCallStepParamURL context call step.
class
google.genai._gaos.types.interactions.urlcontextresult.URLContextResultThe result of the URL context.
class
google.genai._gaos.types.interactions.urlcontextresult.URLContextResultParamThe result of the URL context.
class
google.genai._gaos.types.interactions.urlcontextresultstep.URLContextResultStepURL context result step.
class
google.genai._gaos.types.interactions.urlcontextresultstep.URLContextResultStepParamURL context result step.
class
google.genai._gaos.types.interactions.usage.UsageStatistics on the interaction request's token usage.
class
google.genai._gaos.types.interactions.userinputstep.UserInputStepInput provided by the user.
class
google.genai._gaos.types.interactions.userinputstep.UserInputStepParamInput provided by the user.
class
google.genai._gaos.types.interactions.videoconfig.VideoConfigConfiguration options for video generation.
class
google.genai._gaos.types.interactions.videoconfig.VideoConfigParamConfiguration options for video generation.
class
google.genai._gaos.types.interactions.videocontent.VideoContentA video content block.
class
google.genai._gaos.types.interactions.videocontent.VideoContentParamA video content block.
class
google.genai._gaos.types.interactions.videoresponseformat.VideoResponseFormatConfiguration for video output format.
class
google.genai._gaos.types.interactions.videoresponseformat.VideoResponseFormatParamConfiguration for video output format.
class
google.genai._gaos.types.interactions.wordinfo.WordInfoWord-level ASR annotation for transcription output.
class
google.genai._gaos.types.triggers.triggercreateparams.TriggerCreateParamsParameters for creating a trigger.
class
google.genai._gaos.types.triggers.triggercreateparams.TriggerCreateParamsParamParameters for creating a trigger.
class
google.genai._gaos.types.triggers.triggerexecution.TriggerExecutionAn execution instance of a trigger.
class
google.genai._gaos.types.triggers.triggerexecution.TriggerExecutionTypedDictAn execution instance of a trigger.
class
google.genai._gaos.types.webhooks.webhook.WebhookA Webhook resource.
class
google.genai._gaos.types.webhooks.webhook.WebhookInputA Webhook resource.
class
google.genai._gaos.types.webhooks.webhook.WebhookInputParamA Webhook resource.
class
google.genai._gaos.types.webhooks.webhook.WebhookTypedDictA Webhook resource.
func
google.genai._gaos.utils.annotations.get_field_discriminator(field:Any) -> Optional[str]Search for the discriminator attribute in a given field.
func
google.genai._gaos.utils.datetimes.parse_duration(duration_string:str) -> timedeltaConvert an ISO 8601 duration string (e.g.
func
google.genai._gaos.utils.response_helpers.raise_parse_error(hooks:Optional[Any], hook_ctx:Optional[AfterParseErrorContext], response:httpx.Response, exc:Exception) -> NoReturnRaise the hook-substituted parse error.
class
google.genai._gaos.utils.retries.BackoffStrategyExponential backoff strategy configuration.
class
google.genai._gaos.utils.retries.RetryConfigRuntime retry configuration.
func
google.genai._local_tokenizer_loader.get_tokenizer_name(model_name:str) -> strGets the tokenizer name for the given model name.
func
google.genai._local_tokenizer_loader.load_model_proto(tokenizer_name:str) -> sentencepiece_model_pb2.ModelProtoLoads model proto from the given tokenizer name.
func
google.genai._mcp_utils.agent_platform_to_gemini_tool(tool:McpTool) -> types.ToolTranslates an Agent Platform tool to a Google GenAI tool.
func
google.genai._mcp_utils.has_mcp_session_usage(tools:types.ToolListUnion) -> boolChecks whether the list of tools contains any MCP sessions.
func
google.genai._mcp_utils.mcp_to_gemini_tool(tool:McpTool) -> types.ToolTranslates an MCP tool to a Google GenAI tool.
func
google.genai._mcp_utils.set_mcp_usage_header(headers:dict[str, str]) -> NoneSets the MCP version label in the Google API client header.
class
google.genai._replay_api_client.ReplayFileRepresents a recorded session.
class
google.genai._replay_api_client.ReplayRequestRepresents a single request in a replay.
class
google.genai._replay_api_client.ReplayResponseRepresents a single response in a replay.
func
google.genai._replay_api_client.pop_undeterministic_headers(headers:dict[str, str]) -> NoneRemove headers that are not deterministic.
func
google.genai._replay_api_client.to_snake_case(name:str) -> strConverts a string from camelCase or PascalCase to snake_case.
func
google.genai._transformers.t_metrics(metrics:list[types.MetricSubclass]) -> list[dict[str, Any]]Prepares the metric payload for the evaluation request.
method
google.genai.batches.AsyncBatches.cancel(*name:str, *config:Optional[types.CancelBatchJobConfigOrDict]=None) -> NoneCancels a batch job.
method
google.genai.batches.AsyncBatches.create(*model:str, *src:types.BatchJobSourceUnionDict, *config:Optional[types.CreateBatchJobConfigOrDict]=None) -> types.BatchJobCreates a batch job asynchronously.
method
google.genai.batches.AsyncBatches.delete(*name:str, *config:Optional[types.DeleteBatchJobConfigOrDict]=None) -> types.DeleteResourceJobDeletes a batch job.
method
google.genai.batches.AsyncBatches.get(*name:str, *config:Optional[types.GetBatchJobConfigOrDict]=None) -> types.BatchJobGets a batch job.
method
google.genai.batches.AsyncBatches.list(*config:Optional[types.ListBatchJobsConfigOrDict]=None) -> AsyncPager[types.BatchJob]Lists batch jobs asynchronously.
method
google.genai.batches.Batches.cancel(*name:str, *config:Optional[types.CancelBatchJobConfigOrDict]=None) -> NoneCancels a batch job.
method
google.genai.batches.Batches.create(*model:str, *src:types.BatchJobSourceUnionDict, *config:Optional[types.CreateBatchJobConfigOrDict]=None) -> types.BatchJobCreates a batch job.
method
google.genai.batches.Batches.delete(*name:str, *config:Optional[types.DeleteBatchJobConfigOrDict]=None) -> types.DeleteResourceJobDeletes a batch job.
method
google.genai.batches.Batches.get(*name:str, *config:Optional[types.GetBatchJobConfigOrDict]=None) -> types.BatchJobGets a batch job.
method
google.genai.batches.Batches.list(*config:Optional[types.ListBatchJobsConfigOrDict]=None) -> Pager[types.BatchJob]Lists batch jobs.
class
google.genai.chats.AsyncChatAsync chat session.
class
google.genai.chats.AsyncChatsA util class to create async chat sessions.
method
google.genai.chats.AsyncChats.create(*model:str, *config:Optional[GenerateContentConfigOrDict]=None, *history:Optional[list[ContentOrDict]]=None) -> AsyncChatCreates a new chat session.
class
google.genai.chats.ChatChat session.
class
google.genai.chats.ChatsA util class to create chat sessions.
method
google.genai.chats.Chats.create(*model:str, *config:Optional[GenerateContentConfigOrDict]=None, *history:Optional[list[ContentOrDict]]=None) -> ChatCreates a new chat session.
class
google.genai.client.AsyncClientClient for making asynchronous (non-blocking) requests.
method
google.genai.client.AsyncClient.aclose() -> NoneCloses the async client explicitly.
method
google.genai.client.AsyncClient.environments() -> AsyncGeminiNextGenEnvironmentsEnvironments resource.
class
google.genai.client.ClientClient for making synchronous requests.
method
google.genai.client.Client.close() -> NoneCloses the synchronous client explicitly.
method
google.genai.client.Client.vertexai() -> boolReturns whether the client is using the Vertex AI API.
method
google.genai.documents.Documents.delete(*name:str, *config:Optional[types.DeleteDocumentConfigOrDict]=None) -> NoneDeletes a Document.
method
google.genai.documents.Documents.get(*name:str, *config:Optional[types.GetDocumentConfigOrDict]=None) -> types.DocumentGets metadata about a Document.
method
google.genai.documents.Documents.list(*parent:str, *config:Optional[types.ListDocumentsConfigOrDict]=None) -> Pager[types.Document]Lists documents.
class
google.genai.errors.APIErrorGeneral errors raised by the GenAI API.
class
google.genai.errors.ClientErrorClient error raised by the GenAI API.
class
google.genai.errors.ServerErrorServer error raised by the GenAI API.
class
google.genai.errors.UnsupportedFunctionErrorRaised when the function is not supported.
method
google.genai.files.Files.delete(*name:str, *config:Optional[types.DeleteFileConfigOrDict]=None) -> types.DeleteFileResponseDeletes a remotely stored file.
method
google.genai.files.Files.download(*file:Union[str, types.File, types.Video, types.GeneratedVideo], *config:Optional[types.DownloadFileConfigOrDict]=None) -> bytesDownloads a file's data from storage.
method
google.genai.files.Files.get(*name:str, *config:Optional[types.GetFileConfigOrDict]=None) -> types.FileRetrieves the file information from the service.
method
google.genai.files.Files.list(*config:Optional[types.ListFilesConfigOrDict]=None) -> Pager[types.File]Lists all files from the service.
class
google.genai.live.AsyncLive[Preview] AsyncLive.
method
google.genai.live.AsyncLive.connect(*model:str, *config:Optional[types.LiveConnectConfigOrDict]=None) -> AsyncIterator[AsyncSession][Preview] Connect to the live server.
class
google.genai.live.AsyncSession[Preview] AsyncSession.
method
google.genai.live.AsyncSession.receive() -> AsyncIterator[types.LiveServerMessage]Receive model responses from the server.
method
google.genai.live.AsyncSession.send_tool_response(*function_responses:Union[types.FunctionResponseOrDict, Sequence[types.FunctionResponseOrDict]]) -> NoneSend a tool response to the session.
class
google.genai.live_music.AsyncLiveMusic[Experimental] Live music module.
method
google.genai.live_music.AsyncLiveMusic.connect(*model:str) -> AsyncIterator[AsyncMusicSession][Experimental] Connect to the live music server.
class
google.genai.live_music.AsyncMusicSession[Experimental] AsyncMusicSession.
method
google.genai.live_music.AsyncMusicSession.pause() -> NoneSends a playback signal to pause the music stream.
method
google.genai.live_music.AsyncMusicSession.play() -> NoneSends playback signal to start the music stream.
method
google.genai.live_music.AsyncMusicSession.receive() -> AsyncIterator[types.LiveMusicServerMessage]Receive model responses from the server.
method
google.genai.live_music.AsyncMusicSession.stop() -> NoneSends a playback signal to stop the music stream.
class
google.genai.local_tokenizer.LocalTokenizer[Experimental] Text Only Local Tokenizer.
method
google.genai.models.AsyncModels.list(*config:Optional[types.ListModelsConfigOrDict]=None) -> AsyncPager[types.Model]Makes an API request to list the available models.
method
google.genai.models.AsyncModels.recontext_image(*model:str, *source:types.RecontextImageSourceOrDict, *config:Optional[types.RecontextImageConfigOrDict]=None) -> types.RecontextImageResponseRecontextualizes an image.
method
google.genai.models.Models.list(*config:Optional[types.ListModelsConfigOrDict]=None) -> Pager[types.Model]Makes an API request to list the available models.
method
google.genai.models.Models.recontext_image(*model:str, *source:types.RecontextImageSourceOrDict, *config:Optional[types.RecontextImageConfigOrDict]=None) -> types.RecontextImageResponseRecontextualizes an image.
method
google.genai.operations.Operations.get(operation:T, *config:Optional[types.GetOperationConfigOrDict]=None) -> TGets the status of a long-running operation.
class
google.genai.pagers.AsyncPagerAsyncPager class for iterating through paginated results.
method
google.genai.pagers.AsyncPager.next_page() -> list[T]Fetches the next page of items asynchronously.
class
google.genai.pagers.PagerPager class for iterating through paginated results.
method
google.genai.pagers.Pager.next_page() -> list[T]Fetches the next page of items.
class
google.genai.tokens.AsyncTokens[Experimental] Async Auth Tokens API client.
method
google.genai.tokens.AsyncTokens.create(*config:Optional[types.CreateAuthTokenConfigOrDict]=None) -> types.AuthTokenCreates an auth token asynchronously.
class
google.genai.tokens.Tokens[Experimental] Auth Tokens API client.
method
google.genai.tokens.Tokens.create(*config:Optional[types.CreateAuthTokenConfigOrDict]=None) -> types.AuthToken[Experimental] Creates an auth token.
この情報について
掲載しているシグネチャは googleapis/python-genai の公開ソースコードを
Python の ast モジュールで静的解析し、引数名・デフォルト値・
型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。
詳しくは仕組みの解説をご覧ください。