OpenAI and Gemini integration

We wire language models into products as a working part, not a demo: a step whose output is checked, whose cost is tracked and whose data flow is known.

We connect OpenAI and Gemini to real products: schema-bound output, tracked cost, human and automated checks. Running in Logaritim, Rigel and LydiaVault.

Last updated:

What we have built with it

All of them are live; store pages and details are on the Products page.

Logaritim

Question pool and exam builder

Gemini reads the questions in PDFs into structured data and writes new ones; every question comes out schema-bound, then goes through a blind solver and a judge model.

See the product

Rigel

AI video app

OpenAI edits each video prompt before generation, or rewrites it safely, and translates template texts; the calls run on the server.

See the product

LydiaVault

AI budgeting coach

A budgeting chat powered by OpenAI: the user’s question goes from the server to the model together with a summary of their accounts and transactions.

See the product

Our team’s experience

These are not Pepechura client projects; our team worked inside these companies’ own teams.

Subtraid

SaaS platform for the construction industry

Our team worked on Playwright-based, AI-assisted end-to-end test automation from inside Subtraid’s own development team.

When a language model adds value to a product

A language model is good at reading messy text into tidy data, writing short texts and turning a text into another format or language. It is weak at exact arithmetic, recalling a record word for word and giving the same answer every time. So we do not hand it the whole product; we place it in a single step whose input is known, whose output can be checked and which can be undone when the model is wrong.

Work a language model fits well

  • You need structured data out of messy text such as PDFs, emails or forms
  • You want to turn free text a user types (a prompt, a question) into something your system can process
  • You need the same content in several languages, or many pieces of content in the same pattern
  • You can build a flow in which a person or an automated check reviews what the model produces

Work we would not give a language model

  • The result must be exact and identical every time: an invoice total, a tax or stock calculation. Ordinary code does this more accurately and more cheaply
  • A model error would reach a customer or money directly, and there is no way to put a check in between
  • The data cannot leave for a third-party provider because of a contract or regulation

What language models do in our products

ProductProviderThe model’s jobCheck
LogaritimGemini (Vertex AI or the Gemini API)Reading the questions in PDFs into structured data and writing new questions against curriculum outcomesSchema-bound output; blind solver and judge; only approved questions go into exams
RigelOpenAIEditing the video prompt before generation and bringing it in line with content rules; translating template textsIf the model does not answer, the user’s original prompt is used; translations are checked for every requested language
LydiaVaultOpenAIA chat that answers the user’s questions about their budgetThe model sees only that user’s summary of accounts, goals and transactions

Our most complete example is Logaritim. Course-material PDFs are read page by page; pages whose text can be extracted directly are not sent to a model to be read, and only pages that must be read as images go to Gemini. Every generated question is handed to a solver model that cannot see the answer key; a judge model compares the two answers and marks the question “approved”, “rejected” or “needs fix”. Only approved questions go into exams, and an admin can also reject a question by hand from the dashboard.

What we watch when wiring a model into a product

Schema-bound output

In Logaritim the schema of the expected answer (Pydantic) is passed straight to Gemini, so the model cannot invent a field name. In Rigel the translation response is validated with a zod schema.

Tracked cost

In Logaritim every model call is logged with its input, output and thinking tokens, and the cost is worked out per job. How much the model may “think” is also capped per task.

The model does not decide

Logaritim has a blind solver and a judge. In our own internal tools, too, a message the model writes is only a draft; a person decides whether to send it.

What data is sent

In LydiaVault the user’s name and email are not sent to the model, only the summary needed to answer the question. In Rigel only the prompt text goes to the model, not the photo.

A fallback path

In Rigel the flow does not stop if the model fails to answer; it carries on with the original prompt. In Logaritim, when a model is overloaded or out of quota, the next model in line takes over.

Keys stay on the server

API keys live on the server, not inside the mobile app; in Rigel the key is read from AWS Secrets Manager.

How a language model integration runs

  1. 01

    Free scoping call

    30 min

    We talk about which job the model will take on, which data will go to the provider and where errors will be caught.

  2. 02

    Written scope and quote

    We write down the input and output schema, the provider and account type, the acceptance criteria and how usage cost will be tracked.

  3. 03

    Weekly releases

    Every week you see a build working on your own sample data; the examples that come out wrong set the next week’s prompt and check changes.

  4. 04

    Testing and release

    A senior QA tests the flow before release; besides the expected outputs, the scenarios cover broken input, empty responses and a provider that does not answer.

  5. 05

    The 30 days after launch

    30 days

    We fix the bugs that surface in this period free of charge; after that you can continue with monthly maintenance.

Timelines and budget ranges are on our AI automation, AI agent and pricing pages. Besides the development fee there is a model usage cost that depends on your volume; we estimate it together at the quote stage.

Questions about OpenAI and Gemini integration

OpenAI or Gemini?

We use both: Gemini in Logaritim, OpenAI in Rigel and LydiaVault. We choose by the kind of work, where the data is allowed to go and the usage cost. We route model calls through a single layer, so a change of provider or model stays inside that layer.

Will our data be used to train the model?

OpenAI’s and Google’s terms for API and business use provide that the data you send is not used to train their models; free usage tiers can have different terms. We put in writing at the start which account will be used and which fields will go to the model.

What happens when the model gets it wrong?

We assume it will, from the start. We bind the output to a schema, reject responses that do not fit it, and show the result to a person or a second check. In Logaritim the solver model can report that none of the options is correct, and that is used as a sign that the question itself may be broken.

How is usage cost kept under control?

We send the model only the data it needs: in Logaritim pages with readable text are not sent to a model to be read, and in LydiaVault a summary of a set period goes instead of the whole history. We log the token count and estimated cost of every call, so you can see which job the cost comes from.

What do I keep when the project ends?

A perpetual licence to use the software, and its documentation. Transferring the source code to you is possible for an extra fee, stated separately in the quote.

Related services

AI agentsAI automationCustom softwareMobile app
Contact

Let’s talk about where a language model fits in your product

In a free 30-minute scoping call we work out together which job the model takes on, which data goes to the provider and how its output will be checked.