It is written in the API reference doc that we can add attachment with notes but there is not way to attach an attachment/file with note when creating notes using API. Here is the paragrapg from doc:
You can log notes on CRM records to add information to the record timeline or associate an attachment with a record. For example, if you need to keep track of an offline conversation you had with a contact, you can add a note to their contact record with details and documents related to the conversation. Other users in the account will then be able to view and reference that note.