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.
| Property | Type | Description | Default | Required | Where to Find |
|---|---|---|---|---|---|
| api_key | string | API key for OpenAI | true | OpenAI Dashboard > API Keys > Create new key or view existing keys | |
| organization_id | string | Only needed for users who belong to multiple organizations and want to use an organization other than default | false | OpenAI Dashboard > Account Settings > Organizations > Organization ID | |
| base_url | string | Custom API base URL, for OpenAI-compatible endpoints (Azure OpenAI, local models, proxies) | https://api.openai.com/v1 | false | Your 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.