Static website with openAI

love what this can do ive been addicted to the playground for the past 3 days. and now i want to use my remaining free credits to try and do something useful (and fun)

is it possible to restrict the API key to requests from only your domain so that it can be visible in the code of a static website?

also, how can you incorporate the API in to a static website with just html, css and js?

say for instance just a chat bot on the site that just runs in the users browser with no backend code?

are there any examples for such simple usage? thanks for reading