Mulai 29 April 2025, model Gemini 1.5 Pro dan Gemini 1.5 Flash tidak tersedia di project yang belum pernah menggunakan model ini, termasuk project baru. Untuk mengetahui detailnya, lihat Versi dan siklus proses model.
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Seiring berkembangnya aplikasi Gemini API Anda, Anda mungkin mendapati bahwa Anda memerlukan platform yang lebih luas untuk membangun dan men-deploy aplikasi dan solusi AI generatif secara end-to-end.
Vertex AI menyediakan ekosistem alat yang komprehensif untuk memungkinkan developer memanfaatkan kecanggihan AI generatif, mulai dari tahap awal pengembangan aplikasi hingga deployment aplikasi, hosting aplikasi, dan pengelolaan data kompleks dalam skala besar.
Dengan Vertex AI, Anda mendapatkan akses ke serangkaian alat Machine Learning Operations (MLOps) untuk menyederhanakan penggunaan, deployment, dan pemantauan model AI demi efisiensi dan keandalan. Selain itu, integrasi dengan database, alat Operasi Pengembangan (DevOps), logging, pemantauan, dan IAM menawarkan pendekatan komprehensif untuk mengelola seluruh siklus proses AI generatif.
Perbedaan antara penggunaan Gemini API secara mandiri dan Vertex AI
Tabel berikut merangkum perbedaan utama antara Gemini API dan Vertex AI untuk membantu Anda memutuskan opsi mana yang tepat untuk kasus penggunaan Anda:
Fitur
Gemini API
Vertex AI
Nama endpoint
generativelanguage.googleapis.com
aiplatform.googleapis.com
Daftar
Akun Google
Google Cloud akun (dengan perjanjian persyaratan dan penagihan)
Infrastruktur yang skalabel untuk hosting aplikasi
Database dan penyimpanan data
MLOps
Tidak
MLOps lengkap di Vertex AI (contoh: evaluasi model, Pemantauan Model, Model Registry)
Langkah-langkah migrasi
Bagian berikut membahas langkah-langkah yang diperlukan untuk memigrasikan kode Gemini API ke Vertex AI. Langkah-langkah ini mengasumsikan bahwa Anda telah menyimpan data perintah dari Google AI Studio di Google Drive.
Saat bermigrasi ke Vertex AI:
Anda dapat menggunakan project Google Cloud yang sudah ada (project yang sama yang Anda gunakan untuk membuat kunci Gemini API) atau membuat
projectGoogle Cloud baru.
Di menu Vertex AI, klik Recents > View all untuk membuka menu
Prompt management.
Klik downloadImpor perintah.
Di samping kolom File perintah, klik Telusuri, lalu pilih perintah dari direktori lokal Anda.
Untuk mengupload perintah secara massal, Anda harus menggabungkan perintah secara manual ke dalam satu file JSON.
Klik Upload.
2. Mengupload data pelatihan ke Vertex AI Studio
Untuk memigrasikan data pelatihan ke Vertex AI, Anda harus mengupload
data ke bucket Cloud Storage. Untuk mengetahui informasi selengkapnya, lihat
Pengantar penyesuaian .
3. Menghapus Kunci API yang tidak digunakan
Jika Anda tidak perlu lagi menggunakan kunci Gemini API untuk Gemini Developer API, ikuti praktik terbaik keamanan dan hapus kunci tersebut.
Temukan kunci API yang ingin Anda hapus, lalu klik ikon Actions.
Pilih Hapus kunci API.
Di modal Delete credential, pilih Delete.
Penghapusan kunci API memerlukan waktu beberapa menit untuk diterapkan. Setelah propagasi selesai, traffic yang menggunakan kunci API yang dihapus akan ditolak.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-10 UTC."],[],[],null,["As your [Gemini API](https://ai.google.dev/gemini-api/docs)\napplications mature, you might find that you need a more expansive platform for\nbuilding and deploying generative AI applications and solutions end-to-end.\nVertex AI provides a comprehensive ecosystem of tools to enable\ndevelopers to harness the power of generative AI, from the initial stages of app\ndevelopment to app deployment, app hosting, and managing complex data at scale.\n\nWith Vertex AI, you get access to a suite of Machine Learning\nOperations (MLOps) tools to streamline usage, deployment, and monitoring of AI\nmodels for efficiency and reliability. Additionally, integrations with\ndatabases, Development Operations (DevOps) tools, logging, monitoring, and\nIAM offer a comprehensive approach to managing the entire\ngenerative AI lifecycle.\n\nDifferences between using the Gemini API on its own and Vertex AI\n\nThe following table summarizes the main differences between the\nGemini API and Vertex AI to help you decide which option is\nright for your use case:\n\n| **Feature** | **Gemini API** | **Vertex AI** |\n| Endpoint names | `generativelanguage.googleapis.com` | `aiplatform.googleapis.com` |\n| Sign up | Google Account | Google Cloud account (with terms agreement and billing) |\n| Authentication | API key | Google Cloud service account |\n| User interface playground | Google AI Studio | Vertex AI Studio |\n|-----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| API \\& SDK | Server and mobile/web client SDKs - Server: Python, Node.js, Go, Dart, ABAP - Mobile/Web client: Android (Kotlin/Java), Swift, Web, Flutter | Server and mobile/web client SDKs - Server: Python, Node.js, Go, Java, ABAP - Mobile/Web client (via [Vertex AI in Firebase](https://firebase.google.com/docs/vertex-ai)): Android (Kotlin/Java), Swift, Web, Flutter |\n| No-cost usage of API \\& SDK | Yes, [where applicable](https://ai.google.dev/gemini-api/docs/billing#is-Gemini-free-in-EEA-UK-CH) | $300 Google Cloud credit for new users |\n| Quota (requests per minute) | Varies based on model and pricing plan (see [detailed information](https://ai.google.dev/pricing)) | Varies based on model and region (see [detailed information](/vertex-ai/generative-ai/docs/quotas)) |\n| Enterprise support | No | - Customer encryption key - Virtual private cloud - Data residency - Access transparency - Scalable infrastructure for application hosting - Databases and data storage |\n| MLOps | No | Full MLOps on Vertex AI (examples: model evaluation, Model Monitoring, Model Registry) |\n\nMigration steps\n\nThe following sections cover the steps required to migrate your Gemini\nAPI code to Vertex AI. These steps assume you have prompt data from\nGoogle AI Studio saved in Google Drive.\n\nWhen migrating to Vertex AI:\n\n- You can use your existing Google Cloud project (the same one you used to generate your Gemini API key) or you can create a new [Google Cloud project](/resource-manager/docs/creating-managing-projects).\n- Supported regions might differ between the Gemini API and Vertex AI. See the list of [supported regions for generative\n AI on Google Cloud](/vertex-ai/generative-ai/docs/learn/locations).\n- Any models you created in Google AI Studio need to be retrained in Vertex AI.\n\n1. Migrate your prompts to Vertex AI Studio\n\nYour Google AI Studio prompt data is saved in a Google Drive folder. This\nsection shows how to migrate your prompts to Vertex AI Studio.\n\n1. Open [Google Drive](https://drive.google.com).\n2. Navigate to the **AI_Studio** folder where the prompts are stored.\n3. Download your prompts from Google Drive to a local directory.\n\n | **Note:** Prompts downloaded from Google Drive are in the text (`txt`) format. Before you upload them to Vertex AI Studio, change the file extensions from `.txt` to `.json` to convert them to JSON files.\n4. Open [Vertex AI Studio](https://console.cloud.google.com/vertex-ai/generative) in the Google Cloud console.\n\n5. In the **Vertex AI** menu, click **Recents \\\u003e View all** to open the\n **Prompt management** menu.\n\n6. Click download**Import prompt**.\n\n7. Next to the **Prompt file** field, click **Browse** and select a prompt\n from your local directory.\n\n To upload prompts in bulk, you must manually combine your prompts into a\n single JSON file.\n8. Click **Upload**.\n\n2. Upload training data to Vertex AI Studio\n\nTo migrate your training data to Vertex AI, you need to upload your\ndata to a Cloud Storage bucket. For more information, see\n[Introduction to tuning](/vertex-ai/generative-ai/docs/models/tune-models).\n\n3. Delete unused API Keys\n\nIf you no longer need to use your Gemini API key for the\nGemini Developer API, then follow security best practices and delete\nit.\n\nTo delete an API key:\n\n1. Open the [Google Cloud API Credentials](https://console.cloud.google.com/apis/credentials)\n page.\n\n2. Find the API key that you want to delete and click the **Actions** icon.\n\n3. Select **Delete API key**.\n\n4. In the **Delete credential** modal, select **Delete**.\n\n Deleting an API key takes a few minutes to propagate. After propagation\n completes, any traffic using the deleted API key is rejected.\n\n| **Important:** If you delete a key that's still used in production and need to recover it, see [`gcloud beta services api-keys\n| undelete`](/sdk/gcloud/reference/beta/services/api-keys/undelete).\n\nWhat's next\n\n- Try a quickstart tutorial using [Vertex AI Studio](/vertex-ai/generative-ai/docs/start/quickstarts/quickstart) or the [Vertex AI API](/vertex-ai/generative-ai/docs/start/quickstarts/quickstart-multimodal)."]]