Generates multiple embeddings from the model given input text in a synchronous call.
HTTP request
POST https://generativelanguage.googleapis.com/v1beta3/{model=models/*}:batchEmbedText
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
model |
Required. The name of the |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "texts": [ string ] } |
Fields | |
---|---|
texts[] |
Required. The free-form input texts that the model will turn into an embedding. The current limit is 100 texts, over which an error will be thrown. |
Response body
The response to a EmbedTextRequest.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"embeddings": [
{
object ( |
Fields | |
---|---|
embeddings[] |
Output only. The embeddings generated from the input text. |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/generative-language
For more information, see the Authentication Overview.