The latest Gemini models, like
Gemini 3.5 Flash , are available to use with Firebase AI Logic!
Learn more. Gemini 2.0 Flash and Flash-Lite models were shut down on
June 1, 2026 . To avoid service disruption, update to a newer model like
gemini-3.1-flash-lite.
Learn more. All Imagen models will shut down on
June 24, 2026 .
Learn about migrating your apps to use Nano Banana.
Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
发送反馈
了解提示设计
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
点击您的 Gemini API 提供商,以查看此页面上特定于提供商的内容和代码。
Gemini Developer API
Vertex AI Gemini API
向生成式模型发出请求时,您需要随请求一起发送 提示 。通过精心设计这些提示,您可以影响模型,使其生成满足您需求的输出。
Gemini 模型的提示
Gemini 模型的提示可以包含问题、
说明、语境信息、少样本示例以及
模型完成或继续的部分输入。
如需了解提示设计,请参阅 Gemini Developer API 文档:
Imagen 模型的提示 (已废弃)
如需了解 Imagen ,请参阅
特定提示策略和选项
控制内容生成的其他选项
发送反馈
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可 获得了许可,并且代码示例已根据 Apache 2.0 许可 获得了许可。有关详情,请参阅 Google 开发者网站政策 。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2026-06-18。
需要向我们提供更多信息?
[[["易于理解","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"]],["最后更新时间 (UTC):2026-06-18。"],[],[]]