> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getsly.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Recipes

> Copy-paste solutions to common tasks. Grab, adapt, ship.

Short task-oriented recipes. Each one solves a single problem end-to-end with both cURL and Node SDK examples where applicable.

If a recipe's not here, it's probably a longer walkthrough in [Guides](/guides/onboard-account) or a protocol-level pattern in [Protocols](/protocols/overview).

## Categories

<CardGroup cols={2}>
  <Card title="Transfers & refunds" icon="money-bill-transfer" href="/recipes/transfers-and-refunds">
    Cross-border transfers, batch payouts, retries, refunds, scheduled transfers, CSV export.
  </Card>

  <Card title="Agents & auth" icon="robot" href="/recipes/agents-and-auth">
    Migrate from `agent_*` to `sess_*`, rotate keys, freeze an agent, approve spends, check KYA tier.
  </Card>

  <Card title="Protocols" icon="network-wired" href="/recipes/protocols">
    Handle 402 automatically, open a hosted checkout, execute a mandate, send an A2A task, open an MPP session.
  </Card>

  <Card title="Webhooks & events" icon="webhook" href="/recipes/webhooks">
    Verify signatures in Node / Python / Go, dedupe events, replay from DLQ, tunnel to localhost.
  </Card>
</CardGroup>

## Conventions used

All recipes assume:

```bash theme={null}
export SLY_API_KEY=pk_test_...        # sandbox key
# or
export SLY_API_KEY=pk_live_...        # live key
```

Replace `<uuid>` placeholders with real IDs from your tenant. Idempotency keys should be generated fresh per operation — most recipes use `$(uuidgen)` for simplicity.

## Getting the SDK

```bash theme={null}
npm install @sly_ai/sdk
```

All Node examples assume:

```ts theme={null}
import { Sly } from '@sly_ai/sdk';
const sly = new Sly({ apiKey: process.env.SLY_API_KEY });
```

## Requesting a new recipe

Missing something? Open an issue on [GitHub](https://github.com/Sly-devs/sly/issues) or mention it in `#docs-feedback` in our Slack. Recipe requests are the easiest contribution to accept.
