A simple, browser-safe client library for remotely runnning/streaming deployed Genkit flows.

import { runFlow, streamFlow } from 'genkit/beta/client';

const response = await runFlow({
url: 'https://my-flow-deployed-url',
input: 'foo',
});

const response = streamFlow({
url: 'https://my-flow-deployed-url',
input: 'foo',
});
for await (const chunk of response.stream) {
console.log(chunk);
}
console.log(await response.output);

Functions

runFlow
streamFlow