텍스트GeminiGemini.2.5.Flash.LiteNative.API
Gemini 2.5 Flash Lite - Native API - API 레퍼런스
- Google Native API 형식으로 gemini-2.5-flash-lite 모델 호출
- 동기 처리 모드 사용 가능, 대화 내용을 실시간으로 반환
- 일반 텍스트 대화: 단일 턴 또는 다중 턴 컨텍스트 대화, 코드 샘플의 simple_text 및 multi_turn 예제 참조
- 멀티모달 입력: 텍스트 + 이미지/오디오/비디오 혼합 입력 지원, 코드 샘플의 audio_analysis, image_understanding, multi_file 예제 참조
- 파라미터 튜닝: generationConfig를 통해 생성 품질 제어
- 스트리밍: method 파라미터를 통해 생성 모드 선택
인증
Authorizationstringheader필수
##모든 API는 Bearer Token 인증이 필요합니다## **API Key 받기:** [API Key 관리 페이지](https://starmagic.ai/app/api-keys)를 방문하여 API Key를 받으세요 **요청 헤더에 추가:** ``` Authorization: Bearer YOUR_API_KEY ```
Authorization: Bearer YOUR_API_KEY요청 본문
application/jsoncontentsobject[]필수
List of conversation contents, supports multi-turn dialogue and multimodal input
[
{
"role": "user",
"parts": [
null
]
}
]generationConfigobject
Generation configuration parameters
{
"temperature": 0.7,
"maxOutputTokens": 2000,
"topP": 0.9,
"topK": 40,
"candidateCount": 1,
"responseMimeType": "application/json",
"responseSchema": {},
"responseJsonSchema": {},
"thinkingConfig": {}
}systemInstructionobject
{
"role": "user",
"parts": [
null
]
}toolsobject[]
List of tools the model can call, such as function calling or code execution
[
{}
]toolConfigobject
Tool calling configuration (optional)
{}safetySettingsobject[]
Safety settings list (optional)
[
{}
]cachedContentstring
Cached content name, in the form cachedContents/{cachedContent}
"string"응답
application/json请求错误
응답 본문
errorobject
{
"code": 0,
"message": "string",
"type": "string",
"fallback_suggestion": "string"
}
