Generate structured JSON output using Gemini models
Official documentation: https://ai.google.dev/gemini-api/docs/structured-outputGenerate structured, schema-compliant JSON output using Google Gemini models. This feature ensures the model’s response follows a specific JSON schema you define.
role (string): Role (user or model)parts (array): Content parts arraytemperature (number): Sampling temperaturetopP (number): Nucleus sampling parameterresponseMimeType (string): Set to “application/json” for JSON outputresponseSchema (object): JSON schema defining the expected output structure