Gemini (Kie.ai) icon

Gemini (Kie.ai)

Chat with Gemini models (2.5 Flash, 2.5 Pro, 3 Pro, 3.1 Pro) via Kie.ai API

Gemini (Kie.ai)

AI-generated

Summary

Send a chat completion request to a selected Gemini model (2.5 Flash, 2.5 Pro, 3 Pro, or 3.1 Pro) via the Kie.ai API, using a given user message plus optional system prompt, image URL, Google Search grounding, and chat history to generate a conversational response.

Inputs

  • model (required) — Select the Gemini model to use for chat completions: Gemini 3.1 Pro, Gemini 3 Pro, Gemini 2.5 Pro, or Gemini 2.5 Flash.
  • userMessage (required) — The user message text to send to the Gemini model as the main input.
  • systemPrompt — Optional system instructions or developer prompt to guide the model's behavior during the conversation.
  • imageUrl — Optional image URL to include alongside the user message for multimodal input (supported by the model).
  • googleSearch — Boolean flag to enable Google Search grounding for real-time information (cannot be used with custom tools).
  • includeThoughts — Boolean flag to include the model's reasoning or thoughts in the response (only supported for Flash or 2.5 Pro models).
  • chatHistory — Optional JSON array of prior conversation messages to continue the chat context. Format: [{"role":"user","content":[{"type":"text","text":"..."}]},{"role":"assistant","content":[{"type":"text","text":"..."}]}].

Output shape

a JSON array containing one object per input item, including fields for the original API response, the model used, the assistant's reply text, and the updated chat history

The response is non-streaming and always returns a single assistant reply per invocation. The updated chat history includes all prior messages plus the new user and assistant messages, suitable for chaining conversational calls. Errors are propagated or optionally captured when 'continueOnFail' is enabled.

Links

Discussion