In AI Studio’s UI adds a hidden system prompt and context wrappers to structure the responses like the formatting content as JSON with title, description and keywords.
In the REST API for example the generateContent endpoint only processes what you explicitly include in the prompt.
So unless we instruct the model to return structured fields, the default will be used.
Now, how to replicate it?
Json
{
"contents": [
{
"role":"user",
"parts": [
{
"text": "Type your prompts and ask for a JSON structured format"
}
]
}
]
}