SDKs
Rust CLI
solvela-cli — command-line tool for interacting with the Solvela gateway
Installation
cargo install solvela-cliOr build from the monorepo:
cargo build --release -p solvela-cli
# Binary at: target/release/solvelaConfiguration
The CLI reads these environment variables:
export SOLVELA_API_URL=https://api.solvela.ai # optional; default https://api.solvela.ai
export SOLANA_RPC_URL=https://api.mainnet-beta.solana.com # required for any paid command (signs USDC-SPL tx)SOLANA_RPC_URL is required whenever the CLI has to sign a payment
(solvela chat, solvela recover). The public Solana endpoint above
works for a smoke test, but its rate limits will throttle real usage —
point at your own Helius/QuickNode/Triton RPC for anything beyond that.
The wallet is not read from an environment variable — there is no
SOLVELA_SOLANA_PRIVATE_KEY or similar. The CLI loads the keypair from
~/.solvela/wallet.json on every paid command. Initialize one with
solvela wallet init (see solvela wallet below) and fund
the printed address with USDC-SPL + a small amount of SOL before signing.
Commands
solvela chat
Send a chat completion request.
solvela chat "Explain Solana in one sentence."
# Specify a model (use the canonical provider/model_id form, or a known alias)
solvela chat --model openai/gpt-4o "Explain Solana in one sentence."
solvela chat --model sonnet "Explain Solana in one sentence."
# Use a routing profile (eco, auto, premium, free)
solvela chat --model auto "Complex analysis task..."
# Skip the cost-confirmation prompt (for scripted use)
solvela chat --yes "Write a short story about a Rust programmer."
# Force a specific payment scheme. The `solvela` CLI defaults to escrow when
# the gateway advertises it, falling back to exact. (Note: the `solvela-client`
# Rust SDK library is the opposite — it defaults to `exact` and treats escrow as
# opt-in via `ClientBuilder::prefer_escrow(true)`, since escrow adds a per-call
# claim fee.)
solvela chat --scheme exact "Quick one-shot question."solvela models
List available models with pricing.
solvela modelssolvela health
Check gateway health and Solana RPC connectivity.
solvela healthsolvela wallet
Manage the local wallet at ~/.solvela/wallet.json. Three subcommands:
solvela wallet init # Generate a new Solana keypair and print the address to fund
solvela wallet status # Show address + USDC-SPL balance
solvela wallet export # Print the base58 secret key (handle with care)solvela stats
Show gateway usage statistics for your wallet.
solvela statssolvela doctor
Diagnose common configuration issues.
solvela doctorExample session
$ solvela health
Checking gateway at https://api.solvela.ai...
Status: ok
$ solvela models
MODEL PROVIDER INPUT $/1M OUTPUT $/1M
------------------------------------------------------------------------
openai/gpt-4o openai $2.50 $10.00
anthropic/claude-opus-4-6 anthropic $5.00 $25.00
google/gemini-2.5-flash google $0.30 $2.50
...
44 models available. 5% platform fee included.
$ solvela chat --model eco "Hello, what can you do?"
Cost breakdown:
Provider cost : 0.000040 USDC
Platform fee : 0.000002 USDC (5%)
Total : 0.000042 USDC
Proceed? [y/N] y
Hello! I'm an AI assistant. I can help you with...Note
The CLI binary is named solvela. Source code: crates/cli/ in the monorepo.