Skip to main content

AI Agents

This page is the entry point for AI agents (Claude, ChatGPT, Cursor, in-house copilots, …) integrating with Lium. Everything else in the Developers section also applies to agents — this page just stitches the pieces together.

Prefer to work from a single file? lium.io/llms-full.txt is the whole agent reference in one fetch — install, signup, the agent skill, and every CLI and SDK command — enough to go from no account to a rented GPU without reading anything else.

Get started in 5 min

The CLI is the preferred surface for an agent: it covers signup, funding, renting and SSH, so there is no web form to fill and no HTTP to hand-roll. Drop to the REST API only where the CLI cannot go — no shell in your sandbox, or an endpoint it does not wrap.

  1. Install the CLI and get an account:
    curl -fsSL https://lium.io/install.sh | bash
    lium signup --email you@example.com # no account yet
    lium init --no-browser # account exists — prints an approval URL
  2. Rent a GPU and connect:
    lium ls --format json     # browse machines
    lium up <node-id> --yes # rent
    lium ssh <pod> # connect
  3. Ground yourself in the docs — add the MCP server for targeted search:
    {
    "mcpServers": {
    "lium-docs": { "url": "https://docs.lium.io/mcp" }
    }
    }
    Or pull the whole corpus in one fetch: curl -sSL https://docs.lium.io/llms-full.txt.
  4. Call the REST API for anything the CLI does not cover:
    curl -sSL https://lium.io/api/openapi.json

Pick the right surface

GoalUse thisWhy
Answer questions about Lium docsMCP endpointhttps://docs.lium.io/mcpTargeted search + page reads, no token bloat
Ground a long conversation in the full docsllms.txt / llms-full.txtOne fetch, every page concatenated
Read a single page as raw markdownAppend .md to any URL — e.g. /providers/quickstart.mdNo HTML to parse
Call an endpoint the CLI does not wrapOpenAPI spechttps://lium.io/api/openapi.jsonSource of truth for every REST endpoint
Drive pods from a shell agentCLIStable subcommands, JSON output, no auth headers to manage
Get an account with no human in the loopFingerprint signupPOST https://lium.io/api/auth/signupNo email or confirmation click; returns the login fingerprint and normally an API key
Take a user from no account to an API keylium signupCreates the account and mints its key from the terminal — no web form
Teach your agent Lium's commands onceAgent skillnpx skills add Datura-ai/lium-skill --skill liumShips with the agent, so no doc fetch mid-task
Automate the provider portal (Subnet 51)lium providerSame surface as lium.io/portal: node lifecycle, central-miner-server config, sync, billing, machine requests — all --json-able
Write code against typed Python clientsSDKlium.machine decorator + Lium() client

Stable agent-facing URLs

These URLs are stable and safe to hard-code in agent configurations:

https://docs.lium.io/mcp                  # docs MCP JSON-RPC endpoint
https://docs.lium.io/llms.txt # docs index + summaries
https://docs.lium.io/llms-full.txt # all docs concatenated
https://docs.lium.io/<any-page>.md # raw markdown for any page
https://lium.io/api/openapi.json # live platform OpenAPI 3.1 spec
https://lium.io/documents # Swagger UI for the same spec
https://lium.io/llms.txt # platform agent index: CLI + skill install
https://lium.io/llms-full.txt # full CLI/SDK reference, self-contained

Start from no account

An agent creates the account itself — no web form. There are two paths, and the choice decides whether a human has to step in at all.

Fingerprint — fully autonomous

One unauthenticated POST creates the account and returns its login fingerprint. It also returns an API key ready for the X-API-Key header when key minting succeeds; api_key is null when minting fails, without rolling back the account. No email address, mailbox or confirmation click is required.

curl -fsS -X POST https://lium.io/api/auth/signup \
-H "Content-Type: application/json" -d '{}'

Despite the name, a fingerprint is not a passkey, WebAuthn or biometrics — it is a random 32-character string, returned exactly once, that is both the dashboard login and the only way back into the account. Store it before you do anything else. Trade-offs: no password reset (lose the string and the account is gone) and no email notifications.

Full recipe, response fields and rate limits: Signing up without an email.

Email — needs a human once

lium signup creates the account and stores its API key. Ask for the user's real email because the confirmation link, password resets and account messages go there. Email confirmation does not gate renting.

lium signup --email you@example.com --json

Either way, a new account may get a $5 credit only when the platform has free credit enabled and no other account has claimed it from that signup IP. Read signup_credit_granted from the response rather than assuming it landed, then check the balance before renting.

Signup to running pod, end to end

No browser step and no confirmed email anywhere in this path — balance is the only gate.

lium signup --email you@example.com --json    # or POST /api/auth/signup for no email at all
lium balance --json # must exceed 15 min of the node's hourly price
lium ls --format json # pick a node
lium up <node-id> --yes --no-ssh --ttl 15m # rent it, return at once, auto-terminate after 15m
lium exec <pod> "nvidia-smi" # run something on it
lium rm <pod> # hand it back

Authentication

The platform API authenticates with an API key, sent in the X-API-Key header on every request; the CLI stores the key and sends it for you. The docs surfaces (MCP, llms.txt, .md URLs) require no auth.

lium signup mints and stores the key for a new account. For an account that already exists, lium init --no-browser prints an approval URL and a session ID; once the user has approved it, lium init --session <ID> saves the key. Plain lium init opens a browser and is not usable by an agent. A key copied from Settings → API Keys at lium.io works too.

export LIUM_API_KEY=your_api_key_here
curl https://lium.io/api/pods -H "X-API-Key: $LIUM_API_KEY"

Self-funding (top up your own balance)

An agent with its own crypto wallet can keep itself funded without a human. Use lium topup: create a stablecoin invoice, read the deposit address, send the funds from your wallet, then poll the balance. Every subcommand supports --json.

# 1. Create a $20 USDT (TRON) invoice; capture the address + exact amount
INVOICE=$(lium topup create -a 20 -c USDT -n tron --json)
ADDRESS=$(echo "$INVOICE" | jq -r .deposit_address)
AMOUNT=$(echo "$INVOICE" | jq -r .crypto_amount)

# 2. Send exactly $AMOUNT USDT on TRON to $ADDRESS from your own wallet.
# Lium never moves your funds — only you can sign this transfer.

# 3. Poll until the credit lands
lium balance --json

Lium issues the invoice and credits the balance once the payment is confirmed on-chain; the transfer itself stays in your wallet. See lium topup for currency discovery and the full invoice response.

  1. Install the CLI and authenticate — fingerprint signup (POST /api/auth/signup) for a new account with nobody to ask, lium signup when the user wants an email account, lium init --no-browser for an existing one.
  2. Drive the platform with lium commands, reading results as JSON.
  3. Drop to the REST API only where the CLI has no equivalent: resolve the endpoint from the OpenAPI spec and send X-API-Key.
  4. Pull context from MCP search — or feed llms-full.txt once — when you need to explain or troubleshoot rather than act.