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

# Get Smart Account

> Look up an existing smart account by EOA

<Note>
  **SDK Alternative**: Use `giza.getAgent(eoa)` or `giza.getSmartAccount(eoa)` for a simpler TypeScript interface. [See SDK docs](/sdk-reference/giza)
</Note>

## Description

Looks up an existing smart account for a given EOA and chain. Returns the smart account address and backend wallet. Use this to retrieve a previously created smart account without creating a new one.

## Query Parameters

<ParamField query="eoa" type="string" required>
  The user's externally owned account (wallet) address.
</ParamField>

<ParamField query="chain" type="integer" required>
  Chain ID to look up the smart account on.

  Supported values: `1` (Ethereum), `137` (Polygon), `8453` (Base), `42161` (Arbitrum), `84532` (Base Sepolia), `11155111` (Sepolia)
</ParamField>

<ParamField query="agent_id" type="string">
  Agent identifier. Defaults to `giza-app`.
</ParamField>

## Example Request

```bash theme={null}
curl -X GET "https://partners-backend-1038109371738.europe-west1.run.app/api/v1/proxy/zerodev/smart-accounts?eoa=0x742d35Cc6634C0532925a3b844Bc454e4438f44e&chain=8453&agent_id=giza-app" \
  -H "X-Partner-API-Key: your-api-key" \
  -H "X-Partner-Name: your-partner-name"
```

## Response

<ResponseField name="smartAccount" type="string">
  The smart account address.
</ResponseField>

<ResponseField name="backendWallet" type="string">
  The Giza backend wallet associated with this smart account.
</ResponseField>

```json Response Example theme={null}
{
  "smartAccount": "0xAbC1234567890aBcDeF1234567890AbCdEf123456",
  "backendWallet": "0xDeF9876543210FeDcBa9876543210FeDcBa987654"
}
```

## Error Responses

| Status | Description                                    |
| ------ | ---------------------------------------------- |
| `401`  | Unauthorized - invalid API key                 |
| `404`  | Smart account not found for this EOA and chain |
| `422`  | Validation error (invalid address format)      |
| `500`  | Internal server error                          |

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://partners-backend-1038109371738.europe-west1.run.app/api/v1/proxy/zerodev/smart-accounts?eoa=0x742d35Cc6634C0532925a3b844Bc454e4438f44e&chain=8453&agent_id=giza-app" \
    -H "X-Partner-API-Key: your-api-key" \
    -H "X-Partner-Name: your-partner-name"
  ```

  ```javascript JavaScript theme={null}
  const params = new URLSearchParams({
    eoa: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
    chain: '8453',
    agent_id: 'giza-app',
  });

  const response = await fetch(
    `https://partners-backend-1038109371738.europe-west1.run.app/api/v1/proxy/zerodev/smart-accounts?${params}`,
    {
      headers: {
        'X-Partner-API-Key': 'your-api-key',
        'X-Partner-Name': 'your-partner-name',
      },
    }
  );

  const data = await response.json();
  console.log('Smart Account:', data.smartAccount);
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://partners-backend-1038109371738.europe-west1.run.app/api/v1/proxy/zerodev/smart-accounts',
      headers={
          'X-Partner-API-Key': 'your-api-key',
          'X-Partner-Name': 'your-partner-name',
      },
      params={
          'eoa': '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
          'chain': 8453,
          'agent_id': 'giza-app',
      }
  )

  data = response.json()
  print('Smart Account:', data['smartAccount'])
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "smartAccount": "0xAbC1234567890aBcDeF1234567890AbCdEf123456",
    "backendWallet": "0xDeF9876543210FeDcBa9876543210FeDcBa987654"
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "detail": "Smart account not found"
  }
  ```
</ResponseExample>
