Using a dynamic language with a REPL and FFI, you can show an interactive demo consisting of loading the library, declaring some API blurbs and exploring the functions and their results.
The interactive session does not become a derived work of the library any more than the life of the reader of a novel becomes a derived work of its story.
The only way the program can become a derived work of the dynamic library is if it incorporates some inline code (coming from some accompanying declarative materials which are part of the library). It's a derived work of those declarations, not of the library per se.