Create accounts programmatically

To create a Lighter account, you can simply deposit some assets to Lighter using the procedure here. The crediting on mainnet takes a few minutes, after which a master account index gets generated, allowing you to interact with the exchange without ever needing to touch the front-end. If you're using other EVM-compatible chains routed via CCTP, deposits will take around 15-20 minutes to get credited.

Once the account is created, you can verify the assigned account_index querying addressToAccountIndex (0xabf6a038) on Lighter's Ethereum contract, or using the account or accountsByL1Address endpoints.

You can refer to this documentation to then generate API keys in a programmatic way.