Gemini Batch API doesn't return the user metadata back (original) (raw)

December 17, 2025, 8:58am 1

I’m using Gemin Batch API, with InlinedRequests (https://ai.google.dev/api/batch-api#InlinedRequest):

{
  metadata: {key: "my-key"},
  contents: [{parts: [{text: "..."}], role: 'user'}],
  config: {tools: [{googleSearch: {}}]},
}

When I get back the InlinedResponses (https://ai.google.dev/api/batch-api#InlinedResponse), they don’t contain the metadata field.