Geminiconnector v1.0

Version 1.0

Connector Overview: This page documents all 21 actions for the Geminiconnector v1.0.

View API Documentation

$discovery

GET Discovery Document

/$discovery/rest

Fetch Geminis discovery document

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

queryParams

Additional query string name/value pairs to append to the request URL.

Version

Specify the version of the discovery document to retrieve, such as "v1".

Response Type

The response format expected from the API (e.g. application/json).

/

POST upload image file

/

upload image file

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

queryParams

Additional query string name/value pairs to append to the request URL.

Content-length

Provide the total size of the file being uploaded in bytes as the Content-Length header.

X-goog-upload-offset

Set the byte offset for the current upload chunk when using resumable upload.

X-goog-upload-command

Specify the upload command, such as "start", "upload", or "finalize", to control the resumable upload flow.

Response Type

The response format expected from the API (e.g. application/json).

Options (1)

Option Name

Description

File

The binary content of the image file to upload.

File search (6)

POST Create file Search Store

/v1beta/fileSearchStores

Create file Search Store

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

queryParams

Additional query string name/value pairs to append to the request URL.

Response Type

The response format expected from the API (e.g. application/json).

Options (1)

Option Name

Description

Displayname

Provide a human-readable name for the new file search store to identify it in the UI.

DELETE Delete a file search store

/v1beta/{name}

Delete a file search store

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

queryParams

Additional query string name/value pairs to append to the request URL.

Name

The unique identifier of the file search store to delete.

Response Type

The response format expected from the API (e.g. application/json).

GET Get a file search store

/v1beta/{name}

Get a file search store

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

queryParams

Additional query string name/value pairs to append to the request URL.

Name

The unique identifier of the file search store to fetch.

Response Type

The response format expected from the API (e.g. application/json).

POST Import File

/v1beta/{storeName}:importFile

Import File

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

queryParams

Additional query string name/value pairs to append to the request URL.

Storename

The identifier of the target file search store where the file should be imported.

Response Type

The response format expected from the API (e.g. application/json).

GET List file Search Stores

/v1beta/fileSearchStores

List file Search Stores

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

queryParams

Additional query string name/value pairs to append to the request URL.

Response Type

The response format expected from the API (e.g. application/json).

POST Upload File to Search Store

/upload/v1beta/{storeName}:uploadToFileSearchStore

Upload File to Search Store

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

queryParams

Additional query string name/value pairs to append to the request URL.

Storename

The identifier of the file search store to which the file should be uploaded.

Response Type

The response format expected from the API (e.g. application/json).

Options (1)

Option Name

Description

File

The binary content of the file to upload.

Files

POST request file upload

/upload/v1beta/files

resumable upload request

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

queryParams

Additional query string name/value pairs to append to the request URL.

X-goog-upload-protocol

Specify the upload protocol, typically "resumable".

X-goog-upload-command

Set the initial upload command, such as "start".

X-goog-upload-header-content-length

Provide the total file size in bytes as a header for the upload session.

X-goog-upload-header-content-type

Specify the MIME type of the file being uploaded.

Response Type

The response format expected from the API (e.g. application/json).

Models (8)

POST Futuristic Bear

/v1beta/models/{model}:predict

Futuristic Bear

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

queryParams

Additional query string name/value pairs to append to the request URL.

Model

The name or identifier of the model to use for prediction.

Response Type

The response format expected from the API (e.g. application/json).

POST batch embeddings

/v1beta/models/{model}:batchEmbedContents

batch embeddings

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

queryParams

Additional query string name/value pairs to append to the request URL.

Model

The name of the model to generate embeddings.

Response Type

The response format expected from the API (e.g. application/json).

POST fetch model

/v1beta/models/{model}

This endpoint retrieves details of a specific model.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

queryParams

Additional query string name/value pairs to append to the request URL.

Model

The unique identifier of the model to fetch.

Response Type

The response format expected from the API (e.g. application/json).

GET fetch models

/v1beta/models

The endpoint retrieves a list of models with the option to paginate the results. The response is a JSON object with a "models" array containing information about each model. The "nextPageToken" field may be included to facilitate pagination.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

queryParams

Additional query string name/value pairs to append to the request URL.

Pagesize

Specify the maximum number of models to return per page for pagination.

Pagetoken

Provide a token from a previous response to retrieve the next page of models.

X-goog-api-key

Pass your API key as a header for authentication.

Response Type

The response format expected from the API (e.g. application/json).

POST generate a text stream

/v1beta/models/{model}:streamGenerateContent

By default, the model returns a response after completing the entire text generation process. You can achieve faster interactions by not waiting for the entire result, and instead use streaming to handle partial results.

The following example shows how to implement streaming using the streamGenerateContent method to generate text from a text-only input prompt.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

queryParams

Additional query string name/value pairs to append to the request URL.

Model

The name of the model to use for streaming content generation.

Alt

Specify the response format, such as "json" or "media", to control the output structure.

Response Type

The response format expected from the API (e.g. application/json).

POST generate embeddings

/v1beta/models/{model}:embedContent

generate embeddings

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

queryParams

Additional query string name/value pairs to append to the request URL.

Model

The identifier of the model used for embedding.

Response Type

The response format expected from the API (e.g. application/json).

Options (3)

Option Name

Description

Model

The specific model version or variant to use for embedding, if different from the path parameter.

Output Dimensionality

Set the number of dimensions for the output embedding vector.

Task Type

Indicate the type of task for which the embedding is intended, such as "retrieval_query" or "classification".

POST text tokens

/v1beta/models/{model}:countTokens

Count text tokens

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

queryParams

Additional query string name/value pairs to append to the request URL.

Model

The name of the model whose tokenizer should be used for counting.

Response Type

The response format expected from the API (e.g. application/json).

POST text-only input

/v1beta/models/{model}:generateContent

The simplest way to generate text using the Gemini API is to provide the model with a single text-only input, as shown in this example.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

queryParams

Additional query string name/value pairs to append to the request URL.

Model

The name of the model to generate content.

Key

Provide your API key as a query parameter for authentication.

Response Type

The response format expected from the API (e.g. application/json).

TunedModels (2)

POST create a tuned model

/v1beta/tunedModels

To create a tuned model, you need to pass your dataset to the model. For this example, you will tune a model to generate the next number in the sequence. For example, if the input is 1, the model should output 2. If the input is one hundred, the output should be one hundred one.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

queryParams

Additional query string name/value pairs to append to the request URL.

Response Type

The response format expected from the API (e.g. application/json).

Options (2)

Option Name

Description

Base Model

Specify the name of the base model to start tuning from.

Display Name

Provide a human-readable name for the tuned model for identification.

GET fetch tuned models

/v1beta/tunedModels

Get all tuned models

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

queryParams

Additional query string name/value pairs to append to the request URL.

Page Size

Set the maximum number of tuned models to return per page for pagination.

Response Type

The response format expected from the API (e.g. application/json).

{tunedModel} (2)

DELETE delete tuned model

/v1beta/{tunedModel}

Delete a tuned model

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

queryParams

Additional query string name/value pairs to append to the request URL.

Tunedmodel

The unique identifier of the tuned model to delete.

Response Type

The response format expected from the API (e.g. application/json).

POST generateContent: prompt the tuned model

/v1beta/string:generateContent

Try the tuned model

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

queryParams

Additional query string name/value pairs to append to the request URL.

Response Type

The response format expected from the API (e.g. application/json).