Only include API key if it's present