# Opedd Cookbook

Five end-to-end walkthroughs covering the most common integration scenarios. Each is copy-paste runnable against `api.opedd.com` — sandbox tokens cost nothing, live tokens cost what the publisher set.

If you are an **AI lab engineer evaluating Opedd**, start with the [RAG bulk-export walkthrough](/cookbook-rag-bulk-export.md) — it's the fastest path to a real article in your training pipeline.

If you are a **publisher onboarding via Custom API**, start with the [Custom API ingest walkthrough](/cookbook-ingest-via-custom-api.md) — it covers the path from zero to a 5K-article catalog visible to buyers.

If you are **already integrated and need to keep your corpus fresh**, see the [delta-feed polling walkthrough](/cookbook-delta-feed-polling.md) — patterns for `?since=` consumption.

If you are **preparing a procurement-defense audit** for your legal team, see the [compliance dossier walkthrough](/cookbook-compliance-dossier.md) — patterns for `/buyer-compliance-report` consumption.

If you are **building tests or staging integration without touching production state**, see the [sandbox & test environment walkthrough](/cookbook-sandbox-testing.md) — canonical sandbox onboarding for both buyer-side and publisher-side integrators.

If you are **operating an existing license / publisher account** (re-issuing client secrets, public license verification, KYC attestation, pricing template selection, usage charts, sub-article retrieval), see the [license lifecycle walkthrough](/cookbook-license-lifecycle.md) — covers Phase 12 Wave 4-6 operational endpoints.

---

## The six walkthroughs

| # | Walkthrough | Persona | Endpoints exercised | Time to complete |
|---|---|---|---|---|
| 1 | [**Custom API: ingest 5K articles**](/cookbook-ingest-via-custom-api.md) | Publisher engineer | `POST /publishers-api-keys`, `POST /publishers-content`, `GET /api?action=articles` | 30 min |
| 2 | [**RAG bulk export with NDJSON**](/cookbook-rag-bulk-export.md) | AI lab engineer | `POST /enterprise-auth` (sandbox), `GET /publisher-directory`, `POST /enterprise-license`, `GET /enterprise-license?format=ndjson` | 20 min |
| 3 | [**Delta-feed polling**](/cookbook-delta-feed-polling.md) | AI lab engineer (post-integration) | `GET /enterprise-license?since=...` | 10 min |
| 4 | [**Compliance dossier**](/cookbook-compliance-dossier.md) | AI lab procurement / legal | `GET /buyer-compliance-report`, `GET /buyer-audit` | 15 min |
| 5 | [**Sandbox & test environment**](/cookbook-sandbox-testing.md) | Integrator (buyer-side OR publisher-side) | `POST /enterprise-auth` (create_sandbox), `POST /publishers-api-keys` (test env), `POST /publishers-sandbox-reset` | 20 min |
| 6 | [**License lifecycle operations**](/cookbook-license-lifecycle.md) | Buyer + publisher (post-onboarding) | `POST /enterprise-license-reissue-secret`, `GET /verify-license`, `GET /eu-ai-act/article-53-attestation`, `GET /content-delivery?section_id=`, `GET /pricing-templates`, `POST /publisher-kyc-attestation`, `GET /publishers-usage` | 25 min |

All four use the canonical Opedd API at `https://api.opedd.com`. Authentication patterns:

- Publisher endpoints: `Authorization: Bearer opedd_pub_<32-hex>` (live) or `opedd_pub_test_<32-hex>` (sandbox)
- Buyer endpoints: `Authorization: Bearer opedd_buyer_live_<32-hex>` (paid) or `opedd_buyer_test_<32-hex>` (sandbox)
- Buyer self-serve management: `Authorization: Bearer <supabase-jwt>` (magic-link auth)

---

## Choose your language

All examples are shown in both `curl` (universal) and **Python with the `opedd` SDK** (`pip install opedd`). The SDK ships pinned to backend schema `phase-11-m4`; new buyer-facing endpoints surface in the SDK within 1 sprint of the backend ship per the [schema-pin contract](https://github.com/Opedd/opedd-python#schema-version-pinning).

There is no JavaScript / Go / Ruby SDK yet. Use the `curl` examples + your language's standard HTTP client; the wire format is documented in [openapi.json](/openapi.json).

For Claude Desktop, Cursor, and other MCP-aware editors, see the [MCP server walkthrough](/mcp-server.md) — `npx opedd-mcp` exposes the same endpoints as tools your AI assistant can call directly.

---

## Strategic context

Opedd is the programmatic licensing rail for the human and AI era — rights, usage tracking, and payment infrastructure between publishers and AI buyers. "Stripe for content licensing." 20% take rate on transactional fiat settlement; on-chain attestation on Tempo blockchain (Stripe + Paradigm L1).

The cookbook walkthroughs assume you already understand WHY you would integrate Opedd. If you're still evaluating, see the [openapi.json reference](/openapi.json) or email [support@opedd.com](mailto:support@opedd.com).

---

## See also

- [openapi.json](/openapi.json) — full API reference (Scalar-rendered)
- [audit-events.md](/audit-events.md) — Phase 8 audit ledger taxonomy
- [compliance/framework-anchors.md](/compliance/framework-anchors.md) — regulatory framework mapping
- [python-sdk.md](/python-sdk.md) — Python SDK installation and shape reference
- [mcp-server.md](/mcp-server.md) — MCP server installation and tool inventory
