using blockchain.info api_code
The first one is correct.
https://blockchain.info/tobtc?api_code=000my0-api00-code-0000-000000000&amp;currency=USD&amp;value=1

However, the particular call you are using (/tobtc) is public and thus needs no api_code attached.

https://blockchain.info/tobtc?currency=USD&amp;value=1