# The Lamalo Engine guide

**Engine version:** `4.24.3` · [What changed in each version](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/changelog.md)

This is the page to read first, by a person or by an AI. It says what the engine is, how to reach it, and
which page answers which question. It is public: no key is needed to read it or any page it links to.

## What the engine is

One API to call a wide range of AI models across providers, built in three layers. Each layer is its own
server, and one key opens all three.

| layer | what it does | address |
| --- | --- | --- |
| 1. Models | Calls a model: chat, web search, images, audio, video, embeddings, OCR… OpenAI-compatible, so any OpenAI SDK works against it. | `https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1` |
| 2. Tools | Fixed-function tools over MCP: read and write a user's mail, drive, calendar, spreadsheets, Teams; read documents; retouch images; run pipelines. | `https://lamalo-engine-mcp-82364605132.europe-west1.run.app/mcp` |
| 3. Agents | Autonomous agents over A2A: give one a goal, it plans, uses tools and decides when it is done. | `https://lamalo-engine-agents-82364605132.europe-west1.run.app/agents` |

The three layers are equals: a task that is not a model call is often a tool (layer 2) or an agent (layer 3).

Layer 1 is a **superset** of OpenAI's API: every OpenAI field is accepted, and the engine adds a `lamalo`
object for what OpenAI has no word for: letting the engine pick the model (`auto`), restricting which
models it may pick, and tagging calls so you can read their usage back later.

## The rules people get wrong

1. **It is called from a backend, never from a browser.** The key belongs to your application, not to your
   users. Your backend calls the engine on their behalf.
2. **The engine reports usage and rates, never a price.** Each response carries the rate card in force
   (`lamalo.pricing`) and the usage; your application multiplies.
3. **`auto` is always available.** If a call with `auto` is refused, the error code says why. Most often it
   is `price_affecting_param_under_auto`: a parameter whose price depends on the model needs a named model.
4. **What your key sees depends on its kind.** A normal key lists exactly the models it can call. A
   privileged key lists the whole catalog, switched-off models included, and gets different `409` codes.
   Check yours with `GET /v1/whoami`, then read
   [Your key: normal or privileged](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/models.md#your-key-normal-or-privileged).
5. **Check before concluding the engine can't do something.** Read the page for the task below, ask the
   `guide` agent, and try one small call. The engine changes often: [what changed](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/changelog.md).

## Using the engine from a coding assistant (AGENTS.md / CLAUDE.md)

If you build with a coding assistant (Claude Code, Codex, Cursor…), add [the AGENTS.md block](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/agents-md.md)
to your project's `AGENTS.md` or `CLAUDE.md`, straight from the terminal:

```sh
curl -s https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/agents-md.md >> AGENTS.md
```

The assistant then knows where the engine is, how to choose a model, and which mistakes to avoid. The block
changes with the engine: fetch it again when the version above changes, rather than keeping an old copy.

## Which page answers what

| question | page |
| --- | --- |
| What changed in the latest versions? | [changelog](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/changelog.md) |
| What does an error code mean, and what do I do about it? | [errors](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/errors.md) |
| How do I call a model, choose one, read errors and cost? | [calling models](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/models.md) |
| Why does my key list models I can't call? | [normal or privileged key](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/models.md#your-key-normal-or-privileged) |
| How do I make or edit images, speech, sound or music, or split a recording into voice and music? | [images and audio](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/images-and-audio.md) |
| How do I find and run a tool? | [tools](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/tools.md) |
| How do I find an agent and delegate to it? | [agents](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/agents.md) |
| How do I create or change my own agent, or erase a conversation? | [agent settings](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/agent-settings.md) |
| How do I get an agent's result: wait, stream, or be called back? | [agent results](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/agent-results.md) |
| How do I answer a paused agent task, and what limits and budgets apply? | [agent runs](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/agent-runs.md) |
| How do I switch on the Lamalo extension to an agent's messages, and what does it add? | [the Lamalo A2A extension](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/a2a-extension-v1.md) |
| How do files travel through an agent task: what I send, what comes back, what to keep? | [files in an agent task](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/agent-files.md) |
| How do I let an agent call my own application's tools? | [your own tools in an agent run](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/agent-client-tools.md) |
| How do I chain model calls and tool calls into one run? | [pipelines](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/pipelines.md) |
| How do I make a model think harder or less? | [reasoning](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/reasoning.md) |
| Which mail, drive, calendar, chat and sheet tools exist? | [Google Workspace](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/google-workspace.md), [Microsoft 365](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/microsoft-365.md), [Dropbox](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/dropbox.md), [spreadsheets](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/spreadsheets.md) |
| Which CRM tools exist (contacts, companies, deals, notes, tasks)? | [ActiveCampaign](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/activecampaign.md) |
| How do I make a video or an avatar video, dub a video into another language, or re-sync its lips? | [video generation](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/video-generation.md), [avatars](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/avatars.md) |
| How do I ask questions about a video, or research the web in depth? | [video analysis](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/video-analysis.md), [deep search](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/deep-search.md) |
| How do I read the text out of a document? | [text extraction](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/text-extraction.md) |
| How do I get a probability instead of a sentence? | [decisions](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/decisions.md) |
| How do I drive a browser or a desktop? | [computer use](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/computer-use.md) |
| What is every layer-1 route, field and status code? | [the OpenAPI spec](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/spec.yaml) |

The same list, one line per page, is at
`https://lamalo-engine-oai-82364605132.europe-west1.run.app/llms.txt`. Opening the bare address,
`https://lamalo-engine-oai-82364605132.europe-west1.run.app`, brings you to this page.

## Asking instead of reading

- **The `explain_engine` tool** (layer 2) hands back any page of this guide by its topic name, for free.
  An AI connected to the tools server finds it with `search_tools`.
- **The `guide` agent** (layer 3) answers a question about the engine in plain words and names the page it
  used. It is the first agent in `GET /agents`.

Both need the same key as the rest of the engine; this guide itself does not.

## Something missing, or a bug?

If a model, a use-case or a feature you need is missing, or the engine does not do what its page says, email
[yacine@lamalo.ai](mailto:yacine@lamalo.ai). Say:

- what you called (route or tool, and the request without your key);
- the `X-Lamalo-Error-Id` header of the answer, if there was an error;
- the engine version printed at the top of this page, and the page you read.

Check [errors](https://lamalo-engine-oai-82364605132.europe-west1.run.app/v1/guide/errors.md) first: many refusals say exactly what to change in your request.
