AI 모델 API채팅기본 Gemini 형식
Gemini 미디어 인식
Gemini 이미지, PDF, 오디오 및 비디오 인식 요청
⚠️ 참고:inlineData를 통해 base64 형식으로 이미지, PDF, 오디오 및 비디오 업로드만 지원합니다. fileData.fileUri 또는 File API는 지원되지 않습니다.
인증
BearerAuth
AuthorizationBearer <token>
Bearer Token 인증을 사용합니다.
형식: Authorization: Bearer sk-xxxxxx
In: header
경로 매개변수
model*string
모델 이름
요청 본문
application/json
contents?
generationConfig?
safetySettings?
tools?
systemInstruction?
curl -X POST "https://us-api.tokenhub.com/v1beta/models/string:generateContent" \ -H "Content-Type: application/json" \ -d '{}'{
"candidates": [
{
"content": {
"role": "string",
"parts": [
{}
]
},
"finishReason": "string",
"safetyRatings": [
{}
]
}
],
"usageMetadata": {
"promptTokenCount": 0,
"candidatesTokenCount": 0,
"totalTokenCount": 0
}
}응답 본문
application/json
마지막 업데이트