How to generate a private key to create wallet through api in Block chain I need to pass private key while creating a wallet in blockchain.info through api call which is defined here https://blockchain.info/api/create_wallet 

I'm using php for creating wallets. 

Please suggest me any custom php function to create a private key (Wallet import format preferred) and pass in the create wallet api call.

Thanks in advance!
First create an account
https://blockchain.info/api/api_create_code
you will receive api code in email.
with which u can create ur wallet 

https://blockchain.info/api/v2/create_wallet?password=wallet-password&amp;email=email-for-wallet&amp;api_code=this-will-be-in-your-email