Depends entirely on context.
IN ACADEMIC WORK
Check your institution's rules. They vary and they are changing.
Submitting generated work as your own is misconduct in most institutions, with serious consequences.
Some permit assistance with structure and editing. Find out.
IN PROFESSIONAL WORK
Generally accepted for drafting, provided you review and take responsibility.
Some professional bodies require disclosure. Check yours.
IN A JOB APPLICATION
Tailoring and editing: accepted.
Inventing qualifications or experience: fraud.
IN CLIENT WORK
Check the client's terms. Many now specify.
IN CREATIVE WORK
Depends on the publisher and the context. Check.
IN YOUR OWN BUSINESS
Your choice, provided you check the output and do not mislead anyone.
THE UNDERLYING TEST
Would the person receiving this feel misled if they knew how it was produced?
If yes, that is the problem, whatever the rules say.