
StructuredOutputCompletion
See Gemini API about structured output completion for more information.
See Gemini API about structured output completion for more information.
Generate Structured JSON Output Using the Gemini Client.
See Gemini API about structured output completion for more information.
type: "io.kestra.plugin.gemini.StructuredOutputCompletion"Examples
Structured JSON Output Completion using the Gemini Client.
id: gemini_structured_json_completion
namespace: company.team
tasks:
- id: gemini_structured_json_completion
type: io.kestra.plugin.gemini.StructuredOutputCompletion
apiKey: "{{ secret('GEMINI_API_KEY') }}"
model: "gemini-2.5-flash-preview-05-20"
prompt: What are the weather predictions for tomorrow in London?
jsonResponseSchema: |
{
"type": "object",
"properties": {
"predictions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"content": {
"type": "string"
}
}
}
}
}
}
Properties
apiKey*Requiredstring
Gemini API Key
jsonResponseSchema*Requiredstring
jsonResponseSchema
model*Requiredstring
Model
Specifies which generative model (e.g., 'gemini-1.5-flash', 'gemini-1.0-pro') to use for the completion.
prompt*Requiredstring
Prompt
Outputs
predictionsarray
List of text predictions made by the model.
Metrics
candidate.token.countcounter
The number of candidate tokens generated by the Gemini model.
prompt.token.countcounter
The number of tokens used in the input prompt.
total.token.countcounter
The total number of tokens processed by the Gemini model (prompt + generated).