---
title: "Run"
method: POST
path: "/api/desktop/runs"
tags: ["desktop"]
---

# Run

`POST /api/desktop/runs`

## Request

- Base URL: `https://backend.snapmagic.com` (the document declares no server; this is the origin it was published from)
- URL: `https://backend.snapmagic.com/api/desktop/runs`
- Auth: none declared

## Headers

- `authorization` string

## Request body

- RunRequest
  - `id` string, required
  - `message` string, required
  - `history` Message[]
    - `role` 'user' | 'assistant', required
    - `content` string, required
  - `context` Context
    - `id` string, required
    - `name` string, required
    - `revision` string, required
    - `format` 'eagle' | 'kicad' | 'altium' | 'png' | 'jpeg' | 'pdf', required
    - `content` string, required
  - `previousArtifact` object, nullable
  - `search_mode` 'legacy' | 'website'
  - `surface` 'desktop' | 'web'
  - `is_test` boolean
  - `capabilities` string[]

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/snapmagic/apis/snapmagic-api.md) - [All operations](https://skmtc.dev/snapmagic/apis/snapmagic-api/llms.txt) - [OpenAPI document](https://skmtc.dev/snapmagic/apis/snapmagic-api/revisions/db14522771a6?raw)
