Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prune-quickstart

Try Prune with any app in about 2 minutes. Prune vaults your provider key, caps spend, cuts your bill through caching and compression, and returns a signed receipt on every call.

This repo is one script and one README — no framework, no coding-agent setup. The script makes 15 calls (5 short prompts, repeated over 3 rounds) through Prune's OpenRouter proxy, so you actually see caching kick in on the repeats instead of just one opaque call-and-response.

Setup

  1. Join the waitlist at withprune.com and get access — you'll need a Prune account before you can create a Prune API key or vault a provider.
  2. Get a free API key at openrouter.ai (no payment method required for the free-tier models).
  3. Vault that key in the Prune dashboard under Connect → Providers. This step is not optional — Prune won't have a provider key to call on your behalf otherwise, even though the model itself is free.
  4. Copy .env.example to .env and add your Prune key:
    cp .env.example .env
    
  5. Install dependencies:
    pip install prune-sdk python-dotenv
    
  6. Run it:
    python test_prune.py
    

You'll see one line per call — round, cache status, tokens saved, and the reply — then a summary. Round 1 is 5 cache misses; rounds 2 and 3 repeat the same 5 prompts, so you should see cache=exact and a nonzero tokens_saved on most of those. The full receipt fields for the last call (client.last_prune_metadata) print at the end. Verify any receipt at withprune.com/verify.

Note on the dollar figure: the demo model is priced at $0 on OpenRouter, so cost_saved_usd reads $0.00 here — there's no cost to save on a free model. tokens_saved and the cache hits are the real signal in this demo. Point Prune at a paid model to see dollar savings.

The script waits 2 seconds between calls to stay under OpenRouter's free-tier limits (20 requests/minute, 50/day), so a run leaves you plenty of quota to try it again.

Using your own OpenRouter key

test_prune.py uses openai/gpt-oss-20b:free, a currently-free model on OpenRouter, so there's nothing to pay to try this. To call a paid model instead, vault your real OpenRouter key the same way in step 3 and change MODEL to any model id OpenRouter supports.


Text me if you hit any issues: 8291006285

License

Apache-2.0 — see LICENSE.

About

Try Prune with any app in about 2 minutes -- vault your key, cap spend, cut cost, get a signed receipt.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages