Image metadata enrichment use case
In the image metadata enrichment use case, the LLM ingests a text containing either a base64-encoded image or a public HTTP/HTTPS or Google Cloud Storage (gs://) image link and routes the image to a multimodal model. A JSON response is returned that contains an imageMetadata dictionary with a list of keywords, subcategories, and keyword synonyms.
The POST request obtains and indexes prediction information related to the specified use case, and returns a unique predictionId and status of the request. The predictionId can be used later in the GET request to retrieve the results.
Headers
Bearer token used for authentication. Format: Authorization: Bearer ACCESS_TOKEN.
application/json
"application/json"
Path Parameters
Unique identifier for the model. Must be a multimodal model capable of processing images, such as gemini-2.5-flash-lite.
Body
An array of request items. Each item must contain exactly one of text, image, or imageLink.
Optional object to control metadata generation. The image must be provided in the batch item as useCaseConfig only tunes the output.
Provides fields and values that specify ranges for tokens. Fields used for specific use cases and models are specified. The default values are used if other values are not specified.
Response
OK
This is the response to the POST prediction request submitted for a specific useCase and modelId.
The universal unique identifier (UUID) returned in the POST request. This UUID is required in the GET request to retrieve results.
The current status of the prediction. Allowed values are:
-
SUBMITTED - The POST request was successful and the response has returned the
predictionIdandstatusthat is used by the GET request. -
ERROR - An error was generated when the GET request was sent.
-
READY - The results associated with the
predictionIdare available and ready to be retrieved. -
RETRIEVED - The results associated with the
predictionIdare returned successfully when the GET request was sent.
"SUBMITTED"