Docs

Developer docs

Start with API keys, clear-lane billing, and the host workflow.

Quickstart

Call a model through a clear lane.

The SDK route is intentionally close to familiar LLM APIs. The extra lane option tells Perchy how long to hold your position after your app goes quiet.

import Perchy from "@perchy/ai";

const perchy = new Perchy({
  apiKey: process.env.PERCHY_API_KEY,
});

const stream = await perchy.chat.completions.create({
  model: "perchy-balanced-70b",
  lane: { mode: "clear", idleTimeoutMs: 3000 },
  messages: [{ role: "user", content: "Write the launch email." }],
  stream: true,
});
API keys

Issue keys per app or environment.

Keys are created in the console, shown once, and stored as one-way hashes.

  • Use a separate key for each app.
  • Rotate keys before public launches.
  • Keep server-side keys out of browser bundles.
Billing

Two ways to pay.

Perchy supports clear-lane subscriptions and traditional token pricing. Subscriptions and balance top-ups use Stripe-hosted Checkout Sessions with signed webhook fulfillment.

Hosts

Bring spare compute online.

Hosts will connect outbound to Perchy, advertise available positions, and earn when API users occupy those positions.

npx perchy start --earn

# Later, when you need the machine back:
npx perchy stop