Version 1.0
Connector Overview: This page documents all 21 actions for the Geminiconnector v1.0.
$discovery
GET Discovery Document
/$discovery/rest
Fetch Geminis discovery document
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
Additional HTTP header name/value pairs to include in the request. |
|
|
Additional query string name/value pairs to append to the request URL. |
|
|
Specify the version of the discovery document to retrieve, such as "v1". |
|
|
The response format expected from the API (e.g. application/json). |
/
POST upload image file
/
upload image file
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
The content type of the request payload sent to the API (e.g. application/json). |
|
|
Additional HTTP header name/value pairs to include in the request. |
|
|
Additional query string name/value pairs to append to the request URL. |
|
|
Provide the total size of the file being uploaded in bytes as the Content-Length header. |
|
|
Set the byte offset for the current upload chunk when using resumable upload. |
|
|
Specify the upload command, such as "start", "upload", or "finalize", to control the resumable upload flow. |
|
|
The response format expected from the API (e.g. application/json). |
Options (1)
|
Option Name |
Description |
|---|---|
|
|
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 |
|---|---|
|
|
The content type of the request payload sent to the API (e.g. application/json). |
|
|
Additional HTTP header name/value pairs to include in the request. |
|
|
Additional query string name/value pairs to append to the request URL. |
|
|
The response format expected from the API (e.g. application/json). |
Options (1)
|
Option Name |
Description |
|---|---|
|
|
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 |
|---|---|
|
|
Additional HTTP header name/value pairs to include in the request. |
|
|
Additional query string name/value pairs to append to the request URL. |
|
|
The unique identifier of the file search store to delete. |
|
|
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 |
|---|---|
|
|
Additional HTTP header name/value pairs to include in the request. |
|
|
Additional query string name/value pairs to append to the request URL. |
|
|
The unique identifier of the file search store to fetch. |
|
|
The response format expected from the API (e.g. application/json). |
POST Import File
/v1beta/{storeName}:importFile
Import File
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
Additional HTTP header name/value pairs to include in the request. |
|
|
Additional query string name/value pairs to append to the request URL. |
|
|
The identifier of the target file search store where the file should be imported. |
|
|
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 |
|---|---|
|
|
Additional HTTP header name/value pairs to include in the request. |
|
|
Additional query string name/value pairs to append to the request URL. |
|
|
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 |
|---|---|
|
|
The content type of the request payload sent to the API (e.g. application/json). |
|
|
Additional HTTP header name/value pairs to include in the request. |
|
|
Additional query string name/value pairs to append to the request URL. |
|
|
The identifier of the file search store to which the file should be uploaded. |
|
|
The response format expected from the API (e.g. application/json). |
Options (1)
|
Option Name |
Description |
|---|---|
|
|
The binary content of the file to upload. |
Files
POST request file upload
/upload/v1beta/files
resumable upload request
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
The content type of the request payload sent to the API (e.g. application/json). |
|
|
Additional HTTP header name/value pairs to include in the request. |
|
|
Additional query string name/value pairs to append to the request URL. |
|
|
Specify the upload protocol, typically "resumable". |
|
|
Set the initial upload command, such as "start". |
|
|
Provide the total file size in bytes as a header for the upload session. |
|
|
Specify the MIME type of the file being uploaded. |
|
|
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 |
|---|---|
|
|
The content type of the request payload sent to the API (e.g. application/json). |
|
|
Additional HTTP header name/value pairs to include in the request. |
|
|
Additional query string name/value pairs to append to the request URL. |
|
|
The name or identifier of the model to use for prediction. |
|
|
The response format expected from the API (e.g. application/json). |
POST batch embeddings
/v1beta/models/{model}:batchEmbedContents
batch embeddings
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
The content type of the request payload sent to the API (e.g. application/json). |
|
|
Additional HTTP header name/value pairs to include in the request. |
|
|
Additional query string name/value pairs to append to the request URL. |
|
|
The name of the model to generate embeddings. |
|
|
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 |
|---|---|
|
|
The content type of the request payload sent to the API (e.g. application/json). |
|
|
Additional HTTP header name/value pairs to include in the request. |
|
|
Additional query string name/value pairs to append to the request URL. |
|
|
The unique identifier of the model to fetch. |
|
|
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 |
|---|---|
|
|
Additional HTTP header name/value pairs to include in the request. |
|
|
Additional query string name/value pairs to append to the request URL. |
|
|
Specify the maximum number of models to return per page for pagination. |
|
|
Provide a token from a previous response to retrieve the next page of models. |
|
|
Pass your API key as a header for authentication. |
|
|
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 |
|---|---|
|
|
The content type of the request payload sent to the API (e.g. application/json). |
|
|
Additional HTTP header name/value pairs to include in the request. |
|
|
Additional query string name/value pairs to append to the request URL. |
|
|
The name of the model to use for streaming content generation. |
|
|
Specify the response format, such as "json" or "media", to control the output structure. |
|
|
The response format expected from the API (e.g. application/json). |
POST generate embeddings
/v1beta/models/{model}:embedContent
generate embeddings
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
The content type of the request payload sent to the API (e.g. application/json). |
|
|
Additional HTTP header name/value pairs to include in the request. |
|
|
Additional query string name/value pairs to append to the request URL. |
|
|
The identifier of the model used for embedding. |
|
|
The response format expected from the API (e.g. application/json). |
Options (3)
|
Option Name |
Description |
|---|---|
|
|
The specific model version or variant to use for embedding, if different from the path parameter. |
|
|
Set the number of dimensions for the output embedding vector. |
|
|
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 |
|---|---|
|
|
The content type of the request payload sent to the API (e.g. application/json). |
|
|
Additional HTTP header name/value pairs to include in the request. |
|
|
Additional query string name/value pairs to append to the request URL. |
|
|
The name of the model whose tokenizer should be used for counting. |
|
|
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 |
|---|---|
|
|
The content type of the request payload sent to the API (e.g. application/json). |
|
|
Additional HTTP header name/value pairs to include in the request. |
|
|
Additional query string name/value pairs to append to the request URL. |
|
|
The name of the model to generate content. |
|
|
Provide your API key as a query parameter for authentication. |
|
|
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 |
|---|---|
|
|
The content type of the request payload sent to the API (e.g. application/json). |
|
|
Additional HTTP header name/value pairs to include in the request. |
|
|
Additional query string name/value pairs to append to the request URL. |
|
|
The response format expected from the API (e.g. application/json). |
Options (2)
|
Option Name |
Description |
|---|---|
|
|
Specify the name of the base model to start tuning from. |
|
|
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 |
|---|---|
|
|
Additional HTTP header name/value pairs to include in the request. |
|
|
Additional query string name/value pairs to append to the request URL. |
|
|
Set the maximum number of tuned models to return per page for pagination. |
|
|
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 |
|---|---|
|
|
Additional HTTP header name/value pairs to include in the request. |
|
|
Additional query string name/value pairs to append to the request URL. |
|
|
The unique identifier of the tuned model to delete. |
|
|
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 |
|---|---|
|
|
The content type of the request payload sent to the API (e.g. application/json). |
|
|
Additional HTTP header name/value pairs to include in the request. |
|
|
Additional query string name/value pairs to append to the request URL. |
|
|
The response format expected from the API (e.g. application/json). |