Contribution Note Smarty Variable
I might be missing something but, the contribution.contribution_id variable you are referring as a standalone variable I believe is a token, I can't figure out what's the smarty variable for it but you can do this (it works):

{capture assign='id'} // the variable
   {contribution.contribution_id} // here is the Contribution ID token
{/capture}


And then your API call:

{crmAPI var='result' entity='Note' action='get' sequential=0 entity_table="civicrm_contribution" entity_id=$id}


Update: final snippet should look like this, I've just tested it

{capture assign='id'}{contribution.contribution_id}{/capture}
{crmAPI var='result' entity='Note' action='get' entity_table="civicrm_contribution" entity_id=$id}
{foreach from=$result.values item=note}
  {$note.note}
{/foreach}