Kevin Simper

Kevin Simper

I work at my own startup that makes AI Agents for Bid Managers. I write about tech, make videos on youtube about programming and organize meetups.

How to give Gemini AI API multiple files

The Problem

I am working with Google Gemini AI API on Herkules.dk and when you upload multiple files to Google's Gemini API using the Files API, there's no built-in way to reference which file is which in your conversation. The API doesn't preserve the original filename in a way that's accessible to the model, it only gets the file URI and MIME type. I think that is a bit weird.

Here's what happens when you upload files:

const file = new File([buffer], "report-2025.pdf", { type: "application/pdf" });
const response = await ai.files.upload({ file });
Read full post

How to use Common Crawl to find your website

Common Crawl archives billions of web pages and makes them freely available. Here's how to check if your site is indexed and extract the content.

Check if your site is indexed

curl -s "http://index.commoncrawl.org/CC-MAIN-2024-42-index?url=kevinsimper.dk&output=json" | head -1

This returns JSON with your page details. Count how many pages are indexed:

Read full post

Making Defencetech more visible with AI

I am making a new website in denmark that helps highlight companies in danish defencetech.

I was visiting the danish Dalo Days in Ballerup. DALO is the Defence Acquisition and Logistics Organsation in Denmark. I was held on the 20th and 21st August and it was pretty incredible seeing all companies selling and trying to sell the danish defence. There were around 800 companies exhibiting.

FMI (Forsvarsministeriets Materiel- og Indkøbsstyrelse) is a huge organization and each year publish a document of what they are looking to buy. For 2025 they published a report you can see here, and for just IT which was the shortest section, they were looking to aquire for estimated 154 to 354 million Danish kroner.

Read full post

Google Gemini is picky about file formats

The current forms of LLMs are reached by an API call, and to make them easier to work with they are supposed to be stateless. That also means they are not more clever than the people that programmed it.

That means that Google Gemini only supports png, jpeg and webp. That is peculiar. 200 IQ but can not read common images like .gif, .heic, .tiff

That gives us two options:

  • Predictable: convert it before giving it to the LLM
  • Unpredictable: give the LLM access to file storage and have it use tools to convert it itself
Read full post