# Slideshot

Record product demos from a text description.

Slideshot takes a target web app URL plus a goal, drives the product flow, and returns ready-to-share video artifacts. It is designed for agent-driven workflows over API.

## What it does

- Turns a prompt into a browser run against your product.
- Records the run and returns public artifacts for the raw video, demo video, and plan.
- Supports credentials for authenticated app flows.
- Works well from terminal agents, CI pipelines, and automations.

## Basic API flow

1. Create a run with `POST /v1/agent/runs`.
2. Poll `GET /v1/agent/runs/:id` until the run finishes.
3. Fetch outputs from `GET /v1/agent/runs/:id/artifacts`.

```bash
curl -X POST https://api.slideshot.ai/v1/agent/runs \
  -H "x-api-key: sk_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "target_url": "https://app.example.com",
    "goal": "Sign in, create a project, and show the analytics dashboard.",
    "options": {
      "auth": {
        "source": "default"
      },
      "video": {
        "cursor": "large",
        "blur_emails": true,
        "background": {
          "type": "solid",
          "color": "#0B1020"
        },
        "size": {
          "width": 1440,
          "height": 900,
          "content": {
            "scale": 0.9
          }
        }
      }
    }
  }'
```

```json
{
  "run_id": "11111111-2222-3333-4444-555555555555"
}
```

## Timing

- Typical runs finish in under 5 to 10 minutes.
- Longer recordings depend on total video length and app complexity.
- Very long demos can take 20+ minutes.

## Outputs

Use `GET /v1/agent/runs/:id/artifacts` to list artifact names and download URLs.

Public artifacts include:

- `raw.mp4`
- `demo.mp4`
- `plan.json`

Additional run artifacts may be retained internally for debugging and operations, but are not returned from the public API.

## Credentials

Create credentials with `POST /v1/agent/credentials`, then pass `options.auth.source: "default"` to use the domain default credential or `options.auth.source: "saved"` with `options.auth.id` to use a specific saved credential.

## Video options

- Set `options.video.shortcuts` to `true` to render shortcut overlays in `demo.mp4`.
- Set `options.video.cursor` to `"small"`, `"default"`, `"large"`, or `"none"` to control synthetic cursor size in the polished demo render. If omitted, runtime behavior matches `"default"` without mutating the stored request payload.
- Set `options.video.background` to add framing and a solid or gradient background in `demo.mp4`.
- Set `options.video.size.width` and `options.video.size.height` to control the final output size. When background framing is enabled, `options.video.size.content` controls the inner live capture viewport.
- Set `options.video.blur_emails` to `true` to mask visible email addresses during capture. This affects `raw.mp4` too, not just the polished demo render.

## Notes for agents

- Authenticate with an API key in the `x-api-key` header.
- Expect asynchronous processing; the create call returns immediately with a `run_id`.
- Handle both success and failure terminal states while polling.
