🌸 Pollinations Generative React Hooks 2.0.1 🌸

This playground is designed to showcase the versatility and hackability of the Pollinations API

Text Generation

Generate text using Pollinations' API

Generated Text:

Loading...

Code Preview:


import React from 'react';
import { usePollinationsText } from '@pollinations/react';
import ReactMarkdown from 'react-markdown';

const TextComponent = () => {
  const text = usePollinationsText("Write a haiku about artificial intelligence", { 
    seed: 42,
    model: 'openai',
    systemPrompt: "You are a helpful AI assistant."
  });
  
  return (
    <div>
      {text ? <ReactMarkdown>{text}</ReactMarkdown> : <p>Loading...</p>}
    </div>
  );
};

export default TextComponent;