When initializing the Vertex AI service, you can optionally specify a
location in which to run the service and access a model. If you don't specify
a location, the default is us-central1
. See the list of
available locations later on this page.
Code samples
Note that these samples show accessing a Gemini model, but you can also specify location when accessing an Imagen 3 model.
import FirebaseVertexAI
// Initialize the Vertex AI service
// Optionally specify a location in which to run the service and access the model
let vertex = VertexAI.vertexAI(location: "LOCATION ")
// Initialize the generative model with a model that supports your use case
let model = vertex.generativeModel(modelName: "MODEL_NAME ")
Available locations
Google Cloud uses regions to define regional APIs. Google Cloud only stores customer data in the region that you specify for all generally-available features of Generative AI on Vertex AI.
Generative AI on Vertex AI is available in the following regions. Some models and/or specific versions may not be available in all locations (for detailed location availability, see the Google Cloud documentation).
- Columbus, Ohio (
us-east5
) - Dallas, Texas (
us-south1
) - Iowa (
us-central1
) - Las Vegas, Nevada (
us-west4
) - Moncks Corner, South Carolina (
us-east1
) - Northern Virginia (
us-east4
) - Oregon (
us-west1
)
- Montréal (
northamerica-northeast1
)
- Sao Paulo, Brazil (
southamerica-east1
)
- Belgium (
europe-west1
) - Finland (
europe-north1
) - Frankfurt, Germany (
europe-west3
) - London, United Kingdom (
europe-west2
) - Madrid, Spain (
europe-southwest1
) - Milan, Italy (
europe-west8
) - Netherlands (
europe-west4
) - Paris, France (
europe-west9
) - Warsaw, Poland (
europe-central2
) - Zürich, Switzerland (
europe-west6
)
- Changhua County, Taiwan (
asia-east1
) - Hong Kong, China (
asia-east2
) - Mumbai, India (
asia-south1
) - Seoul, Korea (
asia-northeast3
) - Singapore (
asia-southeast1
) - Sydney, Australia (
australia-southeast1
) - Tokyo, Japan (
asia-northeast1
)
- Dammam, Saudi Arabia (
me-central2
) - Doha, Qatar (
me-central1
) - Tel Aviv, Israel (
me-west1
)