It wouldn't be duplicate content unless everything is identical on a page, which includes your template/design output ( effectively a clone of the site ). It could however be seen as syndicated content, of which the content which gets indexed first will be the authority. ( There are exceptions to that rule ).
If you are not bothered about the Wordpress.com site from being indexed, you could simply hide it from search engines allowing your rest API syndication to be the primary content publisher.
You can do that in Wordpress.com by going to the
WP-admin - Settings - Reading : Discourage search engines from indexing this site