jennifer registry

@deckyard/gemini

A client for the Google Gemini API: generate content with tools, structured output and thinking, embeddings, files, context caching

geminigooglellmaichat

Depend on it

[decks]
"@deckyard/gemini" = "^0.2.0"

Versions

VersionStatusKindPinRequiresEnginesCapabilities
0.2.0livegit485d30024478-jennifer >=0.28.0net
0.1.0livegit2aa5d15090bb-jennifer >=0.26.0net

License

LGPL-3.0-only

Source

Released from
0.2.0
Published under
@deckyard mplx
Repository owner
deckyard

Resolutions

Times a client asked this registry where to find this deck. Not downloads: the registry only stores metadata, and the code is fetched from its repository directly, so we never see an install and cannot count one. Repeated builds inflate these numbers; installs from an existing lockfile do not appear at all. Counted in UTC.

Readme

@deckyard/gemini

test Documentation release

A client for the Google™ Gemini™ API as Google AI Studio serves it, for Jennifer programs: generate content from text and media with a system instruction, function calling and a tool loop that keeps thought signatures, structured output, thinking and safety settings; count tokens; embeddings; model listing; the Files API for large media; context caching. Requests and replies are Google's own JSON, every request has a deadline and a reply cap, and rate limits are retried with backoff.

Documentation

Install

jvc add @deckyard/gemini

This vendors the deck to vendor/@deckyard/gemini/. Without jvc, unpack the src/ subtree of a release archive (deckyard-gemini-<version>.tar.gz) there.

Usage

import "@deckyard/gemini/" as gemini;
use io;
use json;
use os;

def c as gemini.Client init gemini.client(os.getEnv("GEMINI_API_KEY"));
def req as json.Value init gemini.newRequest("gemini-3.8-flash");
$req = gemini.withSystem($req, "Answer in one sentence.");
$req = gemini.addUserText($req, "Why is the sky blue?");
io.printf("%s\n", gemini.text(gemini.chat($c, $req)));

A key comes from Google AI Studio; the free tier needs no billing account. The examples in examples/ (a conversation, a tool loop, a file upload) read it from GEMINI_API_KEY.

Requirements

Jennifer 0.28.0 or newer, the default binary: the deck opens network connections (capability net), so it does not load on jennifer-tiny. No streaming yet (it waits for streaming http); no Vertex AI™ yet.

Development

tools/check-all.sh                   # the full gate, as CI runs it
jennifer test src/gemini_test.j      # the test overlay, against a loopback fake
tools/check-docs.sh                  # docs against the code
tools/pack.sh dist                   # build the release archive

Trademarks

Google™, Gemini™ and Vertex AI™ are trademarks of Google LLC. Other product and company names may be trademarks of their respective owners. They are used only to identify the products this deck works with. This deck is an independent project, not affiliated with, sponsored or endorsed by Google LLC.

Licence

LGPL-3.0-only, see LICENSE. Copyright (C) 2026 mplx <[email protected]>.

This deck as JSON