> ## Documentation index
> Fetch the complete documentation index at: https://docs.heurastudios.com/llms.txt
> Use this file to discover all available pages before exploring further.

# HTTP interface

> Call the Agent mode tools over plain HTTP and JSON, upload files without passing them through the agent's context, and download packages.

Source: https://docs.heurastudios.com/agents/http/

Agents that don't speak MCP use the same four tools over plain HTTP. Every request carries the agent key as a bearer token.

| Request | What it does |
| --- | --- |
| `GET /agent` | Lists the tools and their actions. |
| `POST /agent/<tool>` | Calls a tool with a JSON body. |
| `POST /agent/upload/<model>` | Adds a file's raw bytes to a model's files. |
| `GET /agent/download/<file>` | Downloads a package an export made. |

All under `https://app.heurastudios.com`.

## Call a tool

```bash
curl https://app.heurastudios.com/agent/heura_write \
  -H "Authorization: Bearer $HEURA_AGENT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"do": "add_eval", "model": "quarry-3f9a1c2b7d", "q": "What was revenue in March?", "must": ["shipped_at"], "must_not": ["created_at"]}'
```

The body is the same as an MCP call's arguments. See the [tools reference](https://docs.heurastudios.com/agents/tools/).

## Upload a file

An agent with a shell can send a document straight from disk, so its bytes never pass through the agent's context. Send the raw bytes as the body and the file's name in `X-Filename`:

```bash
curl https://app.heurastudios.com/agent/upload/quarry-3f9a1c2b7d \
  -H "Authorization: Bearer $HEURA_AGENT_KEY" \
  -H "X-Filename: schema.md" \
  --data-binary @schema.md
```

The same limits apply as in the Studio: PDF, Word, text, Markdown, CSV and HTML, up to 20 MB.

## Download a package

`heura_write` `do=export` returns the package's file name and a `download` path. Fetch it with the same key:

```bash
curl -OJ https://app.heurastudios.com/agent/download/<file> \
  -H "Authorization: Bearer $HEURA_AGENT_KEY"
```

## Responses

Responses are cut down to what an agent acts on: no empty values, no page copy, lists as one header row and data rows, and long text cut short (pass `id` and `full: true` for one row whole). A refusal is JSON with `error`, `status` and, when waiting helps, `retry_after`, with a `Retry-After` header to match.

> **Note:**
>
> Calls from web pages are refused: Agent mode is for agents and scripts, not browsers.
