How do you do that when you don't know the APIs? AI code assistants seem more useful when you're doing something outside your existing experience: different domain, different libraries, different language, etc.
I use GitHub CoPilot both in and ouside my existing experience. Mostly I'm working with Rust, so access to the API surface of a library is fairly simple (docs.rs/cratename) and something which can be provided to the context by pasting if needed. YMMV for other languages.
Try giving them more context of APIs that actually exist then as part of the inputs...