Artificial intelligence
OpenAI models
Hosted frontier models called over HTTP from server code, used for image understanding and generated content.
OpenAI models are called over HTTP from your own server code with an API key, billed per token in and out. Images cost more than text, and a photograph is a lot of tokens. What you buy is capability you cannot get from a small open model: reading a picture and returning structured facts about it, or writing prose that a person will read without wincing. What you take on is a dependency with a price list, a rate limit and a deprecation schedule.
How we use it
In 360nutri the whole product rests on one call. A user photographs a meal, the image goes to a Supabase edge function, and gpt-4o vision returns calories, protein, carbohydrate, fat, fibre, sugar, sodium, a detected ingredient list, a food category and a confidence score. The user confirms the reading before it is written to their log, which matters more than it sounds: the model is estimating, and the person holding the plate is a better judge than the model is.
The same account does two other jobs there. A second edge function takes the user's profile and recent meals and produces meal suggestions inside their calorie target and dietary restrictions, with a per-day cap on the button. A scheduled job writes the recipe library on an hourly cron, filling a section of the app that would otherwise launch empty, which is a pattern we have used more than once and written about in seed data and empty launches.
What it costs you
The bill scales with usage in a way a subscription price has to cover. Photo analysis at a few pence a call is fine at a hundred users and a decision at a hundred thousand, so the unit economics need doing before launch rather than after. A scheduled generation loop is worse, because it spends money whether or not anyone is reading the output; 360nutri's hourly recipe cron has a control table specifically so it can be switched off.
The key stays server side. Every call in that build goes through an edge function, never from the browser, because a key in a single-page bundle is a key you have published. Responses are not deterministic and not guaranteed to match the shape you asked for, so parse defensively. The confidence score the model returns is the model's own opinion, not a measured accuracy figure, and we do not present it as one.
Then there is the supplier. Model snapshots are retired, prices change, and the endpoint that worked in March behaves differently in September. Anything user-visible should degrade to a manual path, because the alternative is a product that stops working on someone else's release schedule.
When we would choose something else
For high volume, low stakes work such as moderation checks, category suggestions or embeddings, we would run a small open model on the platform we are already on rather than pay per token, which is Workers AI. For retrieval, an embedding model plus vector search beats asking a chat model to remember your data. And for anything that is arithmetic rather than judgement, ordinary code wins: a calorie total from a confirmed ingredient list is a sum, not a prompt.
Where we have used it
Every build below lists this in its stack, so the claim is checkable.