{
"tools": [
{
"code_execution": {}
}
],
"contents": {
"parts": {
"text": "What is the sum of the first 50 prime numbers? Generate and run code for the calculation, and make sure you get all 50."
}
},
}curl --location --request POST 'v1beta/models/gemini-3-flash-preview:generateContent' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"tools": [
{
"code_execution": {}
}
],
"contents": {
"parts": {
"text": "What is the sum of the first 50 prime numbers? Generate and run code for the calculation, and make sure you get all 50."
}
},
}'{}