Adding fields to Page

Created a new page use the Page - API. Trying to add a link field to the page. Used page.add_field() but that adds the field like a filter.

How can I add it like in the form view or like in dialog view?