Structured output
POST
/v1beta/models/gemini-2.5-pro:generateContent
- Use JSON Schema to constrain the model's structured output
- Define the format via
generationConfig.responseMimeTypeandresponseSchema - Suitable for extraction, classification, list generation, and other scenarios
- Official docs: Structured output
Authorizations
bearer
Type
HTTP (bearer)
Request Body
application/json
contents
object[]
Required
generationConfig
object
Required
Generation configuration
Expand
Responses
Success
application/json
object