Yes, I know that the week is already finished, but I wanted to slip in a little bit extra something.
Just.
Just a nugget.
Something that I think will entertain you.
It will only take a couple of minutes and I think you'll agree it'll be worth it.
Please humor me.
Come on in with me to week two and to this new notebook.
Extra, extra.
Did you see it hiding there?
This is something that's a special extra that I want to go through with you.
This is something inspired by the tech writer Simon Willison, who has a wonderful blog.
And one of the things that he likes to do is put models to the test by asking them to draw pelicans
riding on bikes and some other things.
And we're going to do something similar now just to explore a bunch of different models, doing a task
as a as a preview, as a teaser for what's to come in the future weeks, including particularly week
four when we pick the right model for a task at hand.
All right, let's get into it.
We are going to ask a bunch of models to come up with a picture, draw an image, a silly image to test
them out.
But here's the thing to keep in mind.
We've already seen how to use image generation.
We've already seen how to drive a model to actually draw.
Create an image.
And you may know that it uses these diffusion model things.
We're actually going to use one in week three coming right up.
But we're going to do something different.
We're not going to ask it to generate an image, but rather we're going to ask it to draw an SVG.
And SVG is a type of image file, but in fact what it contains within it is just a straight up description
in in like in letters of how to draw the lines and shapes that make up an image, it's literally like
draw a line here, a box here, fill it in, draw a box here, laid out as a series of steps in a in
a document that's like an XML style document.
That's what an SVG is.
So in many ways, asking a model to generate an SVG is actually asking it to think through.
How would it go about constructing this image and drawing it line by line.
And that's really interesting because it's more about a model's intelligence of being able to to craft
this painting than it is about image generation, which is more about using special kinds of models
that are good based on all of their training data.
Okay.
That's the backdrop.
The other piece of backdrop is about open router.
I know I've mentioned open router before, but open router is a platform that gives you access to many
models.
And it does so by routing your request to the different models.
And one of the great innovations about Open Router is that you can use one API key, your key to open
router themselves and use that as your sort of gateway in.
It is of course, it's it's not an abstraction layer.
It's a router.
We talked about the difference between them.
So I'm going to use open router.
You can either just watch what I do.
You don't need to run this if you don't want to.
But if you'd also like to do this then you should do it too.
So I've got some imports as usual.
And here you remember from guide nine in the guides folder that we can use open router base URL.
We can take an API key.
I'll just check that the API key is set up and it looks good so far.
Hopefully you got that.
And now I'm creating an instance of the Python client library that's configured for open router.
Okay.
And now for the assignment.
And I don't mean an assignment for you, I mean an assignment for the model.
So we are going to come up with a challenge.
And in my case I'm going with a panda rollerblading to work.
But you should come up with something different and interesting.
Not too complicated.
You want to give it some creative freedom and something that it could realistically do out of lines
and shapes.
So the prompt generate an SVG of this challenge and respond with the SVG only.
That's the setup.
And then I have a function artist that takes any model we want to give it, and it calls open router,
create passes in the model, the messages and the reasoning effort.
And it times it and it returns the sum summary of it and the results.
That's the function artist.
Okay.
Now let's look at the models.
So we're going to call artist repeatedly for a bunch of models for the open source version of GPT 120,
be the GPT five nano with low reasoning.
We're getting stronger and stronger, I think.
Deep seek the latest version for me.
3.2 Kimi Katou thinking is as of for me right now, beginning of 2026.
The strongest open source model on the planet, I do believe may be different for you, and you can
feel free to pick whatever you want.
This is from moonshot AI.
Chinese AI startup then grok 4.1 fast from Mr. Musk, then Claude.
Opus 4.5 the top model from anthropic right now GPT 5.2 with high reasoning.
The strongest model from OpenAI for me right now.
And finally, Gemini three Pro preview.
These are our models.
And when I run this off it goes.
They are all going to run.
Now they are running one after another, doing the processing and storing back the results.
And for anyone that's taken the Agentic track or some of my other courses, you'll know well how this
could be done as async code, which would mean that they would actually run in parallel rather than
one by one, but I didn't want to overcomplicate by putting it here.
So because I've done it like this, this simple, straightforward way, it's going to take like five
minutes for this to run.
But for you, if you if you know it, feel free to turn this into something that is async and it will
take just just a minute or two, but I will see you in five or so minutes when all of our artists have
wrapped up.
Okay, that did not take five minutes.
That took 12.5 minutes.
I'm sorry if it took that long for you to once.
It took me five minutes.
I think there's quite a variability, but it's time for us now to view the results.
It's going to draw each one.
I wrote a little script called revealer, which just means that it paints the SVG line by line so we
can see it coming.
Let's now run this to see model by model.
What kind of drawing did they come up with for our panda?
Okay, I've zoomed out a bit and now we're off.
This is the first one.
This is GPT OS 120 b.
That looks pretty good.
I quite like that.
Nice rollerblades.
Well done.
An open source model did a fine job.
All right.
And after a bit of a pause, this is the next one.
This is deep seek 3.2 ha with, uh, rollerblades at different heights.
There's the road.
A nice and big diagram it's given us that is deep seek.
Here is now Kimi Katou, the strongest open source model on the planet.
And wearing a hat or a speech bubble.
I'm not sure what that is.
Maybe you could tell what that is.
I'm not sure.
Seems interesting.
An interesting interpretation here is Grock 4.1 fast.
And that's fun.
That's fun.
Uh, again, some hat situation going on.
Work written assertively here.
And rollerblades for sure.
This is Claude, opus 4.5 Anthropic's strongest model as of today.
Quite impressive.
Rollerblades, little action lines and the office written as office in case we were in confusion.
And now GPT 5.2, the strongest model from OpenAI.
And look at this.
Look at this Panda.
And there's like action lines coming I love it.
Swirly action lines.
Last but not least, Gemini three Pro.
Oh, wow Wow, look at that.
Look at the flailing rollerblades in the action lines.
That's quite an image.
That is quite an image.
Okay, I would say Gemini three Pro for the win.
That's an impressive bunch of images.
I absolutely love it.
So GPT five nano was the only one that wasn't able to make it.
It had a problem generating, but everybody else did a fine job.
A great set of drawn svg's, line by line.
Uh.
Really impressive.
Hopefully you twisted it.
You came up with something different.
You've got a great set of images, and you're enjoying this hands on experience, exploring the capabilities
of frontier models and open source models through the Open Router API.
And that now, finally, really is the conclusion of week two.
That's the end of the extra.
I hope you loved it.
Hope this left you excited about the real scientific ways coming up in week four, but for now, it's
time to take a breather and then go in to week three for open source models.
I can't wait to see you then.