{"id":839,"date":"2025-11-13T11:07:21","date_gmt":"2025-11-13T02:07:21","guid":{"rendered":"https:\/\/biz.moneyforward.com\/ai\/basic\/?p=839"},"modified":"2026-03-18T16:11:58","modified_gmt":"2026-03-18T07:11:58","slug":"gemini-api%e3%81%ae%e4%bd%bf%e3%81%84%e5%a7%8b%e3%82%81%e6%96%b9%e3%81%a8%e3%81%af%ef%bc%9f%e6%96%99%e9%87%91%e3%80%81%e7%84%a1%e6%96%99%e6%9e%a0%e3%80%81python%e3%81%a7%e3%81%ae%e4%bd%bf%e3%81%84","status":"publish","type":"post","link":"https:\/\/biz.moneyforward.com\/ai\/basic\/839\/","title":{"rendered":"Gemini API\u306e\u4f7f\u3044\u59cb\u3081\u65b9\u3068\u306f\uff1f\u6599\u91d1\u3001\u7121\u6599\u67a0\u3001Python\u3067\u306e\u4f7f\u3044\u65b9\u307e\u3067\u89e3\u8aac"},"content":{"rendered":"<p>Gemini API\u306f\u3001\u81ea\u793e\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3084\u30b5\u30fc\u30d3\u30b9\u306bGoogle\u306e\u9ad8\u6027\u80fdAI\u300cGemini\u300d\u3092\u7d44\u307f\u8fbc\u3080\u305f\u3081\u306e\u3001\u958b\u767a\u8005\u5411\u3051\u30c4\u30fc\u30eb\u3067\u3059\u3002\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u30aa\u30ea\u30b8\u30ca\u30eb\u306eAI\u30c1\u30e3\u30c3\u30c8\u30dc\u30c3\u30c8\u3092\u958b\u767a\u3057\u305f\u308a\u3001\u65e2\u5b58\u306e\u696d\u52d9\u30b7\u30b9\u30c6\u30e0\u3092AI\u3067\u9ad8\u5ea6\u5316\u3057\u305f\u308a\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001Gemini API\u3067\u3067\u304d\u308b\u3053\u3068\u304b\u3089\u3001\u6c17\u306b\u306a\u308b\u6599\u91d1\u4f53\u7cfb\u3001\u7121\u6599\u3067\u4f7f\u3048\u308b\u7bc4\u56f2\u3001\u305d\u3057\u3066API\u30ad\u30fc\u3092\u53d6\u5f97\u3057\u3066Python\u3067\u4f7f\u3044\u59cb\u3081\u308b\u57fa\u672c\u7684\u306a\u624b\u9806\u307e\u3067\u3092\u3001\u5c02\u9580\u5bb6\u3067\u306a\u3044\u65b9\u306b\u3082\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n    <div class=\"advads-templates-box\">\n        <a class=\"advads-templates-box-link\" data-impression-and-click-trigger=\"templatesbox\" href=\"https:\/\/biz.moneyforward.com\/accounting\/topics\/15728\/?provider=ai_basic&provider_info=cv.839.part.templates-box\" target=\"_blank\" rel=\"noopener\">\n            <div class=\"advads-templates-box-inner\">\n                <div class=\"advads-templates-box-images\">\n                    <div class=\"advads-templates-box-img-wrap\"><div class=\"advads-templates-box-img\"><img decoding=\"async\" src=\"https:\/\/biz.moneyforward.com\/wp-content\/uploads\/2026\/02\/minibook_ai_839.png\" alt=\"\" width=\"200\" height=\"auto\"><\/div><p><\/p><\/div>\n                <\/div>\n                <div class=\"advads-templates-box-desc\">\n                    <p class=\"advads-templates-box-title\" data-impression-and-click-trigger-link-text>Gemini API \u5229\u7528\u958b\u59cb\u306e\u305f\u3081\u306e\u30c1\u30a7\u30c3\u30af\u30ea\u30b9\u30c8<\/p>\n                    <p class=\"advads-templates-box-text\">Gemini API \u5229\u7528\u958b\u59cb\u306e\u305f\u3081\u306e\u30c1\u30a7\u30c3\u30af\u30ea\u30b9\u30c8\u3092\u7121\u6599\u3067\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002\u305c\u3072\u3054\u81ea\u7531\u306b\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u6d3b\u7528\u304f\u3060\u3055\u3044\u3002<\/p>\n                    <span class=\"advads-button-primary\">\u7121\u6599\u3067\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b<\/span>\n                <\/div>\n            <\/div>\n        <\/a>\n    <\/div>\n<div id=\"post-below-intro\"><\/div><h2>\u305d\u3082\u305d\u3082Gemini API\u3068\u306f\u4f55\u304b\uff1f<\/h2>\n<p><span style=\"background-color: #ffff99;\"><b>Gemini API\u3068\u306f\u3001Google\u304c\u63d0\u4f9b\u3059\u308b\u751f\u6210AI\u30e2\u30c7\u30eb\u300cGemini\u300d\u30d5\u30a1\u30df\u30ea\u30fc\uff08Gemini 2.5 Pro\u306a\u3069\uff09\u3092\u3001\u81ea\u8eab\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3084\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304b\u3089\u547c\u3073\u51fa\u3057\u3066\u5229\u7528\u3059\u308b\u305f\u3081\u306e\u3001\u516c\u5f0f\u306a\u63a5\u7d9a\u53e3\uff08\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\uff09\u306e\u3053\u3068\u3067\u3059\u3002<\/b><\/span><\/p>\n<p>\u901a\u5e38\u3001\u79c1\u305f\u3061\u306fWeb\u30d6\u30e9\u30a6\u30b6\u3067\u63d0\u4f9b\u3055\u308c\u308b\u30c1\u30e3\u30c3\u30c8\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u901a\u3058\u3066AI\u3068\u5bfe\u8a71\u3057\u307e\u3059\u304c\u3001API\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u3001AI\u306e\u982d\u8133\u90e8\u5206\u3060\u3051\u3092\u501f\u308a\u3066\u304d\u3066\u3001\u81ea\u793e\u72ec\u81ea\u306e\u30b5\u30fc\u30d3\u30b9\u3068\u3057\u3066\u63d0\u4f9b\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u81ea\u793e\u306eWeb\u30b5\u30a4\u30c8\u306b\u8a2d\u7f6e\u3059\u308b\u554f\u3044\u5408\u308f\u305b\u5bfe\u5fdc\u30c1\u30e3\u30c3\u30c8\u30dc\u30c3\u30c8\u306e\u88cf\u5074\u3067\u3001Gemini API\u3092\u52d5\u304b\u3059\u3068\u3044\u3063\u305f\u4f7f\u3044\u65b9\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>Gemini API\u3067\u4f55\u304c\u3067\u304d\u308b\u304b\uff1f<\/h2>\n<p><span style=\"background-color: #ffff99;\"><b>Gemini API\u3092\u5c0e\u5165\u3059\u308b\u3053\u3068\u3067\u3001Gemini\u306e\u6301\u3064\u9ad8\u5ea6\u306a\u6a5f\u80fd\u3092\u81ea\u793e\u306e\u30b5\u30fc\u30d3\u30b9\u306b\u7d71\u5408\u3067\u304d\u307e\u3059\u3002<\/b><\/span>\u30a2\u30a4\u30c7\u30a2\u6b21\u7b2c\u3067\u3001\u69d8\u3005\u306a\u696d\u52d9\u306e\u81ea\u52d5\u5316\u3084\u65b0\u3057\u3044\u30b5\u30fc\u30d3\u30b9\u306e\u5275\u51fa\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<div class=\"summary-box\">\n<ul class=\"summary-box__list summary-box__list\">\n<li><strong>\u30ab\u30b9\u30bf\u30e0AI\u30c1\u30e3\u30c3\u30c8\u30dc\u30c3\u30c8\u306e\u958b\u767a<\/strong>\uff1a \u81ea\u793e\u306e\u5546\u54c1\u60c5\u5831\u3084\u696d\u52d9\u30de\u30cb\u30e5\u30a2\u30eb\u3092\u5b66\u7fd2\u3055\u305b\u305f\u3001\u5c02\u9580\u7684\u306a\u554f\u3044\u5408\u308f\u305b\u306b\u5bfe\u5fdc\u3067\u304d\u308b\u30c1\u30e3\u30c3\u30c8\u30dc\u30c3\u30c8\u3092\u958b\u767a\u3067\u304d\u307e\u3059\u3002<\/li>\n<li><strong>\u696d\u52d9\u306e\u81ea\u52d5\u5316<\/strong>\uff1a \u53d7\u3051\u53d6\u3063\u305f\u30e1\u30fc\u30eb\u306e\u5185\u5bb9\u3092API\u3067\u89e3\u6790\u3057\u3001\u8981\u7d04\u3057\u3066\u62c5\u5f53\u8005\u306b\u901a\u77e5\u3057\u305f\u308a\u3001\u8fd4\u4fe1\u6587\u306e\u4e0b\u66f8\u304d\u3092\u81ea\u52d5\u4f5c\u6210\u3057\u305f\u308a\u3059\u308b\u30b7\u30b9\u30c6\u30e0\u3092\u69cb\u7bc9\u3067\u304d\u307e\u3059\u3002<\/li>\n<li><strong>\u30b3\u30f3\u30c6\u30f3\u30c4\u751f\u6210\u306e\u52b9\u7387\u5316<\/strong>\uff1a \u30d6\u30ed\u30b0\u8a18\u4e8b\u3084SNS\u6295\u7a3f\u306e\u6848\u3092\u3001\u30ad\u30fc\u30ef\u30fc\u30c9\u3092\u57fa\u306bAPI\u7d4c\u7531\u3067\u5927\u91cf\u306b\u751f\u6210\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/li>\n<li><strong>\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u6a5f\u80fd\u306e\u6d3b\u7528<\/strong>\uff1a \u753b\u50cf\u3084\u52d5\u753b\u3001\u97f3\u58f0\u30c7\u30fc\u30bf\u3092API\u306b\u9001\u4fe1\u3057\u3001\u305d\u306e\u5185\u5bb9\u3092\u6587\u5b57\u3067\u66f8\u304d\u8d77\u3053\u3057\u305f\u308a\u3001\u8981\u7d04\u3055\u305b\u305f\u308a\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002<\/li>\n<\/ul>\n<\/div>\n<h2>Gemini API\u306e\u6599\u91d1\u4f53\u7cfb\u3068\u7121\u6599\u67a0\u306f\uff1f<\/h2>\n<p><span style=\"background-color: #ffff99;\"><b>Gemini API\u306e\u6599\u91d1\u306f\u3001AI\u304c\u51e6\u7406\u3057\u305f\u30c7\u30fc\u30bf\u91cf\uff08\u30c8\u30fc\u30af\u30f3\u6570\uff09\u306b\u5fdc\u3058\u305f\u5f93\u91cf\u8ab2\u91d1\u5236\u3067\u3059\u3002<\/b><\/span>\u305f\u3060\u3057\u3001\u958b\u767a\u8005\u304c\u6c17\u8efd\u306b\u8a66\u305b\u308b\u3088\u3046\u306b\u3001\u4e00\u5b9a\u306e\u5229\u7528\u91cf\u307e\u3067\u7121\u6599\u3067\u4f7f\u3048\u308b\u300cFree Tier\uff08\u7121\u6599\u67a0\uff09\u300d\u304c\u8a2d\u3051\u3089\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>\u6599\u91d1\u306e\u4ed5\u7d44\u307f<\/h3>\n<p><span style=\"background-color: #ffff99;\"><b>\u6599\u91d1\u306f\u3001AI\u3078\u306e\u5165\u529b\u30c7\u30fc\u30bf\uff08\u30a4\u30f3\u30d7\u30c3\u30c8\uff09\u3068\u3001AI\u304b\u3089\u306e\u51fa\u529b\u30c7\u30fc\u30bf\uff08\u30a2\u30a6\u30c8\u30d7\u30c3\u30c8\uff09\u306e\u305d\u308c\u305e\u308c\u306e\u300c\u30c8\u30fc\u30af\u30f3\u6570\u300d\u306b\u57fa\u3065\u3044\u3066\u8a08\u7b97\u3055\u308c\u307e\u3059\u3002<\/b><\/span>\u30c8\u30fc\u30af\u30f3\u3068\u306f\u3001AI\u304c\u30c6\u30ad\u30b9\u30c8\u3092\u51e6\u7406\u3059\u308b\u969b\u306e\u5358\u4f4d\u3067\u3001\u8a00\u8a9e\u3084\u6587\u8108\u306b\u3088\u308a\u8907\u6570\u306e\u6587\u5b57\u30671\u30c8\u30fc\u30af\u30f3\u306b\u306a\u308b\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3002\u7279\u306b\u65e5\u672c\u8a9e\u306e\u5834\u5408\u3001\u82f1\u8a9e\u3068\u6bd4\u3079\u30661\u6587\u5b57\u3042\u305f\u308a\u306e\u30c8\u30fc\u30af\u30f3\u6d88\u8cbb\u91cf\u304c\u591a\u304f\u306a\u308b\u50be\u5411\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u6599\u91d1\u306f\u5229\u7528\u3059\u308b\u30e2\u30c7\u30eb\uff08\u4f8b\uff1a Gemini 2.5 Pro\u3001Gemini 2.5 Flash\uff09\u306b\u3088\u3063\u3066\u7570\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3>\u7121\u6599\u67a0\u306b\u3064\u3044\u3066<\/h3>\n<p><span style=\"background-color: #ffff99;\"><b>Gemini API\u306b\u306f\u3001\u7279\u5b9a\u306e\u30e2\u30c7\u30eb\uff08\u4f8b\uff1aGemini 2.5 Flash\u306a\u3069\uff09\u306b\u3064\u3044\u3066\u30011\u65e5\u3042\u305f\u308a\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u6570\uff08RPD\uff09\u30841\u5206\u3042\u305f\u308a\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u6570\uff08RPM\uff09\u306b\u5236\u9650\u306f\u3042\u308a\u307e\u3059\u304c\u3001\u7121\u6599\u3067\u4f7f\u3048\u308b\u300cFree Tier\u300d\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/b><\/span>\u5c0f\u898f\u6a21\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u958b\u767a\u3084\u30c6\u30b9\u30c8\u3067\u3042\u308c\u3070\u3001\u591a\u304f\u306e\u5834\u5408\u3001\u3053\u306e\u7121\u6599\u67a0\u306e\u7bc4\u56f2\u5185\u3067\u5341\u5206\u306b\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u3053\u3046\u3057\u305f\u7121\u6599\u67a0\u306f\u5909\u66f4\u306e\u53ef\u80fd\u6027\u3082\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u6700\u65b0\u306e\u60c5\u5831\u306f\u5fc5\u305a\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u78ba\u8a8d\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>Gemini API\u30ad\u30fc\u306e\u53d6\u5f97\u65b9\u6cd5\u306f\uff1f<\/h2>\n<p><span style=\"background-color: #ffff99;\"><b>Gemini API\u3092\u5229\u7528\u3059\u308b\u306b\u306f\u3001\u8a8d\u8a3c\u30ad\u30fc\u3067\u3042\u308b\u300cAPI\u30ad\u30fc\u300d\u304c\u5fc5\u8981\u3067\u3059\u3002<\/b><\/span>\u958b\u767a\u3084\u30c6\u30b9\u30c8\u7528\u9014\u3067\u3042\u308c\u3070\u3001\u300cGoogle AI Studio\u300d\u3068\u3044\u3046Web\u30b5\u30a4\u30c8\u304b\u3089\u3001\u6570\u30af\u30ea\u30c3\u30af\u3067\u7c21\u5358\u306b\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>Google AI Studio\u3067\u306eAPI\u30ad\u30fc\u53d6\u5f97\u624b\u9806<\/h3>\n<div class=\"summary-box\">\n<ol class=\"summary-box__list summary-box__list--number\">\n<li><strong>Google AI Studio\u306b\u30a2\u30af\u30bb\u30b9<\/strong>\uff1a \u304a\u624b\u6301\u3061\u306eGoogle\u30a2\u30ab\u30a6\u30f3\u30c8\u3067Google AI Studio\u306e\u516c\u5f0f\u30b5\u30a4\u30c8\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u307e\u3059\u3002<\/li>\n<li><strong>\u300cGet API key\u300d\u3092\u30af\u30ea\u30c3\u30af<\/strong>\uff1a \u753b\u9762\u306e\u5de6\u5074\u30b5\u30a4\u30c9\u30d0\u30fc\u306e\u4e0b\u90e8\u306b\u300cGet API key\uff08API\u30ad\u30fc\u3092\u53d6\u5f97\uff09\u300d\u3068\u3044\u3046\u30e1\u30cb\u30e5\u30fc\u9805\u76ee\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u3053\u308c\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/li>\n<li><strong>API\u30ad\u30fc\u3092\u4f5c\u6210<\/strong>\uff1a \u300cCreate API key in new project\uff08\u65b0\u3057\u3044\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067API\u30ad\u30fc\u3092\u4f5c\u6210\uff09\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u307e\u3059\u3002<\/li>\n<li><strong>\u30ad\u30fc\u3092\u30b3\u30d4\u30fc\u3057\u3066\u4fdd\u5b58<\/strong>\uff1a \u3059\u3050\u306bAPI\u30ad\u30fc\uff08\u9577\u3044\u6587\u5b57\u5217\uff09\u304c\u751f\u6210\u3055\u308c\u307e\u3059\u3002\u3053\u306e\u30ad\u30fc\u306f\u5f8c\u304b\u3089\u518d\u8868\u793a\u3067\u304d\u306a\u3044\u305f\u3081\u3001\u5fc5\u305a\u30b3\u30d4\u30fc\u3057\u3066\u5b89\u5168\u306a\u5834\u6240\u306b\u4fdd\u7ba1\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<\/ol>\n<\/div>\n<p><strong>\u3010\u6ce8\u610f\u3011<\/strong> API\u30ad\u30fc\u306f\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u3068\u540c\u69d8\u306b\u975e\u5e38\u306b\u91cd\u8981\u306a\u60c5\u5831\u3067\u3059\u3002\u7b2c\u4e09\u8005\u306b\u77e5\u3089\u308c\u306a\u3044\u3088\u3046\u3001\u53b3\u91cd\u306b\u7ba1\u7406\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h2>Gemini API\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\uff08Python\u7de8\uff09<\/h2>\n<p><span style=\"background-color: #ffff99;\"><b>API\u30ad\u30fc\u304c\u53d6\u5f97\u3067\u304d\u305f\u3089\u3001\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u306ePython\u3092\u4f7f\u3063\u3066Gemini API\u3092\u547c\u3073\u51fa\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/b><\/span>\u3053\u3053\u3067\u306f\u3001\u6700\u3082\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<h3>Python\u3067\u306e\u5b9f\u884c\u624b\u9806<\/h3>\n<div class=\"summary-box\">\n<ol class=\"summary-box__list summary-box__list--number\">\n<li>\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff1a<br \/>\n\u307e\u305a\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u3084\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3067\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3001Google\u306e\u516c\u5f0f\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<br \/>\npip install google-generativeai<\/li>\n<li>\u30b3\u30fc\u30c9\u306e\u4f5c\u6210\u3068\u5b9f\u884c\uff1a<br \/>\n\u6b21\u306b\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u7c21\u5358\u306aPython\u30b3\u30fc\u30c9\u3092\u4f5c\u6210\u3057\u3001\u5b9f\u884c\u3057\u307e\u3059\u3002YOUR_API_KEY\u306e\u90e8\u5206\u306f\u3001\u5148\u307b\u3069\u53d6\u5f97\u3057\u305f\u81ea\u8eab\u306eAPI\u30ad\u30fc\u306b\u7f6e\u304d\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\nPythonimport google.generativeai as genai# API\u30ad\u30fc\u3092\u8a2d\u5b9a<\/p>\n<p>genai.configure(api_key=&#8221;YOUR_API_KEY&#8221;)<\/p>\n<p># \u5229\u7528\u3059\u308b\u30e2\u30c7\u30eb\u3092\u9078\u629e<\/p>\n<p>model = genai.GenerativeModel(&#8216;gemini-2.5-pro-latest&#8217;)<\/p>\n<p># AI\u306b\u6307\u793a\u3092\u51fa\u3059<\/p>\n<p>prompt = &#8220;\u65e5\u672c\u306e\u9996\u90fd\u306b\u3064\u3044\u3066\u6559\u3048\u3066\u304f\u3060\u3055\u3044\u3002&#8221;<\/p>\n<p>response = model.generate_content(prompt)<\/p>\n<p># AI\u304b\u3089\u306e\u56de\u7b54\u3092\u8868\u793a<\/p>\n<p>print(response.text)<\/p>\n<p>\u3053\u308c\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001AI\u304b\u3089\u306e\u56de\u7b54\uff08\u300c\u65e5\u672c\u306e\u9996\u90fd\u306f\u6771\u4eac\u3067\u3059\u3002\u300d\u306a\u3069\uff09\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/li>\n<\/ol>\n<\/div>\n<h2>API\u306e\u4f7f\u7528\u72b6\u6cc1\u3084\u6599\u91d1\u306e\u78ba\u8a8d\u65b9\u6cd5\u306f\uff1f<\/h2>\n<p><span style=\"background-color: #ffff99;\"><b>Gemini API\u306e\u8a73\u3057\u3044\u4f7f\u7528\u72b6\u6cc1\u3084\u3001\u7121\u6599\u67a0\u3092\u8d85\u3048\u3066\u5229\u7528\u3057\u305f\u5834\u5408\u306b\u767a\u751f\u3057\u305f\u6599\u91d1\u306f\u3001\u300cGoogle Cloud Console\u300d\u3068\u3044\u3046\u7ba1\u7406\u753b\u9762\u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/b><\/span><\/p>\n<p>Google AI Studio\u3067API\u30ad\u30fc\u3092\u4f5c\u6210\u3059\u308b\u3068\u3001\u88cf\u5074\u3067\u5bfe\u5fdc\u3059\u308bGoogle Cloud\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u81ea\u52d5\u7684\u306b\u4f5c\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u305d\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3053\u3068\u3067\u3001API\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u6570\u3084\u30a8\u30e9\u30fc\u7387\u3001\u65e5\u3005\u306e\u30b3\u30b9\u30c8\u306a\u3069\u3092\u30b0\u30e9\u30d5\u3067\u8996\u899a\u7684\u306b\u628a\u63e1\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002\u307e\u305f\u3001\u4e88\u7b97\u3092\u8a2d\u5b9a\u3057\u3001\u8a2d\u5b9a\u984d\u3092\u8d85\u3048\u305d\u3046\u306b\u306a\u3063\u305f\u3089\u901a\u77e5\u3092\u53d7\u3051\u53d6\u308b\u300c\u4e88\u7b97\u30a2\u30e9\u30fc\u30c8\u300d\u306e\u6a5f\u80fd\u3082\u3042\u308a\u3001\u610f\u56f3\u305b\u305a\u9ad8\u984d\u306a\u6599\u91d1\u304c\u767a\u751f\u3059\u308b\u3053\u3068\u3092\u9632\u3052\u307e\u3059\u3002<\/p>\n<h2>Gemini API\u3067AI\u6d3b\u7528\u306e\u53ef\u80fd\u6027\u3092\u5e83\u3052\u308b<\/h2>\n<p>\u672c\u8a18\u4e8b\u3067\u306f\u3001Gemini API\u306e\u57fa\u672c\u304b\u3089\u3001\u6599\u91d1\u4f53\u7cfb\u3001Python\u3067\u306e\u4f7f\u3044\u65b9\u307e\u3067\u3092\u89e3\u8aac\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>Gemini API\u306f\u3001\u958b\u767a\u8005\u3060\u3051\u3067\u306a\u304f\u3001AI\u3092\u6d3b\u7528\u3057\u3066\u65b0\u3057\u3044\u30b5\u30fc\u30d3\u30b9\u3084\u696d\u52d9\u52b9\u7387\u5316\u306e\u4ed5\u7d44\u307f\u3092\u4f5c\u308a\u305f\u3044\u3068\u8003\u3048\u3066\u3044\u308b\u5168\u3066\u306e\u30d3\u30b8\u30cd\u30b9\u30d1\u30fc\u30bd\u30f3\u306b\u3068\u3063\u3066\u3001\u5f37\u529b\u306a\u30c4\u30fc\u30eb\u3067\u3059\u3002 \u7121\u6599\u67a0\u3092\u6d3b\u7528\u3059\u308c\u3070\u3001\u4e00\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u8ffd\u52a0\u30b3\u30b9\u30c8\u3092\u304b\u3051\u305a\u306bAI\u3092\u8a66\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u305f\u3060\u3057\u5229\u7528\u91cf\u304c\u7121\u6599\u67a0\u3092\u8d85\u3048\u308b\u3068\u8ab2\u91d1\u304c\u767a\u751f\u3059\u308b\u305f\u3081\u3001\u5b9f\u969b\u306e\u4f7f\u7528\u72b6\u6cc1\u3092\u78ba\u8a8d\u3057\u306a\u304c\u3089\u6d3b\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u306fGoogle AI Studio\u3067API\u30ad\u30fc\u3092\u53d6\u5f97\u3057\u3001\u305d\u306e\u53ef\u80fd\u6027\u3092\u8a66\u3057\u3066\u307f\u3066\u306f\u3044\u304b\u304c\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Gemini API\u306f\u3001\u81ea\u793e\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3084\u30b5\u30fc\u30d3\u30b9\u306bGoogle\u306e\u9ad8\u6027\u80fdAI\u300cGemini\u300d\u3092\u7d44\u307f\u8fbc\u3080\u305f\u3081\u306e\u3001\u958b\u767a\u8005\u5411\u3051\u30c4\u30fc\u30eb\u3067\u3059\u3002\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u30aa\u30ea\u30b8\u30ca\u30eb\u306eAI\u30c1\u30e3\u30c3\u30c8\u30dc\u30c3\u30c8\u3092\u958b\u767a\u3057\u305f\u308a\u3001\u65e2\u5b58\u306e\u696d\u52d9\u30b7\u30b9\u30c6\u30e0\u3092A [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-839","post","type-post","status-publish","format-standard","hentry","category-ai-how-to"],"acf":{"pdf-dlbox-url":"https:\/\/biz.moneyforward.com\/library\/form\/54130\/","templatesbox-title":"Gemini API \u5229\u7528\u958b\u59cb\u306e\u305f\u3081\u306e\u30c1\u30a7\u30c3\u30af\u30ea\u30b9\u30c8","templatesbox-img1-url":"https:\/\/biz.moneyforward.com\/wp-content\/uploads\/2026\/02\/minibook_ai_839.png","templatesbox-img1-title":"","templatesbox-img2-url":"","templatesbox-img2-title":"","templatesbox-desc":"Gemini API \u5229\u7528\u958b\u59cb\u306e\u305f\u3081\u306e\u30c1\u30a7\u30c3\u30af\u30ea\u30b9\u30c8\u3092\u7121\u6599\u3067\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002\u305c\u3072\u3054\u81ea\u7531\u306b\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u6d3b\u7528\u304f\u3060\u3055\u3044\u3002","templatesbox-btn-text":"\u7121\u6599\u3067\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b","templatesbox-link":"https:\/\/biz.moneyforward.com\/accounting\/topics\/15728\/"},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/biz.moneyforward.com\/ai\/basic\/wp-json\/wp\/v2\/posts\/839","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/biz.moneyforward.com\/ai\/basic\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/biz.moneyforward.com\/ai\/basic\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/biz.moneyforward.com\/ai\/basic\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/biz.moneyforward.com\/ai\/basic\/wp-json\/wp\/v2\/comments?post=839"}],"version-history":[{"count":10,"href":"https:\/\/biz.moneyforward.com\/ai\/basic\/wp-json\/wp\/v2\/posts\/839\/revisions"}],"predecessor-version":[{"id":4095,"href":"https:\/\/biz.moneyforward.com\/ai\/basic\/wp-json\/wp\/v2\/posts\/839\/revisions\/4095"}],"wp:attachment":[{"href":"https:\/\/biz.moneyforward.com\/ai\/basic\/wp-json\/wp\/v2\/media?parent=839"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/biz.moneyforward.com\/ai\/basic\/wp-json\/wp\/v2\/categories?post=839"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/biz.moneyforward.com\/ai\/basic\/wp-json\/wp\/v2\/tags?post=839"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}