I went looking for some free image generation.
https://enter.pollinations.ai/ seemed reasonable

Create an API Key
Read the API docs
Actually, it looks like for low volume (at least right now) you can call the api without a key…
Let’s fire up a rest data connection.

And egress policy

Make the webhook

It was crashing my browser at first (I think because the binary response was overwhelming something when I tried to parse the output) I sent a small width and height and was able to configure the output.

I wasn’t sure I could do this without going a code repo route like this post. https://www.linkedin.com/feed/update/urn:li:activity:7402898257095331841/
It looks to be returning it in base64
Create an action to call this webhook, and writeback to the mentor image property.
Looks like I need to modify the function just a bit so it will display in a media preview
Simple function change
import { createEditBatch, Edits } from "@osdk/functions";
import { Mentor } from "@ontology/sdk";
import { Client, Osdk } from "@osdk/client";
type OntologyEdit = Edits.Object<Mentor>;
export default function generateMentorImage(client: Client, mentor: Osdk.Instance<Mentor>, responseWebhookOutput: string): OntologyEdit[] {
const editsBatch = createEditBatch<OntologyEdit>(client);
const cleanBase64 = responseWebhookOutput
.trim()
.replace(/^"+|"+$/g, ""); // remove leading/trailing quotes
// Modify Mentor
editsBatch.update(mentor, {
mentorImage: `data:image/jpeg;base64,${cleanBase64}`,
});
return editsBatch.getEdits()
}
Then do an action that calls the webhook and passes the response to the function (I renamed the response from 0-> response)

Then create a simple automation that when a mentor is added it calls the Generate Image Action.

hmmm, thats a young 41 year old. Guess that’s what you get from a free image LLM ¯\_(ツ)_/¯

Now, I really should do it as a media set…