Skip to content

Conversation

@pavelgj
Copy link
Collaborator

@pavelgj pavelgj commented Dec 16, 2025

const ai = genkit({
  plugins: [openAI({apiKey: false})],
});


await ai.generate({
  prompt: 'tell me why...',
  model: openAI.model('gpt-4o'),
  config: {
    apiKey: '...'
  }
});

Checklist (if applicable):

Copy link
Contributor

@ssbushi ssbushi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the point of supporting per-request API keys?

@pavelgj
Copy link
Collaborator Author

pavelgj commented Dec 16, 2025

What is the point of supporting per-request API keys?

Folks build apps where user provides the API key. The key is dynamically fetched from a DB.

@pavelgj pavelgj requested a review from ssbushi December 16, 2025 13:15
Copy link
Contributor

@ssbushi ssbushi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, save for 1 small comment.

@pavelgj pavelgj merged commit 2c6539e into main Dec 16, 2025
5 checks passed
@pavelgj pavelgj deleted the pj/oai-runtime-key branch December 16, 2025 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants