{"id":8694,"date":"2023-12-26T23:32:25","date_gmt":"2023-12-26T14:32:25","guid":{"rendered":"https:\/\/auto-worker.com\/blog\/?p=8694"},"modified":"2023-12-27T12:33:44","modified_gmt":"2023-12-27T03:33:44","slug":"post-8694","status":"publish","type":"post","link":"https:\/\/auto-worker.com\/blog\/?p=8694","title":{"rendered":"GAS\u3067Gemini API\u306e\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u5229\u7528\u65b9\u6cd5\uff01\u753b\u50cf\u3068\u30d7\u30ed\u30f3\u30d7\u30c8\u540c\u6642\u5165\u529b"},"content":{"rendered":"\n<p>2023\u5e7412\u670813\u65e5\u306b\u516c\u958b\u3055\u308c\u305fGemini API\u306b\u3088\u3063\u3066\u3001\u73fe\u6642\u70b9\u3067Gemini Pro\u306eAI\u30e2\u30c7\u30eb\u3092API\u7d4c\u7531\u3067\u5229\u7528\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p>Gemini API\u306f\u30c6\u30ad\u30b9\u30c8\u306e\u30d7\u30ed\u30f3\u30d7\u30c8\u5165\u529b\u306e\u307f\u306a\u3089\u305a\u3001\u753b\u50cf\u3082\u5165\u529b\u3067\u304d\u308b\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u3053\u3067Google Apps Script(GAS)\u3067Gemini API\u306e\u753b\u50cf\u3068\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u540c\u6642\u306b\u5165\u529b\u3059\u308b\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u3092\u5b9f\u884c\u3059\u308b\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u203b\u3059\u3050\u306bGemini API\u306e\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u3092\u5b9f\u884c\u53ef\u80fd\u306aGAS\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u4ed8\u304d\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Gemini API\u306f\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u5bfe\u5fdc<\/h2>\n\n\n\n<p>Google\u304c2023\u5e7412\u670813\u65e5\u306b\u63d0\u4f9b\u958b\u59cb\u3057\u305fGemini API\u306f\u3001Gemini Pro\u3092\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3084\u30ed\u30fc\u30b3\u30fc\u30c9\u3067\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>Gemini API\u3067\u306f\u30c6\u30ad\u30b9\u30c8\u306e\u30d7\u30ed\u30f3\u30d7\u30c8\u5165\u529b\u306b\u52a0\u3048\u3066\u3001\u753b\u50cf\u5165\u529b\u3082\u53ef\u80fd\u306a\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u5bfe\u5fdc\u3067\u3059\u3002<\/p>\n\n\n\n<p>Gemini API\u3067\u753b\u50cf\u3068\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u30bb\u30c3\u30c8\u3059\u308b\u3068\u3001Gemini Pro Vision\u306e\u30e2\u30c7\u30eb\u304c\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u5bfe\u5fdc\u306e\u5fdc\u7b54\u3092\u8fd4\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p>Gemini API\u306e\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u306b\u3088\u3063\u3066\u3001\u753b\u50cf\u306e\u8b58\u5225\u3092\u4f9d\u983c\u3057\u305f\u308a\u3001\u753b\u50cf\u306e\u4e00\u90e8\u5206\u306b\u30d5\u30a9\u30fc\u30ab\u30b9\u3057\u3066\u8cea\u554f\u306a\u3069\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p>Gemini API\u306e\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u3001AI\u3092\u6d3b\u7528\u3057\u305f\u69d8\u3005\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u53ef\u80fd\u6027\u304c\u5e83\u304c\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">GAS\u3067\u3082Gemini API\u306e\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u304c\u30ea\u30af\u30a8\u30b9\u30c8\u53ef\u80fd<\/h2>\n\n\n\n<p>Gemini API\u306e\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u6a5f\u80fd\u3092\u5229\u7528\u3059\u308b\u306b\u306f\u3001API\u30ea\u30af\u30a8\u30b9\u30c8\u3067\u753b\u50cf\u3092\u9001\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30c6\u30ad\u30b9\u30c8\u306e\u30d7\u30ed\u30f3\u30d7\u30c8\u306a\u3089\u7c21\u5358\u3067\u3059\u304c\u3001\u753b\u50cf\u30d5\u30a1\u30a4\u30eb\u3082API\u30ea\u30af\u30a8\u30b9\u30c8\u3067\u9001\u308b\u306e\u306f\u96e3\u6613\u5ea6\u304c\u9ad8\u304f\u611f\u3058\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3057\u304b\u3057\u3001\u5b9f\u969b\u306b\u306fGoogle Apps Script(GAS)\u3067\u3082Gemini API\u306e\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u6a5f\u80fd\u3092\u30ea\u30af\u30a8\u30b9\u30c8\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p>GAS\u3067Gemini\u306e\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u3092API\u5b9f\u884c\u3059\u308b\u306b\u306f\u3001API\u3067POST\u3059\u308b\u753b\u50cf\u8a2d\u5b9a\u304c\u3084\u3084\u8907\u96d1\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u3053\u3067\u3001GAS\u3067Gemini API\u306e\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u3092\u5b9f\u884c\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Gemini API\u306eAPI\u30ad\u30fc\u306e\u767a\u884c\u624b\u9806<\/h2>\n\n\n\n<p>Gemini API\u3092\u5229\u7528\u3059\u308b\u306b\u306f\u307e\u305aAPI\u30ad\u30fc\u3092\u7528\u610f\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>Google AI Studio\u306e\u5834\u5408\u3001Gemini API\u306eAPI\u30ad\u30fc\u306f\u7c21\u5358\u306b\u767a\u884c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u4e0b\u8a18\u306e\u8a18\u4e8b\u3067Gemini API\u306eAPI\u30ad\u30fc\u3092\u767a\u884c\u3059\u308b\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-autoworker-google-apps-script-gas-sikuli wp-block-embed-autoworker-google-apps-script-gas-sikuli\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"0f4dlapst0\"><a href=\"https:\/\/auto-worker.com\/blog\/?p=8667\">Gemini\u306eAPI\u30ad\u30fc\u306e\u767a\u884c\u65b9\u6cd5\u3092\u89e3\u8aac\uff01API\u30ad\u30fc\u306e\u518d\u53d6\u5f97\u30fb\u524a\u9664\u624b\u9806\u3082\u7d39\u4ecb<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Gemini\u306eAPI\u30ad\u30fc\u306e\u767a\u884c\u65b9\u6cd5\u3092\u89e3\u8aac\uff01API\u30ad\u30fc\u306e\u518d\u53d6\u5f97\u30fb\u524a\u9664\u624b\u9806\u3082\u7d39\u4ecb&#8221; &#8212; AutoWorker\u301cGoogle Apps Script(GAS)\u3068Sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580\" src=\"https:\/\/auto-worker.com\/blog\/?p=8667&#038;embed=true#?secret=n4cAgPzWZu#?secret=0f4dlapst0\" data-secret=\"0f4dlapst0\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>Google Apps Script(GAS)\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u306e\u306b\u3001Gemini API\u306eKey\u306f\u5fc5\u8981\u4e0d\u53ef\u6b20\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u4eca\u306fGemini API\u306fGoogle\u30a2\u30ab\u30a6\u30f3\u30c8\u304c\u3042\u308c\u3070\u30bf\u30c0\u3067\u4f7f\u3048\u307e\u3059\u306e\u3067\u3001\u307e\u305aAPI\u30ad\u30fc\u3092\u6e96\u5099\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p>\u203bVertex AI\u3067Gemini API\u3092\u5229\u7528\u3059\u308b\u5834\u5408\u3001GCP\u306e\u8a8d\u8a3c\u8a2d\u5b9a\u304c\u5fc5\u8981\u306b\u306a\u308a\u8907\u96d1\u306a\u306e\u3067\u3001Google AI Studio\u304c\u304a\u3059\u3059\u3081\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">GAS\u3067Gemini API\u306e\u30d7\u30ed\u30f3\u30d7\u30c8\u306e\u307f\u6295\u7a3f\u3059\u308b\u65b9\u6cd5<\/h2>\n\n\n\n<p>Google Apps Script(GAS)\u3067Gemini API\u306b\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u6295\u7a3f\u3059\u308b\u65b9\u6cd5\u306f\u3001\u524d\u56de\u306e\u8a18\u4e8b\u3067\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u4ed8\u304d\u3067\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-autoworker-google-apps-script-gas-sikuli wp-block-embed-autoworker-google-apps-script-gas-sikuli\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"lqe66eVpBH\"><a href=\"https:\/\/auto-worker.com\/blog\/?p=8679\">GAS\u3067Gemini API\u3092\u5b9f\u884c\u3059\u308b\u65b9\u6cd5\uff01\u4f1a\u8a71\u5c65\u6b74\u3092\u30ea\u30af\u30a8\u30b9\u30c8\u3057\u3066\u6587\u8108\u306b\u5fdc\u3058\u305f\u5fdc\u7b54\u3082\u3010\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u4ed8\u304d\u3011<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;GAS\u3067Gemini API\u3092\u5b9f\u884c\u3059\u308b\u65b9\u6cd5\uff01\u4f1a\u8a71\u5c65\u6b74\u3092\u30ea\u30af\u30a8\u30b9\u30c8\u3057\u3066\u6587\u8108\u306b\u5fdc\u3058\u305f\u5fdc\u7b54\u3082\u3010\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u4ed8\u304d\u3011&#8221; &#8212; AutoWorker\u301cGoogle Apps Script(GAS)\u3068Sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580\" src=\"https:\/\/auto-worker.com\/blog\/?p=8679&#038;embed=true#?secret=zIJl8IyGau#?secret=lqe66eVpBH\" data-secret=\"lqe66eVpBH\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\u5358\u4f53\u306e\u30d7\u30ed\u30f3\u30d7\u30c8\u3092Gemini API\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3059\u308b\u65b9\u6cd5\u304b\u3089\u3001\u904e\u53bb\u306e\u4f1a\u8a71\u5c65\u6b74\u3092\u542b\u3081\u3066API\u3092\u5b9f\u884c\u3057\u3066\u6587\u8108\u306b\u5fdc\u3058\u305fGemini Pro\u306e\u5fdc\u7b54\u3092\u5f97\u308b\u65b9\u6cd5\u307e\u3067\u8aac\u660e\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">GAS\u3067Gemini API\u306e\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u3092\u5b9f\u884c\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9<\/h2>\n\n\n\n<p>\u5b9f\u969b\u306bGoogle Apps Script(GAS)\u3067Gemini API\u306e\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u3092\u5b9f\u884c\u3059\u308b\u65b9\u6cd5\u3092\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u4f7f\u3063\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305aGAS\u306e\u65b0\u3057\u3044\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u958b\u304d\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u8a2d\u5b9a\u304b\u3089\u30b9\u30af\u30ea\u30d7\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u4e8b\u524d\u306b\u7528\u610f\u3057\u305fGemini API\u306eAPI\u30ad\u30fc\u3092\u30bb\u30c3\u30c8\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"420\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231225_auto_002.jpg\" alt=\"Gemini API\u3092\u30ea\u30af\u30a8\u30b9\u30c8\u3067\u304d\u308b\u3088\u3046\u30b9\u30af\u30ea\u30d7\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u8ffd\u52a0\u3067API\u30ad\u30fc\u3092\u5024\u306b\u30bb\u30c3\u30c8\u3057\u3066\u4fdd\u5b58\" class=\"wp-image-8681\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231225_auto_002.jpg 800w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231225_auto_002-300x158.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231225_auto_002-768x403.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231225_auto_002-530x278.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231225_auto_002-565x297.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231225_auto_002-710x373.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231225_auto_002-725x381.jpg 725w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>\u203b\u306e\u3061\u306e\u3061\u306eGemini API\u306e\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u5b9f\u884c\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3067\u547c\u3073\u51fa\u3059\u306e\u3067\u3001\u8a2d\u5b9a\u3057\u306a\u3044\u3068\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>GAS\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u30a8\u30c7\u30a3\u30bf\u306b\u4ee5\u4e0b\u306eGemini API\u306e\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u3092\u30ea\u30af\u30a8\u30b9\u30c8\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u8cbc\u308a\u4ed8\u3051\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-javascript\"><code class=\"language-javascript\">function getGeminiApiImage(prompt, image) {\n  \/\/\u30b9\u30af\u30ea\u30d7\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u304b\u3089API\u30ad\u30fc\u3092\u53d6\u5f97\n  const apiKey = PropertiesService.getScriptProperties().getProperty('APIKEY');\n  \/\/Gemini\u306eAPI\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8URL\u3092\u8a2d\u5b9a\n  const apiUrl = `https:\/\/generativelanguage.googleapis.com\/v1beta\/models\/gemini-pro-vision:generateContent?key=${apiKey}`;\n  \/\/\u30d7\u30ed\u30f3\u30d7\u30c8\u306b\u52a0\u3048\u3001Gemini API\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u5fc5\u8981\u306a\u30da\u30a4\u30ed\u30fc\u30c9\u3092\u8a2d\u5b9a\n  const payload = {\n    \"contents\": [{\n        \"parts\": [\n          {\"text\": prompt },\n          {\n            \"inlineData\": {\n              \"mimeType\": \"image\/jpeg\",\n              \"data\": Utilities.base64Encode(image.getBytes())\n            }\n          }\n        ]\n    }],\n  };\n  \/\/payload\u3084HTTP\u901a\u4fe1\u7a2e\u5225\u3001\u8a8d\u8a3c\u60c5\u5831\u3092option\u3067\u8a2d\u5b9a\n  const options = {\n    'payload': JSON.stringify(payload),\n    'method' : 'POST',\n    'muteHttpExceptions': true,\n    'contentType':'application\/json'\n  };\n  \/\/Gemini API\u306bAPI\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u308a\u3001\u7d50\u679c\u3092\u5909\u6570\u306b\u683c\u7d0d\n  const response = JSON.parse(UrlFetchApp.fetch(apiUrl, options).getContentText()); \n  return response.candidates[0].content.parts[0].text; \n}<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"589\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_001.jpg\" alt=\"Google Apps Script(GAS)\u3067Gemini API\u306e\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u3092\u5b9f\u884c\u3057\u3066\u30c6\u30ad\u30b9\u30c8\u30d7\u30ed\u30f3\u30d7\u30c8\u3068\u753b\u50cf\u3092\u5165\u529b\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\" class=\"wp-image-8695\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_001.jpg 1200w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_001-300x147.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_001-1024x503.jpg 1024w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_001-768x377.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_001-530x260.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_001-565x277.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_001-710x348.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_001-725x356.jpg 725w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/figure>\n\n\n\n<p>getGeminiApiImage\u306f\u30d7\u30ed\u30f3\u30d7\u30c8\u306e\u6587\u5b57\u5217\u3068blob\u5f62\u5f0f\u306e\u753b\u50cf\u3092\u5f15\u6570\u306b\u6307\u5b9a\u3059\u308b\u95a2\u6570\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305a\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u304b\u3089API\u30ad\u30fc\u3092\u53d6\u5f97\u3057\u305f\u3042\u3068\u3001\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u5165\u529b\u7528\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8URL\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30c6\u30ad\u30b9\u30c8\u30d7\u30ed\u30f3\u30d7\u30c8\u306e\u8a2d\u5b9a\u306f\u524d\u8ff0\u3057\u305f\u8a18\u4e8b\u3068\u540c\u69d8\u3067\u3059\u304c\u3001API\u30ea\u30af\u30a8\u30b9\u30c8\u306binlineData\u3068\u3057\u3066\u753b\u50cf\u3092\u30bb\u30c3\u30c8\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u753b\u50cf\u306b\u3064\u3044\u3066\u306fblob\u5f62\u5f0f\u3067\u306fGemini API\u306f\u30ea\u30af\u30a8\u30b9\u30c8\u3067\u304d\u306a\u3044\u305f\u3081\u3001getBytes()\u3067\u30d0\u30a4\u30c8\u5f62\u5f0f\u306b\u5909\u63db\u3057\u305f\u3082\u306e\u3092Base64\u3067\u30a8\u30f3\u30b3\u30fc\u30c9\u3057\u3066\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u306egetGeminiApiImage\u95a2\u6570\u306b\u30d7\u30ed\u30f3\u30d7\u30c8\u3068\u753b\u50cf\u3092\u5f15\u6570\u6307\u5b9a\u3057\u3066\u5b9f\u884c\u3059\u308c\u3070\u3001Gemini API\u306e\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u3092\u5b9f\u884c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u3053\u3067\u3001Google\u30c9\u30e9\u30a4\u30d6\u306b\u683c\u7d0d\u3057\u305f\u304a\u8089\u306e\u753b\u50cf\u30c7\u30fc\u30bf\u3092Gemini API\u306e\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u5165\u529b\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"382\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_002.jpg\" alt=\"Google Apps Script(GAS)\u3067Gemini API\u306e\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u5b9f\u884c\u3059\u308b\u305f\u3081\u3001Google\u30c9\u30e9\u30a4\u30d6\u306b\u683c\u7d0d\u3057\u305f\u753b\u50cf\u3092\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u5165\u529b\u7528\u306b\u5229\u7528\" class=\"wp-image-8696\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_002.jpg 800w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_002-300x143.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_002-768x367.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_002-530x253.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_002-565x270.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_002-710x339.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_002-725x346.jpg 725w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>\u753b\u50cf\u30d5\u30a1\u30a4\u30eb\u306e\u53f3\u4e0a\u306b\u300c\u2026\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001\u300c\u5171\u6709\uff1e\u30ea\u30f3\u30af\u3092\u30b3\u30d4\u30fc\u300d\u3057\u3066URL\u306b\u3042\u308b\u30d5\u30a1\u30a4\u30ebID\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"412\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_003.jpg\" alt=\"Google\u30c9\u30e9\u30a4\u30d6\u306b\u683c\u7d0d\u3057\u305f\u753b\u50cf\u3092Google Apps Script(GAS)\u3067\u8aad\u307f\u8fbc\u3080\u305f\u3081\u3001\u30d5\u30a1\u30a4\u30ebID\u3092URL\u304b\u3089\u53d6\u5f97\" class=\"wp-image-8697\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_003.jpg 800w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_003-300x155.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_003-768x396.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_003-530x273.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_003-565x291.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_003-710x366.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_003-725x373.jpg 725w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>\u53d6\u5f97\u3057\u305f\u30d5\u30a1\u30a4\u30ebID\u304b\u3089Google\u30c9\u30e9\u30a4\u30d6\u306e\u753b\u50cf\u3092\u8aad\u307f\u8fbc\u307f\u3001getGeminiApiImage\u95a2\u6570\u3092\u5b9f\u884c\u3059\u308brunGemini\u95a2\u6570\u3092\u7528\u610f\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-javascript\"><code class=\"language-javascript\">function runGemini(){\n  const image = DriveApp.getFileById(\"\u753b\u50cfID\").getBlob();\n  console.log(getGeminiApiImage(\"\u3053\u306e\u753b\u50cf\u306f\u4f55\u3067\u3059\u304b?\",image));\n}<\/code><\/pre>\n\n\n\n<p><strong>\u203b\u753b\u50cfID\u306e\u90e8\u5206\u3092Google\u30c9\u30e9\u30a4\u30d6\u306e\u753b\u50cf\u306e\u30ea\u30f3\u30af\u306b\u66f8\u304b\u308c\u305fID\u306b\u66f8\u304d\u63db\u3048\u307e\u3059<\/strong>\u3002<\/p>\n\n\n\n<p>runGemini\u95a2\u6570\u3092GAS\u30b9\u30af\u30ea\u30d7\u30c8\u30a8\u30c7\u30a3\u30bf\u304b\u3089\u5b9f\u884c\u3059\u308b\u3068\u3001Gemini API\u306e\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u5165\u529b\u3057\u305f\u7d50\u679c\u304c\u5b9f\u884c\u30ed\u30b0\u306b\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"622\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_004.jpg\" alt=\"Google Apps Script(GAS)\u3067\u753b\u50cf\u304c\u4f55\u304b\u8cea\u554f\u3059\u308b\u30d7\u30ed\u30f3\u30d7\u30c8\u3068\u753b\u50cf\u3092Gemini API\u3067\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u5165\u529b\u3057\u305f\u5b9f\u884c\u7d50\u679c\" class=\"wp-image-8698\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_004.jpg 1200w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_004-300x156.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_004-1024x531.jpg 1024w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_004-768x398.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_004-530x275.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_004-565x293.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_004-710x368.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_004-725x376.jpg 725w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/figure>\n\n\n\n<p>Gemini API\u304b\u3089\u547c\u3073\u51fa\u3057\u305fGemini Pro\u306f\u753b\u50cf\u3092\u8a8d\u8b58\u3057\u3066\u4f55\u306e\u8089\u304b\u56de\u7b54\u3057\u3066\u304f\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306b\u4e0a\u8a18\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u4f7f\u3048\u3070\u3001GAS\u3092\u4f7f\u3063\u3066Gemini API\u306e\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u5b9f\u884c\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">GAS\u00d7Gemini API\u306e\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u306f\u8272\u3005\u6d3b\u7528\u53ef\u80fd<\/h2>\n\n\n\n<p>\u306a\u304aGoogle Apps Script(GAS)\u3068Gemini API\u306e\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u306f\u8272\u3005\u306a\u6d3b\u7528\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u5148\u307b\u3069\u306e\u304a\u8089\u306e\u753b\u50cf\u306b\u3064\u3044\u3066\u3082\u4e0b\u8a18\u306e\u3088\u3046\u306b\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u5909\u66f4\u3059\u308c\u3070\u3001\u8089\u306e\u304a\u3044\u3057\u3055\u3092\u5224\u5b9a\u3059\u308bAI\u3092\u4f5c\u6210\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-javascript\"><code class=\"language-javascript\">function runGemini(){\n  const image = DriveApp.getFileById(\"\u753b\u50cfID\").getBlob();\n  console.log(getGeminiApiImage(\"\u3053\u306e\u725b\u8089\u306e\u304a\u3044\u3057\u305d\u3046\u304b0~100\u70b9\u3067\u5224\u5b9a\u3057\u3066\u4e0b\u3055\u3044\u3002\u5224\u5b9a\u7406\u7531\u3082\u8aac\u660e\u3092\u304a\u9858\u3044\u3057\u307e\u3059\",image));\n}<\/code><\/pre>\n\n\n\n<p>\u5b9f\u969b\u306bGAS\u3092\u5b9f\u884c\u3057\u3066\u307f\u308b\u3068\u3001Gemini API\u304b\u3089\u304a\u8089\u306e\u304a\u3044\u3057\u3055\u3092\u5224\u5b9a\u3057\u305f\u70b9\u6570\u3068\u305d\u306e\u7406\u7531\u306e\u5fdc\u7b54\u304c\u8fd4\u3063\u3066\u304d\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"611\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_005.jpg\" alt=\"Google Apps Script(GAS)\u3067Gemini API\u306e\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u306f\u304a\u8089\u306e\u753b\u50cf\u3092\u9001\u3063\u3066\u304a\u3044\u3057\u3055\u3092\u5224\u5b9a\u3059\u308b\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u30bb\u30c3\u30c8\u3059\u308c\u3070\u3001Gemini Pro\u304c\u304a\u8089\u3092\u5224\u5b9a\u3057\u3066\u304f\u308c\u308b\u6d3b\u7528\u304c\u53ef\u80fd\" class=\"wp-image-8699\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_005.jpg 1200w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_005-300x153.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_005-1024x521.jpg 1024w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_005-768x391.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_005-530x270.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_005-565x288.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_005-710x362.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_005-725x369.jpg 725w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/figure>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306bGemini Pro\u3092\u753b\u50cf\u3092\u8a55\u4fa1\u30fb\u5224\u5b9a\u3057\u3066\u3082\u3089\u3046AI\u30b5\u30fc\u30d3\u30b9\u3092GAS\u3067\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3055\u3089\u306bGemini API\u3067\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u5165\u529b\u3057\u305f\u753b\u50cf\u3092OCR\u3057\u305f\u3044\u5834\u5408\u3082\u3001\u82f1\u8a9e\u90e8\u5206\u306a\u3069\u6307\u5b9a\u7b87\u6240\u306e\u307f\u7ffb\u8a33\u3057\u305f\u7d50\u679c\u3092\u8fd4\u3059\u6d3b\u7528\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"443\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_006.jpg\" alt=\"Gemini API\u306e\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u306f\u3001\u5199\u771f\u306b\u5199\u3063\u305f\u82f1\u8a9e\u90e8\u5206\u306e\u307f\u3092OCR\u3057\u3066\u7ffb\u8a33\u4f9d\u983c\u306a\u3069\u53ef\u80fd\" class=\"wp-image-8700\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_006.jpg 800w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_006-300x166.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_006-768x425.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_006-530x293.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_006-565x313.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_006-710x393.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_006-725x401.jpg 725w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>\u30dd\u30c6\u30c8\u30c1\u30c3\u30d7\u30b9\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u64ae\u5f71\u3057\u305f\u5199\u771f\u3092GAS\u3067Gemini API\u306b\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u5b9f\u884c\u3059\u308b\u3068\u3001\u82f1\u8a9e\u90e8\u5206\u306e\u307fOCR\u3057\u3066\u7ffb\u8a33\u3057\u305f\u7d50\u679c\u304cGemini Pro\u3088\u308a\u5f97\u3089\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-javascript\"><code class=\"language-javascript\">function runGemini(){\n  const image = DriveApp.getFileById(\"\u753b\u50cfID\").getBlob();\n  console.log(getGeminiApiImage(\"\u5199\u771f\u306b\u5199\u3063\u305f\u82f1\u6587\u306e\u307f\u3092\u8aad\u307f\u53d6\u3063\u3066\u65e5\u672c\u8a9e\u306b\u7ffb\u8a33\u3057\u3066\u4e0b\u3055\u3044\u3002\",image));\n}<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"628\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_007.jpg\" alt=\"Google Apps Script(GAS)\u3067\u30d1\u30c3\u30b1\u30fc\u30b8\u5199\u771f\u3067\u82f1\u8a9e\u90e8\u5206\u306e\u307f\u3092OCR\u3057\u3066\u7ffb\u8a33\u3059\u308b\u3088\u3046Gemini API\u306b\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u5165\u529b\u3057\u305f\u5b9f\u884c\u7d50\u679c\" class=\"wp-image-8701\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_007.jpg 1200w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_007-300x157.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_007-1024x536.jpg 1024w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_007-768x402.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_007-530x277.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_007-565x296.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_007-710x372.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_007-725x379.jpg 725w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/figure>\n\n\n\n<p>Gemini API\u306e\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u5165\u529b\u3092GAS\u3067\u8a66\u305b\u308b\u3088\u3046\u306b\u306a\u308c\u3070\u3001\u751f\u6210AI\u306e\u6d3b\u7528\u306e\u5e45\u304c\u5e83\u304c\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Gemini API\u306e\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u5b9f\u884c\u6642\u306e\u6ce8\u610f\u70b9<\/h2>\n\n\n\n<p>\u306a\u304a\u3001Gemini API\u306e\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u3092\u5b9f\u884c\u3059\u308b\u969b\u306b\u306f1\u3064\u6ce8\u610f\u70b9\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>Gemini API\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3067\u304d\u308b\u5bb9\u91cf\u306f4.0MB\u304c\u4e0a\u9650\u3068\u306a\u3063\u3066\u3044\u308b\u70b9\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u306e\u305f\u3081\u3001\u9ad8\u89e3\u50cf\u5ea6\u306e\u753b\u50cf\u3092Google Apps Script(GAS)\u306a\u3069\u3067Gemini API\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3059\u308b\u3068\u30a8\u30e9\u30fc\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"291\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_008.jpg\" alt=\"Gemini API\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3067\u304d\u308b\u5bb9\u91cf\u306f4.0MB\u307e\u3067\u306e\u305f\u3081\u3001\u5927\u304d\u3044\u753b\u50cf\u3092\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u5165\u529b\u3059\u308b\u3068\u30a8\u30e9\u30fc\u304c\u767a\u751f\" class=\"wp-image-8702\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_008.jpg 800w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_008-300x109.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_008-768x279.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_008-530x193.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_008-565x206.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_008-710x258.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2023\/12\/20231226_auto_008-725x264.jpg 725w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>\u203bGemini API\u306e\u5bb9\u91cf\u4e0a\u9650\u306fAPI\u81ea\u4f53\u306e\u4ed5\u69d8\u306e\u305f\u3081\u3001Python\u3084Go\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3067\u3082\u767a\u751f\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u306e\u305f\u3081\u3001Gemini API\u306b\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u5165\u529b\u3059\u308b\u969b\u306f\u5bb9\u91cf\u306e\u5927\u304d\u3044\u753b\u50cf\u306f\u7528\u3044\u306a\u3044\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p>Gemini API\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3059\u308b\u524d\u306b\u5bb9\u91cf\u78ba\u8a8d\u3057\u3066\u51e6\u7406\u3092\u4e2d\u65ad\u3059\u308b\u304b\u3001\u30b5\u30a4\u30ba\u3092\u7e2e\u5c0f\u3059\u308b\u51e6\u7406\u3092\u8ffd\u52a0\u3059\u308b\u306e\u304c\u30aa\u30b9\u30b9\u30e1\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081\u30fb\u7d42\u308f\u308a\u306b<\/h2>\n\n\n\n<p>\u4eca\u56de\u3001Gemini API\u306e\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u5b9f\u884c\u3092Google Apps Script(GAS)\u3067\u8a66\u3059\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>GAS\u3067\u3082\u7528\u610f\u3057\u305f\u753b\u50cf\u3092blob\u5f62\u5f0f\u304b\u3089Base64\u306b\u30a8\u30f3\u30b3\u30fc\u30c9\u3059\u308c\u3070\u3001Gemini API\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p>Gemini API\u306b\u30d7\u30ed\u30f3\u30d7\u30c8\u3068\u753b\u50cf\u3092\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u5165\u529b\u3057\u3066\u5b9f\u884c\u3059\u308bGAS\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u4f7f\u3063\u3066\u4ed5\u7d44\u307f\u3092\u89e3\u8aac\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>Gemini API\u306e\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u306f\u753b\u50cf\u306e\u8b58\u5225\u3060\u3051\u3067\u306a\u304f\u3001\u5224\u5b9a\u3084\u7279\u5b9a\u90e8\u5206\u306e\u307f\u306eOCR\u306a\u3069\u8272\u3005\u306a\u6d3b\u7528\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305c\u3072\u4eca\u56de\u7d39\u4ecb\u3057\u305fGAS\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u30d9\u30fc\u30b9\u306b\u3001Gemini API\u306e\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u3092\u6d3b\u7528\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>2023\u5e7412\u670813\u65e5\u306b\u516c\u958b\u3055\u308c\u305fGemini API\u306b\u3088\u3063\u3066\u3001\u73fe\u6642\u70b9\u3067Gemini Pro\u306eAI\u30e2\u30c7\u30eb\u3092API\u7d4c\u7531\u3067\u5229\u7528\u53ef\u80fd\u3067\u3059\u3002 Gemini API\u306f\u30c6\u30ad\u30b9\u30c8\u306e\u30d7\u30ed\u30f3\u30d7\u30c8\u5165\u529b\u306e\u307f\u306a\u3089\u305a\u3001\u753b\u50cf\u3082\u5165\u529b\u3067\u304d\u308b\u30de\u30eb\u30c1\u30e2\u30fc\u30c0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":8699,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,2],"tags":[14,1341,1213,348],"class_list":["post-8694","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-api","category-gas","tag-gas","tag-gemini-api","tag-1213","tag-348"],"_links":{"self":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/8694","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8694"}],"version-history":[{"count":3,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/8694\/revisions"}],"predecessor-version":[{"id":8706,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/8694\/revisions\/8706"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/8699"}],"wp:attachment":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8694"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8694"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8694"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}