Creating doc types other than using the desk UI

Is there an API available within frappe framework to create the doc type outside of Desk Ui?

You want to create Doctype or records inside doctype?
check below links
https://frappeframework.com/docs/user/en/api/rest

https://frappe.io/frappejs/docs/server/rest