এই নথিটি Gemini API-এর v1 এবং v1beta সংস্করণগুলির মধ্যে পার্থক্যগুলির একটি উচ্চ-স্তরের ওভারভিউ প্রদান করে৷
v1 : API এর স্থিতিশীল সংস্করণ। স্থিতিশীল সংস্করণের বৈশিষ্ট্যগুলি প্রধান সংস্করণের জীবদ্দশায় সম্পূর্ণরূপে সমর্থিত। যদি কোন ব্রেকিং পরিবর্তন হয়, তাহলে API-এর পরবর্তী বড় সংস্করণ তৈরি করা হবে এবং বিদ্যমান সংস্করণটি একটি যুক্তিসঙ্গত সময়ের পরে বাতিল করা হবে। প্রধান সংস্করণ পরিবর্তন না করেই এপিআই-তে নন-ব্রেকিং পরিবর্তনগুলি চালু করা যেতে পারে।
v1beta : এই সংস্করণে প্রারম্ভিক-অ্যাক্সেস বৈশিষ্ট্যগুলি অন্তর্ভুক্ত রয়েছে যা বিকাশের অধীনে থাকতে পারে এবং দ্রুত এবং ব্রেকিং পরিবর্তন সাপেক্ষে। বিটা সংস্করণের বৈশিষ্ট্যগুলি স্থিতিশীল সংস্করণে চলে যাবে এমন কোনও গ্যারান্টি নেই। এই অস্থিরতার কারণে, আপনার এই সংস্করণের সাথে উত্পাদন অ্যাপ্লিকেশন চালু না করার কথা বিবেচনা করা উচিত।
বৈশিষ্ট্য
v1
v1beta
বিষয়বস্তু তৈরি করুন - শুধুমাত্র পাঠ্য ইনপুট
বিষয়বস্তু তৈরি করুন - টেক্সট এবং ইমেজ ইনপুট
কন্টেন্ট তৈরি করুন - টেক্সট আউটপুট
বিষয়বস্তু তৈরি করুন - মাল্টি-টার্ন কথোপকথন (চ্যাট)
বিষয়বস্তু তৈরি করুন - ফাংশন কল
কন্টেন্ট তৈরি করুন - স্ট্রিমিং
এম্বেড কন্টেন্ট - শুধুমাত্র টেক্সট ইনপুট
উত্তর তৈরি করুন
শব্দার্থক পুনরুদ্ধারকারী
- সমর্থিত
- কখনই সমর্থন করা হবে না
একটি SDK এ API সংস্করণ কনফিগার করুন
Gemini API SDK-এর ডিফল্ট v1beta , কিন্তু আপনি নিম্নলিখিত কোড নমুনায় দেখানো API সংস্করণ সেট করে অন্যান্য সংস্করণ ব্যবহার করতে বেছে নিতে পারেন:
পাইথন
fromgoogleimportgenaiclient=genai.Client(http_options={'api_version':'v1alpha'})response=client.models.generate_content(model='gemini-2.0-flash',contents="Explain how AI works",)print(response.text)
জাভাস্ক্রিপ্ট
import{GoogleGenAI}from"@google/genai";constai=newGoogleGenAI({httpOptions:{apiVersion:"v1alpha"},});asyncfunctionmain(){constresponse=awaitai.models.generateContent({model:"gemini-2.0-flash",contents:"Explain how AI works",});console.log(response.text);}awaitmain();
বিশ্রাম
curl"https://generativelanguage.googleapis.com/v1/models/gemini-1.5-flash:generateContent"\
-H"x-goog-api-key: $GEMINI_API_KEY"\
-H'Content-Type: application/json'\
-XPOST\
-d'{ "contents": [{ "parts":[{"text": "Explain how AI works."}] }] }'
[[["সহজে বোঝা যায়","easyToUnderstand","thumb-up"],["আমার সমস্যার সমাধান হয়েছে","solvedMyProblem","thumb-up"],["অন্যান্য","otherUp","thumb-up"]],[["এতে আমার প্রয়োজনীয় তথ্য নেই","missingTheInformationINeed","thumb-down"],["খুব জটিল / অনেক ধাপ","tooComplicatedTooManySteps","thumb-down"],["পুরনো","outOfDate","thumb-down"],["অনুবাদ সংক্রান্ত সমস্যা","translationIssue","thumb-down"],["নমুনা / কোড সংক্রান্ত সমস্যা","samplesCodeIssue","thumb-down"],["অন্যান্য","otherDown","thumb-down"]],["2025-08-22 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# API versions explained\n\nThis document provides a high-level overview of the differences between the `v1`\nand `v1beta` versions of the Gemini API.\n\n- **v1**: Stable version of the API. Features in the stable version are fully-supported over the lifetime of the major version. If there are any breaking changes, then the next major version of the API will be created and the existing version will be deprecated after a reasonable period of time. Non-breaking changes may be introduced to the API without changing the major version.\n- **v1beta**: This version includes early-access features that may be under development and is subject to rapid and breaking changes. There is also no guarantee that the features in the Beta version will move to the stable version. Due to this instability, you should consider not launching production applications with this version.\n\n| Feature | v1 | v1beta |\n|----------------------------------------------------|----|--------|\n| Generate Content - Text-only input | | |\n| Generate Content - Text-and-image input | | |\n| Generate Content - Text output | | |\n| Generate Content - Multi-turn conversations (chat) | | |\n| Generate Content - Function calls | | |\n| Generate Content - Streaming | | |\n| Embed Content - Text-only input | | |\n| Generate Answer | | |\n| Semantic retriever | | |\n\n- - Supported\n- - Will never be supported\n\nConfigure API version in an SDK\n-------------------------------\n\nThe Gemini API SDK's default to `v1beta`, but you can opt to use other versions\nby setting the API version as shown in the following code sample: \n\n### Python\n\n from google import genai\n\n client = genai.Client(http_options={'api_version': 'v1alpha'})\n\n response = client.models.generate_content(\n model='gemini-2.0-flash',\n contents=\"Explain how AI works\",\n )\n\n print(response.text)\n\n### JavaScript\n\n import { GoogleGenAI } from \"@google/genai\";\n\n const ai = new GoogleGenAI({\n httpOptions: { apiVersion: \"v1alpha\" },\n });\n\n async function main() {\n const response = await ai.models.generateContent({\n model: \"gemini-2.0-flash\",\n contents: \"Explain how AI works\",\n });\n console.log(response.text);\n }\n\n await main();\n\n### REST\n\n curl \"https://generativelanguage.googleapis.com/v1/models/gemini-1.5-flash:generateContent\" \\\n -H \"x-goog-api-key: $GEMINI_API_KEY\" \\\n -H 'Content-Type: application/json' \\\n -X POST \\\n -d '{\n \"contents\": [{\n \"parts\":[{\"text\": \"Explain how AI works.\"}]\n }]\n }'"]]