
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
genkitx-openai
Advanced tools

This Genkit plugin allows to use OpenAI models through their official APIs.
npm install genkitx-openai
# or
pnpm add genkitx-openai
# or
yarn add genkitx-openai
The plugin depends on Genkit core packages, so make sure to have them installed as well:
npm install @genkit-ai/core @genkit-ai/ai
# or
pnpm add @genkit-ai/core @genkit-ai/ai
# or
yarn add @genkit-ai/core @genkit-ai/ai
import { generate } from '@genkit-ai/ai';
import { configureGenkit } from '@genkit-ai/core';
import { defineFlow, startFlowsServer } from '@genkit-ai/flow';
import { openAI, gpt4o } from 'genkitx-openai';
import * as z from 'zod';
configureGenkit({
plugins: [
// OpenAI API key is required and defaults to the OPENAI_API_KEY environment variable
openAI({ apiKey: process.env.OPENAI_API_KEY }),
],
logLevel: 'debug',
enableTracingAndMetrics: true,
});
export const menuSuggestionFlow = defineFlow(
{
name: 'menuSuggestionFlow',
inputSchema: z.string(),
outputSchema: z.string(),
},
async (subject, streamingCallback) => {
const llmResponse = await generate({
prompt: `Suggest an item for the menu of a ${subject} themed restaurant`,
model: gpt4o,
streamingCallback: ({ content }) => {
streamingCallback?.(content[0]?.text ?? '');
},
});
return llmResponse.text();
},
);
startFlowsServer();
FAQs
Firebase Genkit AI framework plugin for OpenAI APIs.
The npm package genkitx-openai receives a total of 7,983 weekly downloads. As such, genkitx-openai popularity was classified as popular.
We found that genkitx-openai demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.