Skip to content

Instantly share code, notes, and snippets.

// GeminiApiClient.cs
using UnityEngine;
using System.Collections;
using UnityEngine.Networking;
using SimpleJSON; // SimpleJSONライブラリを使用 (後述)
public class GeminiApiClient : MonoBehaviour
{
[SerializeField] private string apiKey = "YOUR_GEMINI_API_KEY"; // Inspectorで設定
private const string API_URL = "https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=";