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

# API Reference

> Complete API documentation for cross-chain transaction submission and intent execution

## Authentication

The API uses signature-based authentication. For EIP-7702 mode, you sign authorizations with your wallet. For non-7702 modes, you sign or submit transactions directly.

## Response Format

All API responses follow this format:

```json theme={null}
{
  "success": boolean,
  "data": object | null,
  "error": { "message": string } | null
}
```

## Error Handling

| Status    | Description                        |
| --------- | ---------------------------------- |
| `200/201` | Success                            |
| `202`     | Accepted (step already processing) |
| `400`     | Bad Request (validation error)     |
| `404`     | Not Found                          |
| `500`     | Internal Server Error              |

***

## Endpoints Overview

### Actions API

The unified API for creating and executing cross-chain intents.

| Method     | Endpoint                                     | Description                                                          |
| ---------- | -------------------------------------------- | -------------------------------------------------------------------- |
| `POST`     | `/actions`                                   | [Create action with intents](/api-reference/endpoint/actions-create) |
| `GET`      | `/actions/:actionId`                         | [Get action status](/api-reference/endpoint/actions-get)             |
| `GET`      | `/actions/:actionId/intents/:idx`            | [Get intent status](/api-reference/endpoint/actions-get)             |
| `GET/POST` | `/actions/:actionId/intents/:idx/steps/:idx` | [Get/Execute step](/api-reference/endpoint/actions-execute)          |

<CardGroup cols={2}>
  <Card title="POST /actions" icon="plus" href="/api-reference/endpoint/actions-create">
    Create an action with intents for cross-chain execution
  </Card>

  <Card title="GET Action Status" icon="eye" href="/api-reference/endpoint/actions-get">
    Retrieve action, intent, or step status
  </Card>

  <Card title="POST Execute Step" icon="play" href="/api-reference/endpoint/actions-execute">
    Execute a specific intent step
  </Card>
</CardGroup>

***

### Balances & Deposits

Manage user balances for cross-chain transfers.

| Method | Endpoint                 | Description                                                        |
| ------ | ------------------------ | ------------------------------------------------------------------ |
| `POST` | `/spicedeposit`          | [Record deposit/withdrawal](/api-reference/endpoint/spice-deposit) |
| `GET`  | `/spicedeposit/:address` | [Get user balances](/api-reference/endpoint/spice-deposit)         |

<CardGroup cols={2}>
  <Card title="Spice Deposits" icon="coins" href="/api-reference/endpoint/spice-deposit">
    Record deposits, withdrawals, and query balances
  </Card>
</CardGroup>

***

### Transaction Tracking

Track and verify transactions for specific venues.

| Method | Endpoint                          | Description                                                |
| ------ | --------------------------------- | ---------------------------------------------------------- |
| `POST` | `/venue-tx-hashes`                | [Save tx hash](/api-reference/endpoint/venue-tx-hashes)    |
| `GET`  | `/venue-tx-hashes`                | [Query tx hashes](/api-reference/endpoint/venue-tx-hashes) |
| `GET`  | `/venue-tx-hashes/verify/:txHash` | [Verify tx hash](/api-reference/endpoint/venue-tx-hashes)  |

<CardGroup cols={2}>
  <Card title="Venue TX Hashes" icon="file-invoice" href="/api-reference/endpoint/venue-tx-hashes">
    Track and verify transactions for venues
  </Card>
</CardGroup>

***

### Utility

| Method | Endpoint                     | Description                                        |
| ------ | ---------------------------- | -------------------------------------------------- |
| `POST` | `/airdrop/:chainId/:tokenId` | [Request airdrop](/api-reference/endpoint/airdrop) |
| `GET`  | `/health`                    | [Health check](/api-reference/endpoint/health)     |

<CardGroup cols={2}>
  <Card title="Airdrop" icon="gift" href="/api-reference/endpoint/airdrop">
    Request testnet token airdrops
  </Card>

  <Card title="Health Check" icon="heart-pulse" href="/api-reference/endpoint/health">
    Check API server status
  </Card>
</CardGroup>

***

### Legacy Endpoints

These endpoints are still functional but the Actions API is recommended for new integrations.

| Method | Endpoint                      | Description                                                             |
| ------ | ----------------------------- | ----------------------------------------------------------------------- |
| `POST` | `/transaction/submit`         | [Submit legacy transaction](/api-reference/endpoint/transaction-submit) |
| `GET`  | `/intent/:id/step/:id/status` | [Get step status](/api-reference/endpoint/intent-step-status)           |

<CardGroup cols={2}>
  <Card title="POST /transaction/submit" icon="upload" href="/api-reference/endpoint/transaction-submit">
    Submit a cross-chain transaction (legacy)
  </Card>

  <Card title="GET Step Status" icon="activity" href="/api-reference/endpoint/intent-step-status">
    Get intent step status (legacy)
  </Card>
</CardGroup>
