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

# Getting started

Getting started with the Supertransaction API can be done in minutes!

<Steps>
  <Step title="Get the API Key">
    Visit [https://dashboard.biconomy.io](https://dashboard.biconomy.io) and get your API Key by creating an MEE stack project!

    <Note>
      Make sure your API key has **sponsorship enabled** if you want to use gasless transactions.
    </Note>
  </Step>

  <Step title="Compose and Quote">
    Call `/v1/quote` with the provided `composeFlows` - a set of instructions that define your desired operations using the four instruction types (`build`, `build-raw`, `intent`, or `intent-simple`).
  </Step>

  <Step title="Sign Payload">
    Based on the returned `quoteType`, sign the payload:

    * **permit**: Sign EIP-2612 typed data (gasless)
    * **onchain**: Send approval transaction on-chain
    * **simple**: Sign a simple message
  </Step>

  <Step title="Execute">
    Call `/v1/execute` with the signed payload to execute your supertransaction across multiple chains.
  </Step>
</Steps>

## API Workflow

The Supertransaction API follows a simple 4-step pattern:

<CardGroup cols={4}>
  <Card title="1. Quote" icon="code">
    Call `/v1/quote` to build the flow
  </Card>

  <Card title="2. Sign Payload" icon="signature">
    Sign the returned payload based on the quote type
  </Card>

  <Card title="3. Execute" icon="play">
    Call `/v1/execute` to run your supertransaction across chains
  </Card>

  <Card title="4. Monitor" icon="chart-line">
    Track execution status and get transaction hashes for each chain
  </Card>
</CardGroup>

## Quick Example

Here's a minimal example of a cross-chain swap:

```javascript theme={null}
// Step 1: Quote - Build and get quote
const quoteRequest = {
  mode: 'eoa',
  ownerAddress: '0x742d35cc6639cb8d4b5d1c5d7b8b5e2e7c0c7a8a',
  fundingTokens: [{
    tokenAddress: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913', // USDC on Base
    chainId: 8453,
    amount: '100000000' // 100 USDC
  }],
  feeToken: {
    address: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913',
    chainId: 8453
  },
  composeFlows: [{
    type: '/instructions/intent-simple',
    data: {
      srcChainId: 8453,
      dstChainId: 10,
      srcToken: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913',
      dstToken: '0x94b008aa00579c1307b0ef2c499ad98a8ce58e58',
      amount: '100000000',
      slippage: 0.01
    }
  }]
};

const quote = await fetch('https://api.biconomy.io/v1/quote', {
  method: 'POST',
  body: JSON.stringify(quoteRequest)
}).then(r => r.json());

// Step 2: Sign the payload
const signature = ... // implement a signing function here as explained in the Executing Workflows section

// Step 3: Execute
const result = await fetch('https://api.biconomy.io/v1/execute', {
  method: 'POST',
  body: JSON.stringify({
    ...quote,
    payloadToSign: [{ ...quote.payloadToSign[0], signature }]
  })
}).then(r => r.json());

// Step 4: Monitor or poll execution status
const status = await fetch(`https://network.biconomy.io/v1/explorer/${result.supertxHash}`, {
  headers: {
    'Authorization': `Bearer ${API_KEY}`
  }
}).then(r => r.json());

console.log('Supertransaction hash:', result.supertxHash);
console.log('Execution status:', status);
```

<Note>
  For detailed signing instructions, see [Executing Workflows](/supertransaction-api/execution-modes/choose-execution-mode).
</Note>
