|
Gemini API 제공업체를 클릭하여 이 페이지에서 제공업체별 콘텐츠와 코드를 확인합니다. |
Google의 생성형 AI 모델은 특정 리전에서 사용할 수 있습니다. 규정 준수, 지연 시간, 가용성, 내구성 요구사항에 맞게 모델에 액세스할 위치를 선택할 수 있습니다.
Firebase AI Logic를 사용할 때 Agent Platform Gemini API (formerly Vertex AI)를 사용하는 각 요청에는 모델에 액세스할 위치가 선택적으로 포함될 수 있습니다. Firebase AI Logic에는 기본 위치 설정이 있습니다.
- 새로운 'Agent Platform' 초기화 문법을 사용하는 경우:
global - 기존 'Vertex AI' 초기화 문법을 사용하는 경우:
us-central1
global 위치 정보
거의 모든 Gemini 모델에서 Agent Platform Gemini API (formerly Vertex AI)는 global 위치를 제공합니다. 즉, 전역 풀의 어느 곳에서나 사용 가능한 모델이 요청을 처리합니다.
요청에 global 위치를 사용하면 모델의 용량 한도에 도달하지 않고 '서비스 오버로드' (503) 오류를 줄일 수 있습니다.
또한 모델에 따라 global 위치를 사용하는 것이 필수일 수 있습니다. 모델에 사용할 수 있는 유일한 위치이기 때문입니다 (예: 프리뷰 Gemini 모델).
위치를 명시적으로 설정해야 하는 경우는 언제인가요?
Firebase AI Logic에는 위치에 대한 자동 기본값이 있습니다 (예: '에이전트 플랫폼' 초기화 문법을 사용하는 경우 global). 하지만 다른 위치를 사용해야 하거나 사용하려는 경우 코드에서 Agent Platform Gemini API (formerly Vertex AI) 백엔드 서비스를 초기화하는 동안 위치를 명시적으로 지정해야 합니다.
모델에 따라 위치를 명시적으로 설정해야 할 수 있습니다.
요청이 모델을 사용할 수 없는 위치에서 모델에 액세스하려고 하면 모델 was not found or your project does not have access to it라는 404 오류가 발생합니다.
Gemini 프리뷰 및 실험 모델:
global위치에서만 사용할 수 있습니다.Gemini 4.x 및 Gemini 3.x 안정화 버전 모델:
global위치에서 사용할 수 있으며us및eu위치에서도 사용할 수 있는 경우가 많습니다.Gemini 2.5 모델: 여러 위치에서 사용 가능. Gemini Live API 2.5 모델은
global에서 사용할 수 없습니다.
이 페이지 뒷부분에 있는 사용 가능한 모든 위치 목록을 참조하세요.
일반적인 사실 및 권장사항
위치에 관한 몇 가지 주요 사실과 권장사항은 다음과 같습니다.
용량 한도는 모델별, 리전별, 분당으로 적용됩니다.
예기치 않게 용량 한도에 도달하지 않도록 하려면
global위치를 사용하는 것이 좋습니다 (모델이global위치에서 사용 가능한 경우).Firebase Remote Config를 사용하여 모델에 액세스하는 위치를 제어하는 것이 좋습니다. 이렇게 하면 새 버전의 앱을 출시하지 않고도 위치를 변경할 수 있습니다.
global위치를 사용하는 것이 사용 사례에 적합하지 않은 경우 모델에 액세스하는 위치를 명시적으로 배포하는 것이 좋습니다 (모델이global이외의 위치에서 사용 가능한 경우). 예를 들어 Firebase Remote Config를 사용하여 최종 사용자의 위치를 기반으로 위치를 설정할 수 있습니다.
코드 샘플
Firebase AI Logic에는 위치에 대한 자동 기본값이 있습니다 (예: 'Agent Platform' 초기화 문법을 사용하는 경우 global). 하지만 다른 위치를 사용해야 하거나 사용하려는 경우 코드에서 Agent Platform Gemini API (formerly Vertex AI) 백엔드 서비스를 초기화하는 동안 위치를 명시적으로 지정해야 합니다.
LOCATION을 이 페이지 뒷부분에 있는 사용 가능한 위치 목록의 위치 코드 (예: global 또는 us-central1)로 바꿉니다.
Agent Platform 문법
Swift
agentPlatform 문법은 SDK v12.17.0 이상부터 사용할 수 있습니다.
// ...
// Initialize the Agent Platform Gemini API backend service (formerly branded Vertex AI).
// For the `agentPlatform` syntax, the default location is `global`, so
// specifying a location is usually optional since most models are supported in `global`.
let ai = FirebaseAI.firebaseAI(backend: .agentPlatform(location: "LOCATION"))
// ...
Kotlin
agentPlatform 문법은 SDK v17.15.0 이상 및 Firebase Android BoM v34.17.0 이상에서 사용할 수 있습니다.
// ...
// Initialize the Agent Platform Gemini API backend service (formerly branded Vertex AI).
// For the `agentPlatform` syntax, the default location is `global`, so
// specifying a location is usually optional since most models are supported in `global`.
val ai = Firebase.ai(backend = GenerativeBackend.agentPlatform(location = "LOCATION"))
// ...
Java
agentPlatform 문법은 SDK v17.15.0 이상 및 Firebase Android BoM v34.17.0 이상에서 사용할 수 있습니다.
// ...
// Initialize the Agent Platform Gemini API backend service (formerly branded Vertex AI).
// For the `agentPlatform` syntax, the default location is `global`, so
// specifying a location is usually optional since most models are supported in `global`.
GenerativeModel ai = FirebaseAI.getInstance(GenerativeBackend.agentPlatform("LOCATION"));
// ...
Web
AgentPlatformBackend 문법은 Firebase JS SDK v12.17.0 이상부터 사용할 수 있습니다.
// ...
// Initialize FirebaseApp
// Initialize the Agent Platform Gemini API backend service (formerly branded Vertex AI).
// For the `AgentPlatformBackend` syntax, the default location is `global`, so
// specifying a location is usually optional since most models are supported in `global`.
const ai = getAI(firebaseApp, { backend: new AgentPlatformBackend('LOCATION') });
// ...
Dart
// ...
// Initialize the Agent Platform Gemini API backend service (formerly branded Vertex AI).
// For the `agentPlatform` syntax, the default location is `global`, so
// specifying a location is usually optional since most models are supported in `global`.
final ai = await FirebaseAI.agentPlatform(location: 'LOCATION');
// ...
Unity
// ...
// Initialize the Agent Platform Gemini API backend service (formerly Vertex AI).
// For the `AgentPlatform` syntax, the default location is `global`, so
// specifying a location is usually optional since most models are supported in `global`.
var ai = FirebaseAI.GetInstance(FirebaseAI.Backend.AgentPlatform(location: "LOCATION"));
// ...
Vertex AI 문법
Swift
vertexAI 문법은 SDK v13.0.0에서 삭제되었습니다.
// ...
// Initialize the Agent Platform Gemini API backend service (formerly branded Vertex AI).
// For the legacy `vertexAI` syntax, the default location is `us-central1`, so
// specifying a location is usually required since most models are *not* supported in `us-central1`.
let ai = FirebaseAI.firebaseAI(backend: .vertexAI(location: "LOCATION"))
// ...
Kotlin
vertexAI 문법은 SDK v18.0.0 및 BoM v35.0.0에서 삭제되었습니다.
// ...
// Initialize the Agent Platform Gemini API backend service (formerly branded Vertex AI).
// For the legacy `vertexAI` syntax, the default location is `us-central1`, so
// specifying a location is usually required since most models are *not* supported in `us-central1`.
val ai = Firebase.ai(backend = GenerativeBackend.vertexAI(location = "LOCATION"))
// ...
Java
vertexAI 문법은 SDK v18.0.0 및 BoM v35.0.0에서 삭제되었습니다.
// ...
// Initialize the Agent Platform Gemini API backend service (formerly branded Vertex AI).
// For the legacy `vertexAI` syntax, the default location is `us-central1`, so
// specifying a location is usually required since most models are *not* supported in `us-central1`.
GenerativeModel ai = FirebaseAI.getInstance(GenerativeBackend.vertexAI("LOCATION"));
// ...
Web
VertexAIBackend 문법은 SDK v13.0.0에서 삭제되었습니다.
// ...
// Initialize FirebaseApp
// Initialize the Agent Platform Gemini API backend service (formerly branded Vertex AI).
// For the legacy `VertexAIBackend` syntax, the default location is `us-central1`, so
// specifying a location is usually required since most models are *not* supported in `us-central1`.
const ai = getAI(firebaseApp, { backend: new VertexAIBackend('LOCATION') });
// ...
Dart
// ...
// Initialize the Agent Platform Gemini API backend service (formerly branded Vertex AI).
// For the legacy `vertexAI` syntax, the default location is `us-central1`, so
// specifying a location is usually required since most models are *not* supported in `us-central1`.
final ai = await FirebaseAI.vertexAI(location: 'LOCATION');
// ...
Unity
// ...
// Initialize the Agent Platform Gemini API backend service (formerly branded Vertex AI).
// For the legacy `VertexAI` syntax, the default location is `us-central1`, so
// specifying a location is usually required since most models are *not* supported in `us-central1`.
var ai = FirebaseAI.GetInstance(FirebaseAI.Backend.VertexAI(location: "LOCATION"));
// ...
모델을 사용할 수 없는 위치를 지정하면 모델 was not found or your project does not have access to it라는 404 오류가 발생합니다.
사용 가능한 위치
Google Cloud는 리전을 사용합니다. Google Cloud는 Agent Platform의 생성형 AI의 모든 정식 버전에 대해 지정하는 리전에만 고객 데이터를 저장합니다.
Agent Platform의 생성형 AI는 다음 리전에서 사용할 수 있습니다. 일부 모델 또는 특정 버전은 일부 위치에서 사용하지 못할 수 있습니다(자세한 위치 가용성은 Google Cloud 문서 참조).
다음에 유의하세요.
Firebase AI Logic는 기본적으로 다음 위치로 설정됩니다.
- 새로운 'Agent Platform' 초기화 문법을 사용하는 경우:
global - 기존 'Vertex AI' 초기화 문법을 사용하는 경우:
us-central1
- 새로운 'Agent Platform' 초기화 문법을 사용하는 경우:
Gemini 프리뷰 및 실험 모델:
global위치에서만 사용할 수 있습니다.Gemini 4.x 및 Gemini 3.x 안정화 버전 모델:
global위치에서 사용할 수 있으며us및eu위치에서도 사용할 수 있는 경우가 많습니다.Gemini 2.5 모델: 여러 위치에서 사용 가능. Gemini Live API 2.5 모델은
global에서 사용할 수 없습니다.
Gemini 3.x 이상 모델
Gemini 3.x 이상 모델을 사용하는 경우 Firebase AI Logic는 다음 위치를 지원합니다.
globaluseu
각 모델에 사용할 수 있는 위치에 대한 자세한 내용은 Google Cloud 문서를 참조하세요.
이전 세대 모델
이전 Gemini 모델 (예: 2.5 모델)을 사용하는 경우 Firebase AI Logic는 다음 위치를 지원합니다.
전역
global
미국
- 오하이오주 콜럼버스(
us-east5) - 텍사스주 댈러스(
us-south1) - 아이오와(
us-central1) - 네바다 주 라스베이거스(
us-west4) - 사우스캐롤라이나주 몽크스 코너(
us-east1) - 북버지니아(
us-east4) - 오리건(
us-west1)
캐나다
- 몬트리올(
northamerica-northeast1)
남미
- 브라질 상파울루(
southamerica-east1)
유럽
- 벨기에(
europe-west1) - 핀란드(
europe-north1) - 독일 프랑크푸르트(
europe-west3) - 영국 런던(
europe-west2) - 스페인 마드리드(
europe-southwest1) - 이탈리아 밀라노(
europe-west8) - 네덜란드(
europe-west4) - 프랑스 파리(
europe-west9) - 폴란드 바르샤바(
europe-central2) - 스위스 취리히(
europe-west6)
아시아 태평양 지역
- 타이완 창후아 카운티(
asia-east1) - 중국 홍콩(
asia-east2) - 인도 뭄바이(
asia-south1) - 대한민국 서울(
asia-northeast3) - 싱가포르(
asia-southeast1) - 오스트레일리아 시드니(
australia-southeast1) - 일본 도쿄(
asia-northeast1)
중동
- 사우디아라비아 담맘(
me-central2) - 카타르 도하(
me-central1) - 이스라엘 텔아비브(
me-west1)
Gemini Live API 2.5 모델은 global에서 사용할 수 없습니다.
각 모델에 사용할 수 있는 위치에 대한 자세한 내용은 Google Cloud 문서를 참조하세요.
이전에 사용 가능했으나 현재는 사용할 수 없는 위치 목록:
- 아직 거부된 위치가 없습니다.