{{doi-inline|doi|text|doi-access=free}}will linktext to the object identified bydoi. If no text is given, it will produce [n], as if you had linked it directly using [https://doi.org/doi].
If you mark it with|doi-access=free, it will add a green free-access lock next to the link.
The {{doi-inline|10.1007/b62130|Red Book of Varieties and Schemes}}.The Red Book of Varieties and Schemes {{doi-inline|10.1007/b62130}}.In {{doi-inline|10.1038/495426a|an article by Richard van Noorden|doi-access=free}}, ...In an article by Richard van Noorden {{doi-inline|10.1038/495426a|doi-access=free}}, ...gives:
InPDFs these will be: