CLI reference
The gseai command-line tool lets you interact with the server without writing
any Python.
Authentication
Every command requires a bearer token. Set it once as an environment variable so you don’t have to type it on every call:
export GSEAI_API_TOKEN=your-api-token
You can also pass it inline with -t / --token.
Global options
These options apply to every command and must come before the subcommand.
gseai [OPTIONS] COMMAND [ARGS]...
Flag |
Env var |
Description |
|---|---|---|
|
|
Bearer auth token (required) |
|
|
Server hostname (default: |
|
|
Server port (default: |
|
|
Request timeout in seconds (default: no timeout) |
Models
gseai models # one model ID per line
gseai models -j # raw JSON
Chat
Single-turn chat with a plain-text prompt:
gseai chat gemma-4-e2b-it "What is machine learning?"
# Read the prompt from a file
gseai chat gemma-4-e2b-it -f prompt.txt
# Interactive session (multi-turn, retains conversation history)
gseai chat gemma-4-e2b-it -i
# Interactive with a system prompt and streaming
gseai chat gemma-4-e2b-it -i -s "You are a concise tutor." -S
Type exit or press Ctrl+C to end an interactive session.
Flag |
Description |
|---|---|
|
Read the prompt from a file |
|
Start a multi-turn chat session, retaining conversation history |
|
System prompt |
|
Sampling temperature (0–2) |
|
Maximum tokens to generate per turn |
|
Stream tokens as they arrive |
|
Print full JSON response (single-turn only) |
Completions
Legacy text completion (no chat structure):
gseai completions gemma-4-e2b-it "Once upon a time"
Accepts the same -t, -m, -S, -j flags as chat.
Embeddings
gseai embeddings nomic-embed-text "Hello world"
# model: nomic-embed-text
# dimensions: 768
# values: [0.0142, -0.0317, ...]
gseai embeddings nomic-embed-text "Hello world" -j # full JSON
Audio
transcribe
Transcribe an audio file to text using Whisper:
gseai audio transcribe whisper recording.mp3
gseai audio transcribe whisper lecture.mp3 -l fr # French source
gseai audio transcribe whisper lecture.mp3 -f srt # SRT subtitles
Flag |
Description |
|---|---|
|
Source language code (e.g. |
|
Context hint passed to the model |
|
Response format: |
|
Print full JSON (equivalent to |
translate
Transcribe and translate to English in one step:
gseai audio translate whisper french_lecture.mp3
Accepts the same -p, -f, -j flags as transcribe.
speech
Synthesize speech from text (requires a TTS model):
gseai audio speech tts-model "Hello, world" -o hello.mp3
Flag |
Description |
|---|---|
|
Output file path (default: |
|
Voice identifier |
|
Playback speed (default: |
Images
generate
Generate an image from a text prompt:
gseai images generate stable-diffusion "a red barn in a snowy field"
gseai images generate stable-diffusion "a red barn" -o barn.png -n 3
When --n is greater than 1 the output filenames are numbered:
barn_1.png, barn_2.png, etc.
Flag |
Description |
|---|---|
|
Output file path (default: |
|
Number of images to generate (default: |
|
Image dimensions, e.g. |
|
Diffusion steps |
|
Random seed for reproducibility |
|
Print raw JSON response |
edit
Edit an existing image guided by a text prompt:
gseai images edit stable-diffusion photo.png "replace the sky with a sunset"
gseai images edit stable-diffusion photo.png "repaint the sky" -m mask.png
Flag |
Description |
|---|---|
|
Greyscale mask image (white = area to edit) |
|
Output file path (default: |
|
Number of variants |
|
Output dimensions |
|
Print raw JSON response |
variation
Generate variations of an existing image:
gseai images variation stable-diffusion photo.png -n 3
Flag |
Description |
|---|---|
|
Output file path (default: |
|
Number of variations (default: |
|
Output dimensions |
|
Print raw JSON response |