Why does API not follow JSON standards?

for

responseSchema

“type”:[“string”,“null”]

results in a 400 error when providing a array of possible types is standard for any non required fields

returned error:

“Invalid JSON payload received”

“Proto field is not repeating, cannot start list.”

note this works:

“type”:“string”

Hi @limes,

Sorry for the late response !
Could you please let us know which Gemini model you are using ?

gemini-1.5-flash, have not tried on newer versions

Hi @limes ,

Could you please try with the Gemini latest model and let us know if the issue persists?

@Mrinal_Ghosh
still getting

Invalid JSON payload received. Unknown name \"type\" at 'generation_config.response_schema.properties[0].value': Proto field is not repeating, cannot start list.\nInvalid JSON payload received. Unknown name \"type\" at 'generation_config.response_schema.properties[1].value': Proto field is not repeating, cannot start list.

on

gemini-2.5-flash

Note this is a issue since I am using Newtonsoft Json to make the schemas

Hi @limes ,

Could you please share the code snippet with us? So that we can reproduce the issue from our end.

@Mrinal_Ghosh

its in C# but here is the REST request

{
"contents":[{"role":"user","parts":[{"text":"what is a egg"}]}],
"generationConfig":{"temperature":1.0,"topK":40,"topP":0.95,"maxOutputTokens":8192,"responseMimeType":"application/json",
"responseSchema":{"type":"object","properties":{"though":{"type":["string","null"]},"dialog":{"type":["string","null"]}}}}
}

Hey guy, I never thought I’d ever reply in here, but strangest thing yesterday I was working on simple API database and I just trusted the AI and it build a pretty brutal API manager, I never paid it any mind since I just stopped it have way through. But why is it so curious about eggs?

setup.py
api_manager.egg-info/PKG-INFO
api_manager.egg-info/SOURCES.txt
api_manager.egg-info/dependency_links.txt
api_manager.egg-info/entry_points.txt
api_manager.egg-info/requires.txt
api_manager.egg-info/top_level.txt

This was the SOURCES.txt, that’s really all there was to it, the code was pretty basic, my project had nothing to do with eggs.