Member-only story

ChatGPT to generate image right in the ChatBox

Mai Văn Khánh
2 min readFeb 25, 2023

Follow-up to my previous post: using ChatGPT to draw and display charts (Google) in the chatbox — no need to paste code anywhere else.

This post will walk you through the process of creating a prompt that will generate an image based on your description.

Pollinations.ai is an AI tool that can generate images based on the parameters in its URL.

Let’s draw a car using this prompt:

INPUT = {myinput}

OUTPUT = {description}\n ![IMG](https://image.pollinations.ai/prompt/{description}){description} = {focuseDetailed},%20{adjective1},%20{adjective2},%20{visualStyle1},%20{visualStyle2},%20{visualStyle3},%20{artistreference}

INPUT = a car

There’re 3 parts:

INPUT = {myinput}: to guide ChatGPT that we will input what we want to generate the image

OUTPUT: the structured prompt to guide ChatGPT how to use markdown and pollinations.ai to generate image. *We only need to do this at one time.

INPUT = a car: I want to generate an image of a car

ChatGPT’s response:

ChatGPT generated the image based on my first prompt

Awesome! Now, let’s generate another image with a much simpler prompt:

--

--

Mai Văn Khánh
Mai Văn Khánh

Written by Mai Văn Khánh

I'm writing articles about Software, Programming, AI and Cloud. Become a member: https://maivankhanh.medium.com/membership

Responses (1)