Oh ok, so by following the documentation you can try to put your api key in a REST API action. You need to add the REST API plugin, then you will have the Request action available.
This action allow you to use any API REST, including the one provided by OpenAPI. You will have to follow the documentation shared by @justifi
The documentation show
curl https://api.openai.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "gpt-4-vision-preview",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "What’s in this image?"
},
{
"type": "image_url",
"image_url": {
"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
}
}
]
}
],
"max_tokens": 300
}'
It means you have to send a POST request to https://api.openai.com/v1/chat/completions
with one header and some information in the body.
The header key must be Authorization
and the value Bearer $OPENAI_API_KEY
where you put your API KEY.
You will have to add 2 fields inside the body.
- One with the key
model
and the valuegpt-4-vision-preview
- Another with the key
messages
and as value an object containing something formatted as in the code. - A third optional field (I guess) called
max_tokens
Good luck!