Documentation Index
Fetch the complete documentation index at: https://docs.apigo.ai/llms.txt
Use this file to discover all available pages before exploring further.
推奨エンドポイント
最低限のお願い
{
"model": "gemini-2.5-flash",
"systemInstruction": {
"parts": [{ "text": "You are a concise assistant." }]
},
"contents": [
{
"role": "user",
"parts": [{ "text": "Summarize ApiGo in three sentences." }]
}
]
}
cURLの例
curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"systemInstruction": {
"parts": [{ "text": "You are a concise assistant." }]
},
"contents": [
{
"role": "user",
"parts": [{ "text": "Summarize ApiGo in three sentences." }]
}
]
}'
Python の例
from google import genai
from google.genai import types
client = genai.Client(api_key="<GEMINI_API_KEY>")
response = client.models.generate_content(
model="gemini-2.5-flash",
contents="Summarize ApiGo in three sentences.",
config=types.GenerateContentConfig(
system_instruction="You are a concise assistant."
),
)
print(response.text)
Node.js の例
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY });
const response = await ai.models.generateContent({
model: "gemini-2.5-flash",
contents: "Summarize ApiGo in three sentences.",
config: {
systemInstruction: "You are a concise assistant."
}
});
console.log(response.text);
ベストプラクティス
- 低遅延チャットのために Flash モデルから始める
parts モデルを変更しないで、後から再設計せずにメディアを追加できるようにします。
- 追加の推論コストが必要ない場合は、Gemini 2.5 フラッシュで
thinkingBudget を 0 に設定します。