سریعترین مسیر از سفارش تا تولید با Gemini، Veo، Nano Banana و موارد دیگر.
پایتون
fromgoogleimportgenaiclient=genai.Client()response=client.models.generate_content(model="gemini-2.5-flash",contents="Explain how AI works in a few words",)print(response.text)
جاوا اسکریپت
import{GoogleGenAI}from"@google/genai";constai=newGoogleGenAI({});asyncfunctionmain(){constresponse=awaitai.models.generateContent({model:"gemini-2.5-flash",contents:"Explain how AI works in a few words",});console.log(response.text);}awaitmain();
برو
packagemainimport("context""fmt""log""google.golang.org/genai")funcmain(){ctx:=context.Background()client,err:=genai.NewClient(ctx,nil)iferr!=nil{log.Fatal(err)}result,err:=client.Models.GenerateContent(ctx,"gemini-2.5-flash",genai.Text("Explain how AI works in a few words"),nil,)iferr!=nil{log.Fatal(err)}fmt.Println(result.Text())}
جاوا
packagecom.example;importcom.google.genai.Client;importcom.google.genai.types.GenerateContentResponse;publicclassGenerateTextFromTextInput{publicstaticvoidmain(String[]args){Clientclient=newClient();GenerateContentResponseresponse=client.models.generateContent("gemini-2.5-flash","Explain how AI works in a few words",null);System.out.println(response.text());}}
سی شارپ
usingSystem.Threading.Tasks;usingGoogle.GenAI;usingGoogle.GenAI.Types;publicclassGenerateContentSimpleText{publicstaticasyncTaskmain(){varclient=newClient();varresponse=awaitclient.Models.GenerateContentAsync(model:"gemini-2.5-flash",contents:"Explain how AI works in a few words");Console.WriteLine(response.Candidates[0].Content.Parts[0].Text);}}
استراحت
curl"https://generativelanguage.googleapis.com/v1beta/models/gemini-2.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 in a few words" } ] } ] }'
تاریخ آخرین بهروزرسانی 2025-12-10 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-12-10 بهوقت ساعت هماهنگ جهانی."],[],[]]