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

# Introduction

> Overview of the Squads Smart Account API

# Smart Account API

The Squads API enables you to create and manage smart accounts—fully onchain programmable wallets with industry-leading security features on the Solana blockchain. We handle all the blockchain complexity, so you can focus on building your application.

### Built for Developers

* **Zero Blockchain Expertise Required** - No need to understand Solana's technical details
* **Infrastructure Management** - We handle RPC nodes, indexing, and infrastructure scaling
* **Gas Abstraction** - Pay fees in any asset and even sponsor them for your users
* **Enterprise Ready** - Built-in reliability with automatic retries and confirmation tracking

## Core Features

### Flexible Custody Models

Choose the custody model that fits your needs:

* **Self-custodial** - Users maintain complete control
* **Semi-custodial** - Shared control between users and your application
* **Multi-signature** - Multiple keys for enhanced security or social recovery
* **Bring Your Own Keys** - Integrate with your existing key management infrastructure

### Advanced Security Controls

* **Spending Limits** - Set daily, weekly, or custom transfer limits
* **Timelocks** - Delay certain operations based on configurable conditions
* **Flexible Signing** - [Multiple types of signers](/squads-api/api-reference/v0/signing) for different security needs

### Enterprise-Grade Security

* Multiple security audits and formal verification
* Secured by Solana's decentralized network of 1000+ validators
* Battle-tested in production environments

## API Access

### Base URL

`https://developer-api.squads.so`

### Required Headers

```
Authorization: Bearer YOUR_API_KEY
x-squad-network: devnet // or 'mainnet' for production
```

## Fee Configuration

All transactions require a fee configuration that specifies how transaction fees will be paid. You can pay fees in either SOL or USDC - for full details on fee calculation, supported currencies, and response formats, see our [supported fee currencies documentation](/squads-api/transaction-fees).

Example fee configuration:

```json theme={null}
{
  "fee_config": {
    "currency": "usdc",
    "payer_address": "BmB8q3Q5N1CruWDjsnYXNnXhfL4bgQovEMYhzVLar1uR"
  }
}
```

## Response Format

API responses vary by endpoint type but always follow these principles:

* All responses are returned in JSON format
* Error responses follow a consistent format
* Successful responses vary based on the endpoint type

### Success Response Types

1. **Transaction Endpoints**
   Most endpoints return a prepared transaction and fee information:

```json theme={null}
{
  "transaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDpXW3HkEQR9QEa5C8/Qk4nJcaYkdlhqmxV4k",
  "fee": {
    "amount": "1000000",
    "amount_decimal": "1.0",
    "currency": "usdc",
    "sol_equivalent": {
      "amount": "5000",
      "amount_decimal": "0.000005"
    }
  }
}
```

2. **Smart Account Creation**
   The create smart account endpoint returns just the address:

```json theme={null}
{
  "smart_account_address": "AbCd...XyZ"  // Ready to use immediately
}
```

3. **Query Endpoints**
   Query endpoints return specific data structures relevant to their function. For example, getting spending limit details:

```json theme={null}
{
  "smart_account_address": "AbCd...XyZ",
  "spending_limit": {
    // Spending limit specific details
  }
}
```

### Error Response

All endpoints use a consistent error format:

```json theme={null}
{
  "error": "Invalid request parameters"
}
```

### Response Fields

Common fields you might encounter:

* **transaction**: Base64 encoded Solana transaction (when applicable)
* **smart\_account\_address**: The wallet address of a smart account
* **fee**: Fee information when a transaction is involved
  * `amount`: Raw amount in base units (e.g., USDC with 6 decimals)
  * `amount_decimal`: Human-readable amount
  * `currency`: The currency for the fee (e.g., "usdc")
  * `sol_equivalent`: The equivalent SOL fee
    * `amount`: Raw amount in lamports
    * `amount_decimal`: Human-readable SOL amount

For endpoint-specific response details, refer to the individual endpoint documentation.
