Actions16
- Content Actions
- Cached Content Actions
- Embedding Actions
- File Actions
- Model Actions
- Token Actions
Content → Generate Content
AI-generatedSummary
Generate text or multimodal content using a specified Gemini AI Studio model with flexible input formats and advanced generation options.
Inputs
- Model (required) — Specify the Gemini model ID or resource name to use for content generation, e.g., 'gemini-flash-latest'.
- Input Mode (required) — Choose the input format: 'Simple Text' (a plain prompt with optional multimodal parts), 'Contents JSON' (structured contents array), or 'Raw Request JSON' (full request body).
- Prompt (required) — Provide the text prompt when using 'Simple Text' input mode; multiline text is supported.
- Multimodal Parts — Optionally add binary inlineData or fileData parts to the prompt when using 'Simple Text' input mode, referencing input binary properties or Gemini Files API URIs.
- Contents (JSON) (required) — A JSON array representing Gemini contents with text, inlineData, fileData, and roles when 'Contents JSON' input mode is selected.
- Raw Request Body (JSON) (required) — Provide the complete JSON request body sent to the Gemini API when 'Raw Request JSON' input mode is selected.
- System Instruction — Optional system instruction text sent as system_instruction.parts[0].text to guide the model behavior.
- Options — Collection of advanced generation options including cached content reference, candidate count, various penalties, generationConfig JSON, function declarations, output tokens limit, safety settings, response MIME type and schema, temperature, stop sequences, thinking budget/level, tool config, and more.
Output shape
A single JSON object containing generated content text, an array of candidate texts, model info, finish reason, and the full raw API response.
The output JSON includes the key 'text' for the primary generated content string, 'texts' as all candidate texts returned, 'finishReason' indicating why generation stopped, 'model' showing the model used, and 'response' holding the entire Gemini API response for detailed inspection.
Examples
Example 1: Generate a text completion from a simple prompt using the default Gemini Flash model.
Set Model to 'gemini-flash-latest', Input Mode to 'Simple Text', enter the prompt text, and optionally add advanced options like max output tokens or temperature. Execution returns the generated text and metadata in JSON.