To authenticate via the API you should pass in an API key via the x-api-key header:

'x-api-key': '<API_KEY>'

API Keys

To create an API Key go into the Prompt Wrangler interface, click on API Keys and then create a new one.

Public Prompts

If you are trying to use a prompt that is public you can alternaltiy pass in a x-openai-api-key instead of an x-api-key header. This will allow you to use the API without an account for public prompts.

'x-openai-api-key': '<OPENAI_API_KEY>'