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
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. lium signup creates it and stores the API key it mints. New accounts usually get a $5 credit, enough to rent straight away, but it is granted once per signup IP — read signup_credit_granted from the --json output rather than assuming it landed.

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

Ask for the user's real email: the confirmation link goes there, and clicking it is the one step an agent cannot do for them — renting fails with 403 User is not verified until they do.

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 — lium signup for a new 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.