# ContextKit Bankr x402 Endpoints

ContextKit exposes paid context APIs through Bankr-hosted x402 services. The caller approves payment in Bankr and receives ContextKit JSON.

No ContextKit API key, npm package, or SDK is required for hosted x402 calls.

## Summarize

Price: $0.05

```bash
bankr x402 call https://x402.bankr.bot/0xdace98cd605dd56b2edc66f0f4df3687f64fd824/contextkit-summarize \
  -X POST \
  -d '{"messages":[{"role":"user","content":"Summarize this project state for the next AI agent."}],"mode":"compact"}'
```

## Compress Context

Price: $0.03

```bash
bankr x402 call https://x402.bankr.bot/0xdace98cd605dd56b2edc66f0f4df3687f64fd824/contextkit-compress \
  -X POST \
  -d '{"messages":[{"role":"user","content":"Compress this project context into compact memory."}]}'
```

## Handoff

Price: $0.03

```bash
bankr x402 call https://x402.bankr.bot/0xdace98cd605dd56b2edc66f0f4df3687f64fd824/contextkit-handoff \
  -X POST \
  -d '{"messages":[{"role":"user","content":"Create a project handoff for the next AI agent."}]}'
```

## Profile And Memory Enrichment

Price: $0.04

```bash
bankr x402 call https://x402.bankr.bot/0xdace98cd605dd56b2edc66f0f4df3687f64fd824/contextkit-profile \
  -X POST \
  -d '{"messages":[{"role":"user","content":"Extract durable user preferences and profile memory."}],"mode":"extract-profile"}'
```

Memory enrichment:

```bash
bankr x402 call https://x402.bankr.bot/0xdace98cd605dd56b2edc66f0f4df3687f64fd824/contextkit-profile \
  -X POST \
  -d '{"messages":[{"role":"user","content":"Update stable and evolving memories from this conversation."}],"mode":"memory-enrichment"}'
```

## Long Context

For long inputs, upload to ContextKit first, then call Bankr with contextId.

```bash
cat > long-context.txt <<'CONTEXTKIT_LONG_CONTEXT'
Paste the long conversation or document here.
CONTEXTKIT_LONG_CONTEXT

curl -X POST "https://contextkit.pro/api/context/upload-text?endpoint=summarize&mode=compact" \
  -H "Content-Type: text/plain" \
  --data-binary @long-context.txt
```

Then:

```bash
bankr x402 call https://x402.bankr.bot/0xdace98cd605dd56b2edc66f0f4df3687f64fd824/contextkit-summarize \
  -X POST \
  -d '{"contextId":"ctx_REPLACE_ME","mode":"compact"}'
```
