This is a Next.js project to generate storybook illustrations from any text.
Sample UI and output can be seen here:
Find a detailed blog post here: Generate Storybook Illustrations
Register for two API services Segmind and OpenAI
Set two environmental variables eg: In .env.local
OPENAI_API_KEY=sk-xxxx
SEGMIND_API_KEY=SG_xxxxx
Then, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
The main files that you need to look at are app/page.tsx
for the UI and app/api/generate-story-illustrations\route.ts
for the API.