curl “https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent”
-H ‘Content-Type: application/json’
-H ‘X-goog-api-key: GEMINI_API_KEY’
-X POST
-d ‘{
“contents”: [
{
“parts”: [
{
“text”: “Explain how AI works in a few words”
}
]
}
]
}’
![Gemini_Generated_Image_ua9o22ua9o22ua9o|690x460]
2 Likes
Welcome to the Forum,
To help us understand your issues: is the command failing to execute or are you getting an unexpected response?
Thank you!