# Flows for an Open AI compatible API

**URL:** <https://discourse.nodered.org/t/flows-for-an-open-ai-compatible-api/77921>\
**Category:** Share Your Projects\
**Created:** [25 April 2023 13:54 UTC](https://discourse.nodered.org/t/flows-for-an-open-ai-compatible-api/77921 "2023-04-25T13:54:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rozek](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rozek/32/48594_2.png) [@rozek](https://discourse.nodered.org/u/rozek)\
**Post date:** [25 April 2023 13:54 UTC](https://discourse.nodered.org/t/flows-for-an-open-ai-compatible-api/77921/1 "2023-04-25T13:54:34Z")

</div>

As promised before, I have just completed (and verified) a flow which implements an API that is compatible with that of Open AI - see the related [GitHub repository](https://github.com/rozek/node-red-openai-api).

Possible use cases could be:

- log any requests to the Open AI API - either for reporting reasons or just to learn how other scripts (like [Auto-GPT](https://github.com/Significant-Gravitas/Auto-GPT) or [BabyAGI](https://github.com/yoheinakajima/babyagi)) use this API to reach their goals
- don't give your (secret!) Open AI API key to potentially dangerous scripts! Instead, add it to these flows only and configure your untrusted scripts to use these endpoints as a proxy;
- replace some (or all) requests to the Open AI API by your own implementations - e.g., based on other flows which use [LLaMA](https://github.com/rozek/node-red-flow-llama), [Stanford Alpaca](https://github.com/rozek/node-red-flow-alpaca), or GPT4All [filtered](https://github.com/rozek/node-red-flow-gpt4all-filtered) or [unfiltered](https://github.com/rozek/node-red-flow-gpt4all-unfiltered) or [GPT4All-J](https://github.com/rozek/node-red-flow-gpt4all-j) models.

In any case, this proxy gives you much more control over Open AI API requests with respect to

- data privacy,
- safety and
- costs.

So far, I have already managed to instruct [Auto-GPT](https://github.com/Significant-Gravitas/Auto-GPT) to use my server instead of the official one - and BabyAGI will hopefully come next
