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

# REST API

> Koppar's agent tools as HTTP endpoints: list the tools with JSON Schemas, call one by name, and download the KiCad project, BOM and Gerbers by URL.

The MCP tools are also plain HTTP endpoints. Same names, same arguments, same bearer key.

## Authentication

Every request carries `Authorization: Bearer sc_…`. The key is minted in the studio under **Settings → Design from your own AI agent**.

## List the tools

```http theme={null}
GET https://app.koppar.ai/api/agent/tools
```

Returns `{ "tools": [ … ] }`. Each entry has `name`, `title`, `description`, `read_only`, `destructive` and `input_schema` (JSON Schema).

## Call a tool

```http theme={null}
POST https://app.koppar.ai/api/agent/tools/<name>
Content-Type: application/json
```

The body is the tool's arguments. The response is the tool's result as JSON.

```sh theme={null}
curl -s https://app.koppar.ai/api/agent/tools/create_design \
  -H "Authorization: Bearer sc_…" \
  -H "Content-Type: application/json" \
  -d '{"brief":"USB-C powered ESP32-C3 board with a BME280 over I2C","title":"ESP32-C3 sensor"}'
```

| Status | Meaning |
| - | - |
| 200 | The tool ran. The body is its result. |
| 400 | Arguments did not match the schema. `issues` lists the paths. |
| 404 | Unknown tool name. |
| 4xx with `detail` | The tool refused: no such design, no circuit yet, a board already running. |

## Downloads

`get_downloads` returns one URL per artifact under `https://app.koppar.ai/api/result/<design id>/…`, each with `available` and, when not available, a `note` saying why. Fetch them with the same bearer header.

| Artifact | Available when |
| - | - |
| `circuit.py`, `netlist`, `schematic.zip`, `bom.csv`, `project.zip` | A circuit has compiled |
| `board.kicad_pcb`, `board.glb` | A board exists |
| `gerbers.zip`, `order.zip` | The board has zero serious DRC errors and nothing unconnected |

See the [MCP page](/agents/mcp#tools) for the tool list and what each one does.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.