# endpoints_for

> Default algod/indexer endpoints: AlgoNode for MainNet/TestNet, LocalNet for anything else.

```python
from ai_economy_sdk import endpoints_for
```

```python
def endpoints_for(network: str) -> Endpoints
```

Default algod/indexer endpoints: AlgoNode for MainNet/TestNet, LocalNet for anything else.

## Parameters

- `network` (`str`, required):
Network name, alias, canonical short CAIP-2 ID, or legacy long ID.

## Returns

- `returns` (`Endpoints`):
Named tuple containing algod and indexer URL and token strings.

## Examples

```python
>>> from ai_economy_sdk.network import endpoints_for
>>> ep = endpoints_for("mainnet")
>>> "algonode.cloud" in ep.algod_url
True
>>> ep = endpoints_for("localnet")
>>> ep.algod_url
'http://localhost:4001'
```

## See also

- `resolve_network`: Normalizes network identifiers.

Source: [ai_economy_sdk/network.py](https://github.com/x402-avm/ai-economy-sdk/blob/main/ai_economy_sdk/network.py#L203)

Source: https://x402-avm.github.io/reference/python/ai-economy-sdk/endpoints-for
