This library provides a Common Lisp interface to Google's Gemini Large Language Models.
You can obtain an API key from the Google AI Studio.
Put your default project in ~/.config/googleapis/default-project and put your
API key in ~/.config/googleapis/{default-project}/apikey.
or
Put your API key in ~/.config/googleapis/default-api-key
or
Define the GOOGLE_API_KEY environment variable with the value of your API key.
This library depends on:
alexandriacl-jsondexadorfunctionfoldnamed-letseriesuiop
Ensure these have been quickloaded or are available in your Quicklisp local-projects or via ASDF.
Load the library using Quicklisp or ASDF:
(ql:quickload "gemini")
;; or
(asdf:load-system "gemini")To generate text from a prompt:
(gemini:invoke-gemini "gemini-2.5-flash" "In one sentence, explain how AI works to a child.")
;; => "AI is like a super smart computer brain that learns from information to answer questions and do tasks."You can use other models like "gemini-2.5-pro" as the first argument.