Jump to content

Using Pulsed Media AI Credits on Any Linux Server

From Pulsed Media Wiki

The AI credits your Pulsed Media services earn are not tied to your seedbox. The key works from any machine: a VPS, a home server, a work laptop running Linux. Access depends on the key alone; the address it comes from matters only for the rate limits under Limits. Every example on this page was run on 18 October 2026 on fresh Debian 13 servers; apart from the apt install lines, all of it ran as an ordinary user without root. The five test answers (curl, Python, Codex, Claude Code and Gemini CLI) used 8,656 credits together. One euro of allowance is 1,000,000 credits, so the whole round cost under one cent of allowance.

At a glance

Tool Without root With root (Debian, Ubuntu)
curl Usually already installed apt install curl
Python with the OpenAI library A virtual environment in your home directory apt install python3-venv first
Codex Release 0.93.0 binary in ~/.local/bin The same binary in /usr/local/bin
Claude Code Official installer, into ~/.local/bin The same; the installer works per user
Gemini CLI Node.js archive in ~/.local/node, then npm apt install nodejs npm on Debian 13; the archive elsewhere
Pikkumies Its installer, in your account, once the server has git, PHP with curl and libatomic apt install git php-cli php-curl libatomic1 first

Put the key on the server

Copy the key from the Virsilipas AI key page in the client area. On the server, save it in the same file a seedbox uses, readable only by you:

umask 077
read -rs KEY        # paste the key, press Enter; nothing is shown
printf 'endpoint=https://virsilipas.mcx.fi/v1\nkey=%s\n' "$KEY" > ~/.virsilipasKey
unset KEY

The file has two lines, endpoint= and key=, and mode 600. Pikkumies reads it as it is, and every command on this page and on the Pulsed Media AI Credits page reads the key from it, so the key never sits in your shell history.

Test it with curl

KEY=$(sed -n 's/^key=//p' ~/.virsilipasKey)
curl https://virsilipas.mcx.fi/v1/chat/completions \
  -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' \
  -d '{"model": "default", "messages": [{"role": "user", "content": "Say hello."}]}'
curl https://virsilipas.mcx.fi/v1/balance -H "Authorization: Bearer $KEY"

The first answer is in choices[0].message.content. /v1/balance shows the credits left and the limits on your key. default is one of the model aliases; the model list has the others and what each costs.

Python

Any OpenAI-compatible library works; this is the official OpenAI one, installed in a virtual environment in your home directory:

python3 -m venv ~/ai-venv
~/ai-venv/bin/pip install openai

Save this as hello.py:

import pathlib
from openai import OpenAI

conf = dict(line.split("=", 1) for line in pathlib.Path.home().joinpath(".virsilipasKey").read_text().split())
client = OpenAI(base_url=conf["endpoint"], api_key=conf["key"])
reply = client.chat.completions.create(model="default", messages=[{"role": "user", "content": "Say hello."}])
print(reply.choices[0].message.content)

Run it with ~/ai-venv/bin/python hello.py. If python3 -m venv stops with "ensurepip is not available", the server lacks the venv module: apt install python3-venv as root, or ask the server's admin.

Codex

The credit service speaks the chat completions format. Newer Codex releases no longer accept it; release 0.93.0 does, and it is a single file to download:

mkdir -p ~/.local/bin
curl -fsSLo /tmp/codex.tar.gz https://github.com/openai/codex/releases/download/rust-v0.93.0/codex-x86_64-unknown-linux-musl.tar.gz
tar -xzf /tmp/codex.tar.gz -C ~/.local/bin
mv ~/.local/bin/codex-x86_64-unknown-linux-musl ~/.local/bin/codex

On an ARM server, use aarch64 in place of x86_64 in both names. With root, install it once for every user instead: tar -xzf /tmp/codex.tar.gz -C /tmp && install -m 0755 /tmp/codex-x86_64-unknown-linux-musl /usr/local/bin/codex.

Add the key to ~/.bashrc:

export VIRSILIPAS_API_KEY="$(sed -n 's/^key=//p' ~/.virsilipasKey)"

and put this in ~/.codex/config.toml (the first two lines must come before any [section] line):

model_provider = "virsilipas"
model = "default"

[model_providers.virsilipas]
name = "Pulsed Media AI credits"
base_url = "https://virsilipas.mcx.fi/v1"
env_key = "VIRSILIPAS_API_KEY"
wire_api = "chat"

Open a new shell and start codex, or for one answer without the interface: codex exec --skip-git-repo-check "Say hello."

Claude Code

Download the official installer, read it if you like, then run it as the user who will use Claude Code. It installs into ~/.local/bin and needs no root:

curl -fsSLo /tmp/claude-install.sh https://claude.ai/install.sh
bash /tmp/claude-install.sh

Then add these lines to ~/.bashrc and open a new shell:

export PATH="$HOME/.local/bin:$PATH"
export ANTHROPIC_BASE_URL="https://virsilipas.mcx.fi"
export ANTHROPIC_AUTH_TOKEN="$(sed -n 's/^key=//p' ~/.virsilipasKey)"
export ANTHROPIC_MODEL="default"
export ANTHROPIC_DEFAULT_OPUS_MODEL="default"
export ANTHROPIC_DEFAULT_SONNET_MODEL="default"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="default"

Start claude, or claude -p "Say hello." for one answer. Tested with Claude Code 2.1.302. What works on credits and what does not (images, web search, which aliases) is the same as on a seedbox: see Claude Code on AI credits.

Gemini CLI

Gemini CLI needs Node.js 20 or newer. On Debian 13, root can install it with apt install nodejs npm; Debian 12 and Ubuntu 24.04 ship Node.js 18, which is too old. Without root, or on those releases, unpack the official Node.js 22 archive into your home directory:

NODE=$(curl -fsSL https://nodejs.org/dist/latest-v22.x/ | grep -o 'node-v22[0-9.]*-linux-x64.tar.xz' | head -1)
mkdir -p ~/.local/node
curl -fsSLo /tmp/node.tar.xz "https://nodejs.org/dist/latest-v22.x/$NODE"
tar -xJf /tmp/node.tar.xz -C ~/.local/node --strip-components=1
export PATH="$HOME/.local/node/bin:$PATH"
npm install -g @google/gemini-cli

On an ARM server, use linux-arm64 in place of linux-x64. With Node.js in your home directory, npm install -g installs there too, without root.

Add to ~/.bashrc (the first line only if you used the archive):

export PATH="$HOME/.local/node/bin:$PATH"
export GOOGLE_GEMINI_BASE_URL="https://virsilipas.mcx.fi"
export GEMINI_API_KEY="$(sed -n 's/^key=//p' ~/.virsilipasKey)"

and put this in ~/.gemini/settings.json:

{
  "security": {"auth": {"selectedType": "gemini-api-key"}},
  "model": {"name": "default"},
  "modelConfigs": {"customOverrides": [{"match": {"overrideScope": "core"}, "modelConfig": {"model": "default"}}]},
  "agents": {"overrides": {"codebase_investigator": {"modelConfig": {"model": "inherit"}},
                           "cli_help": {"modelConfig": {"model": "inherit"}}}}
}

Open a new shell and start gemini, or gemini -p "Say hello." for one answer. Tested with Gemini CLI 0.64.0. What each setting does is explained in Gemini CLI on AI credits.

Pikkumies

Pikkumies is the open-source helper that runs on your credits, and it finds the key in ~/.virsilipasKey by itself. It installs into your own account without root, but the server needs four things first: git, PHP 7.3 or newer with its curl extension, the libatomic library, and about 2 GB of free disk. On Debian or Ubuntu, root adds them with:

apt install git php-cli php-curl libatomic1

Then, as your own user:

curl -fsSLo install-pikkumies.sh https://raw.githubusercontent.com/MagnaCapax/mcxPikkumies/main/install.sh
bash install-pikkumies.sh
pikkumies doctor

The installer builds the agent runtime in the background; pikkumies doctor shows the progress, and when the build is done, pikkumies starts a conversation. A Pulsed Media seedbox has all four already; the minimal Debian 13 test server lacked the curl extension and libatomic. Without the curl extension, doctor shows provider: not reachable (HTTP 0). Without libatomic, the runtime build stops, doctor shows "incomplete build", and ~/pikkumies/local/install.log names libatomic.so.1; installing the package and running pikkumies install builds it again.

Limits

Each key has its own limits on requests running at once and requests per minute; /v1/balance shows them. From outside Pulsed Media's network, each address can also send up to 10 requests a second, with short bursts of up to 200, and hold 64 connections open. Beyond that the answer is HTTP 429 with rate_limit_exceeded and a Retry-After of one second. These numbers can change.

Troubleshooting

invalid key (HTTP 401)
The key in ~/.virsilipasKey is wrong, or it was replaced with Get a new key in the client area. Copy the current key into the file again.
command not found after installing
~/.local/bin (or ~/.local/node/bin) is not in your PATH yet. Add the export PATH= line above to ~/.bashrc and open a new shell.
Codex stops at startup with a config error about wire_api
A newer Codex release is running. Check with codex --version; it must print 0.93.0.
Gemini CLI says "Invalid auth method selected."
~/.gemini/settings.json is missing the selectedType line or is not valid JSON.
Gemini CLI will not install or start
Run node -v. Gemini CLI needs version 20 or newer; below that, use the Node.js 22 archive above.

Keep the key safe

Anyone with the key can spend your credits. Keep ~/.virsilipasKey at mode 600, and never put the key in a web folder, a git repository or a file you share. If it may have leaked, Get a new key on the client-area page stops the old key at once. How requests are handled is described under Privacy.

The credits come with every Pulsed Media service you pay for, and on a Pulsed Media seedbox the three coding tools are already installed: see what each plan earns.

See also