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." }]
}
]
}'
파이썬 예제
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 Flash에서
thinkingBudget를 0로 설정하십시오.