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

# Getting keys from the App

> Use the Ostium app to generate a delegated gasless SDK account and export the delegate private key for Builder SDK integrations.

Use the Ostium app export flow here:

[app.ostium.com/sdk-export](https://app.ostium.com/sdk-export)

That page creates a delegated gasless SDK setup in the browser:

* it generates a fresh delegate private key locally in the browser
* it asks the trader to approve USDC once
* it registers the derived Safe as the trader's on-chain delegate

After that, the integration can use `createDelegatedAndGasless()`.

## What the app page gives you

The export flow shows:

* the trader address
* the derived smart-account address
* the registration status and timestamp
* a ready-to-copy Builder SDK snippet

## SDK snippet

```ts theme={null}
import { OstiumClient } from '@ostium/builder-sdk';

const client = await OstiumClient.createDelegatedAndGasless({
  delegatePrivateKey: '0xYourDelegateKey', // paste the key you saved in step 2
  traderAddress: '0xa02fa4da932f616975f258ce0a9077f8ed3564',
  // pimlicoUrl is optional — defaults to Ostium's sponsored Pimlico bundler on Arbitrum One
  // pimlicoUrl: 'https://builder.prod.bedrock.ostium.io/v1/pimlico/sponsor?chainId=42161',
  // testnet: true, // Arbitrum Sepolia — uses the 421614 sponsor URL when pimlicoUrl is omitted
  // sponsorshipPolicyId: '...', // optional Pimlico sponsorship policy id
  // rpcUrl: 'https://arb-mainnet.g.alchemy.com/v2/...', // optional; public Arbitrum RPC for reads if omitted
});
```

The snippet uses a placeholder for the private key. Paste the saved key there and never commit it to source control.

## Flow in the app

### 1. Trader address

This is the connected EOA that holds the user's USDC and positions.

### 2. Generate delegate key

Ostium generates a fresh private key in the browser. The user must save it because it cannot be recovered later.

### 3. Approve USDC

The trader completes a one-time approval so `TradingStorage` can move their USDC for SDK trades.

### 4. Register delegate

The app registers the derived Safe smart-account address as the trader's on-chain delegate.

## Why this mode is useful

This flow sets the user up for [Delegated + Gasless](/developer/client-modes/delegated-and-gasless):

* trades are signed by the delegate
* transactions are submitted as sponsored ERC-4337 user operations
* the SDK can use Ostium's default Pimlico-compatible sponsor URL when `pimlicoUrl` is omitted

Read the [SDK Overview](/developer/sdk/overview) before integrating if you need the full mode model, helper methods, and trading examples.
