Use the image inside a prompt
Generate content by providing images as input through messages. The system can analyze and describe images using advanced AI models.
Basic Image Generation
Use images as input to generate descriptions or analyze visual content by providing image URLs.
const {
data: { payload },
} = await unbody.generate
.text(
[
{
role: "system",
content: "Describe these images",
},
{
type: "image",
content: {
url: "https://www.treadfirst.co.uk/wp-content/uploads/2023/05/riseBlog.jpg",
// Images about a Car
},
},
],
{
model: "gpt-4-turbo",
maxTokens: 500,
temperature: 0.7,
}
);
Learn more in our Message-Based Input with Schema Guide.