Skip to main content

OpenAI integration

OpenAI is an artificial intelligence service provider.


Windmill AI

An OpenAI resource can also power Windmill AI (AI chat in the code and flow editors) and AI agent steps in flows. OpenAI is one of the supported AI providers, alongside Anthropic, Google AI, Mistral, Groq, OpenRouter and others.

To integrate OpenAI to Windmill, you need to save the following elements as a resource.

PropertyTypeDescriptionDefaultRequiredWhere to Find
api_keystringAPI key for OpenAItrueOpenAI Dashboard > API Keys > Create new key or view existing keys
organization_idstringOnly needed for users who belong to multiple organizations and want to use an organization other than defaultfalseOpenAI Dashboard > Account Settings > Organizations > Organization ID
base_urlstringCustom API base URL, for OpenAI-compatible endpoints (Azure OpenAI, local models, proxies)https://api.openai.com/v1falseYour OpenAI-compatible provider's documentation

Your resource can be passed as a parameter or fetched directly within scripts, flows, low-code apps and full-code apps.

tip

Find some pre-set interactions with OpenAI on the Hub.

Feel free to create your own OpenAI scripts on Windmill.