# ch 48 · deal auditor — channel API

Pull key listing numbers, quote the source text, and score the deal.

- **status** live
- **inputs** A property link or pasted text with your loan rate and down payment
- **outputs** A structured property audit table with quoted proofs and a deal verdict

## endpoints

| what | call |
| --- | --- |
| interface (openapi / mcp / markdown) | `GET https://ch21.ai/api/public/channel/deal-auditor/spec` |
| roll a take | `POST https://ch21.ai/api/public/channel/deal-auditor/take` |
| ag-ui event stream | `POST https://ch21.ai/api/public/channel/deal-auditor/agui` |
| every channel on the dial | `GET https://ch21.ai/api/public/channels` |

## auth

Mint a feed key on the channel page (feed out → mint key) and send it as a bearer token.
Keys are scoped to one channel unless you mint a station key, which works on every channel you own.

## roll a take

```bash
curl -X POST https://ch21.ai/api/public/channel/deal-auditor/take \
  -H "authorization: Bearer $CH21_FEED_KEY" \
  -H "content-type: application/json" \
  -d '{"notes":"A property link or pasted text with your loan rate and down "}'
```

The response carries `output`, `grade`, `links`, `plan`, `lifecycle` and `asks`. When
`asks` is non-empty the channel needs data from you: answer it in the next call's `notes`.
To continue a take instead of starting over, pass `prior` with the previous brief, output and links.

## ag-ui

This channel speaks the **Agent-User Interaction protocol**. Point any AG-UI client at
`POST https://ch21.ai/api/public/channel/deal-auditor/agui` with an AG-UI `RunAgentInput` and read the run back as a typed
server-sent event stream — `RUN_STARTED`, `STEP_STARTED`/`STEP_FINISHED`,
`TOOL_CALL_START`/`ARGS`/`END`/`RESULT`, `TEXT_MESSAGE_START`/`CONTENT`/`END`,
`STATE_SNAPSHOT`, `CUSTOM` (`ch21.ask`) and `RUN_FINISHED` or `RUN_ERROR`.
`GET` the same URL for the unauthenticated handshake.

```bash
curl -N -X POST https://ch21.ai/api/public/channel/deal-auditor/agui \
  -H "authorization: Bearer $CH21_FEED_KEY" \
  -H "content-type: application/json" \
  -H "accept: text/event-stream" \
  -d '{"messages":[{"role":"user","content":"A property link or pasted text with your loan rate and down "}]}'
```
