Skip to content
tgpt

Command-line tools

Use tgpt with Shannon

Run tgpt with the openai provider, Shannon's chat completions URL, a model and your key for quick answers on Shannon models.

  • Tested Nov 7, 2026
  • OpenAI Chat Completions
  • About 1 min

About tgpt

tgpt is a single Go binary for chatting with models in the terminal, with one-shot answers, an interactive mode and shell-command help. Its openai provider takes a custom URL, model and key, so it can answer with Shannon models.

What you need

A Shannon API key
Keys & usage
Base URL
https://api.shannon-ai.com/v1 Endpoint: /v1/chat/completions
Every snippet below follows your choice.

Set it up

  1. Ask a question

    --url takes the full endpoint, including /chat/completions.

    Shell
    tgpt --provider openai \
      --url https://api.shannon-ai.com/v1/chat/completions \
      --model shannon-3 \
      --key YOUR_API_KEY \
      "Name three colours a cat can be."
    tgpt with the openai provider and Shannon's chat completions URL answering which colours a cat can be
    A real run on tgpt 2.15.0 with the flags above.
  2. Or set it once in the environment

    AI_PROVIDER and AI_API_KEY replace the flags; keep the URL and model on the command line or in an alias.

    Shell
    export AI_PROVIDER=openai AI_API_KEY=YOUR_API_KEY
    alias tshannon='tgpt --url https://api.shannon-ai.com/v1/chat/completions --model shannon-3'

Check that it works

Send: tgpt -q --provider openai --url … "Say hi to a dog."

You should see: A one-line greeting.

Models that fit tgpt

Every id below meets what tgpt needs. The first one is the default in the snippets.

Model idContext windowMax outputImage input
shannon-3 196,608 65,536 Yes
shannon-3-pro 196,608 65,536 Yes
Kimi-K3-uncensored-3BIT-REAP 225,280 225,280 Yes
Kimi-K3-uncensored-NVFP4 1,022,976 262,144 Yes

Good to know

  • Without --provider openai, tgpt uses its own default provider and never reaches Shannon.
  • --url must be the full chat completions URL, not the /v1 base.

Tips

  1. -q prints only the answer, without the loading animation.
  2. -w prints the whole answer at once instead of streaming it.
  3. -s turns a request into a shell command and asks before running it.

Troubleshooting

SymptomCauseFix
404 Not Found --url is the /v1 base. Add /chat/completions.
An answer from another service --provider is missing. Pass --provider openai or set AI_PROVIDER=openai.
401 Unauthorized The key is missing, mistyped or rotated. Copy the key again from Keys & usage; it starts with sk-.
context_length_exceeded / "prompt is too long" The conversation is longer than the model's window. Start a new chat, let the tool compact it, or pick a model with a larger window.
insufficient_quota Your balance cannot pay for the request. Top up or change plan; the request is not retried by itself.

Questions

Does tgpt work with Shannon?

Yes, with --provider openai and --url https://api.shannon-ai.com/v1/chat/completions.

Does it stream?

Yes, by default; -w waits for the whole answer.

Choose your language

All languages are equal. Pick the one you want to browse in.

Europe

Middle East & North Africa

South Asia

Southeast Asia

East Asia

Central Asia & Caucasus

Africa

Oceania

Constructed & Classical