Of course, why wouldn't it? It's a generative model, not a lookup table. Show it the library headers, and it'll give you decent results.
Obviously, if the library or code using it weren't part of the training data, and you don't supply either in the context of your request, then it won't generate valid code for it. But that's not LLM's fault.