FluxyAPIFluxyAPI
BlocksAI & Machine Learning

Gemini

Integrate Google's Gemini models into your endpoint flow.

Gemini Block

The Gemini Block allows your API to communicate with Google's Gemini language models (e.g., gemini-1.5-pro, gemini-1.5-flash). It is designed for multi-turn conversations and high-performance language processing.

Configuration

FieldRequiredDescription
API KeyYour Google Gemini API key.
ModelThe Gemini model identifier.
User PromptThe text query for the model.
System PromptSystem instructions to guide the model's output.
Enable HistoryEnable to string together multi-turn interactions.

History Settings

If Enable History is active:

  • Storage Object Variable (Required): The object variable storing the conversation data.
  • Chat ID: Used to separate different user sessions.
  • Message Count: Defines how much context is sent.

Advanced Settings

Toggle Advanced Settings for model tuning:

  • Temperature: Adjusts creativity.
  • Max Output Tokens: Defines maximum response length.
  • Top P: Nucleus sampling parameter.

Output Variable

Specify a Variable Name to store the result.

Success Payload

{
  "success": true,
  "chat_id": "chat_1234abc",
  "message": "The assistant's response...",
  "raw_response": {
    "candidates": [...]
  }
}

Error Payload

If an error occurs, the variable will be populated with:

{
  "error_key": "UNAUTHENTICATED",
  "error_message": "The provided API Key is invalid or expired."
}

Error Handling

  • API_KEY_MISSING / SECRET_ERROR — Missing or invalid API key.
  • MODEL_MISSING — No model was specified.
  • PROMPT_MISSING — The user prompt was empty.
  • HISTORY_VAR_MISSING — History was enabled but no storage object was provided.
  • RUNTIME_ERROR — An unexpected issue occurred during the API call.
  • UNAUTHENTICATED / RESOURCE_EXHAUSTED / RATE_LIMIT_EXCEEDED / INVALID_ARGUMENT / MODEL_NOT_FOUND / SAFETY — Standard Gemini API errors.

On this page