{ "contents": [ { "parts": [ { "text": "把图片里小狗的毛色改成金黄色" }, { "inline_data": { "mime_type": "image/png", "data": open(TEMP_B64).read().strip() # 读入 base64 } } ] } ] }
curl --location --globoff '/v1beta/models/:generateContent?key={YOUR_API_KEY}' \ --header 'Content-Type: application/json' \ --data '{ "contents": [ { "parts": [ { "text": "把图片里小狗的毛色改成金黄色" }, { "inline_data": { "mime_type": "image/png", "data": open(TEMP_B64).read().strip() # 读入 base64 } } ] } ] }'
{}