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": [ {

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]

Hi @MD.Shahidul_Alam_Lit,

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!

curl “https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent?key=YOUR_API_KEY
-H “Content-Type: application/json”
-d ‘{
“contents”: [{
“parts”: [{“text”: “Hello Gemini”}]
}]
}’