Docs

Documentation versions (currently viewingVaadin 24)
Documentation translations (currently viewingEnglish)

API Key for your IDE

Configure environment variables or VM arguments in Eclipse IDE to provide API keys for your Vaadin project.

In Eclipse you need to set the API key explicitly in the Run Configuration. Choose either Environment variables or VM arguments:

Environment Variables

Open → Run → Run Configurations → Environment → New… Add:

Source code
Name: OPENAI_API_KEY
Value: sk-your-key-here

VM Arguments

Open → Run → Run Configurations → Arguments → VM arguments Add:

Source code
-DOPENAI_API_KEY=sk-your-key-here
configuration eclipse

In both cases you can reference the variable in your configuration:

Source code
properties
spring.ai.openai.api-key=${OPENAI_API_KEY}