Replace Google Map API


I actually coding social network, but the script use Google Maps and i would like to replace with OpenStreetMap.
This is the code :

<div class="message-type-map event-map"><img src="'.$value.'&zoom=13&size=700x150&maptype=roadmap&markers=color:red%7C'.$value.'&sensor=false&scale=2&visual_refresh=true" referrerpolicy="no-referrer"></div>

How i can replace it with OpenStreetMap ?

Thank you very much,
Best regards.

You should probably read this: