Clear ExchangeDocs Live demo

Licence terms

Every offer, accept response, entitlement and retrieval carries the same key licence terms: a fixed set of structured fields covering what buyers ask about most, plus a one-line plain-English summary. Publishers set them on their rate cards. Anything they leave out gets a sensible default. Buyers can filter queries on them.

The code is in src/ratecard/licence.ts. This page describes what the exchange records and enforces. It is not legal advice.

Example

offer.licence.key_terms for a Fieldnote Science article sold at display_snippet:

{
  "v": 1,
  "commercial_use": true,
  "attribution_required": true,
  "attribution": "Fieldnote Science",
  "share_alike": false,
  "caching": { "allowed": true, "max_seconds": 604800 },
  "reuse_across_end_users": false,
  "display": "snippet",
  "max_display_chars": 400,
  "ai_training": "prohibited",
  "content_licence_id": null,
  "indemnity": {
    "status": "not_defined",
    "note": "Clear Exchange has not yet published an indemnity or liability position. None is given or implied by this offer."
  },
  "summary": "Commercial use OK; credit Fieldnote Science; snippet up to 400 characters; cache 1 week; one end user per retrieval; no AI training."
}

And a Wikipedia article (CC BY-SA 4.0) at display_snippet:

{
  "commercial_use": true,
  "attribution_required": true,
  "share_alike": true,
  "caching": { "allowed": true, "max_seconds": 31536000 },
  "reuse_across_end_users": true,
  "display": "snippet",
  "max_display_chars": null,
  "content_licence_id": "CC-BY-SA-4.0",
  "summary": "Commercial use OK; credit the source; share adaptations under the same licence (CC-BY-SA-4.0); snippet display; cache 1 year; reusable across end users."
}

Fields

FieldTypeMeaning
vintegerVersion of this object, 1.
commercial_usebooleanThe buyer may use the content in a commercial product or service.
attribution_requiredbooleanThe buyer must credit the source when it uses the content. True when the rate card sets citation_required, and always for openly licensed content (every Creative Commons licence requires attribution).
attributionstring or nullWho or what to credit, when the publisher says.
share_alikebooleanAdaptations must be shared under the same licence (the "SA" in CC BY-SA).
caching.allowed, caching.max_secondsboolean, integerWhether the buyer may cache the content, and for how long (the rate card's retention_seconds; 0 when caching is not allowed).
reuse_across_end_usersbooleanOne retrieval may be used to answer more than one of the buyer's end users within the caching window. False means one retrieval serves one end user.
displaystringWhat may be shown verbatim to an end user: grounding_only (nothing; the content may only inform the answer), snippet or full_text. It follows the usage tier sold.
max_display_charsinteger or nullThe most characters that may be shown: 0 for grounding only, the card's max_snippet_chars for a snippet, null for no limit (full text, and openly licensed content, where the open licence governs).
ai_trainingstringprohibited, or per_content_licence (the open licence governs).
content_licence_idstring or nullSPDX-style id of the open licence that governs the item, such as CC-BY-SA-4.0. For Wikinews this is the article's own licence.
indemnityobjectPlaceholder. See Indemnity and liability.
summarystringOne plain-English line describing the fields above.

The full rate card terms for the tier sold are still in licence.terms, as the publisher wrote them.

Where the terms appear

  • Offers: offers[].licence.key_terms in POST /v1/query and POST /v1/acquire.
  • Accept: licence.key_terms in the POST /v1/offers/{offer_id}/accept response.
  • Entitlements: cx.key_terms, signed into the token, so a publisher or auditor can check exactly what was sold. Tokens issued before this field existed omit it; it is optional for verifiers.
  • Retrieval: licence.key_terms in GET /v1/content/{content_id}.
  • Web UI: the agent console shows the key terms as chips and the summary under each offer, the summary on the entitlement and retrieved content, and the licence flags on each publisher's rate card.

Defaults

Publishers set four flags on the rate card (schema 1.2, in default_terms or per tier). When a card leaves one out:

FlagDefault
commercial_usetrue (a paid licence is a commercial licence), unless the content's open licence is non-commercial (an NC licence id).
share_alikeThe content licence's share_alike, else false. A card cannot set it to false when the open licence is share-alike.
caching_allowedtrue when retention_seconds is above zero. It cannot be true when retention_seconds is 0.
reuse_across_end_userstrue for openly licensed content (the open licence already allows it), otherwise false, so a publisher opts in.

Attribution comes from citation_required and attribution; caching duration from retention_seconds; display from the tier and max_snippet_chars. Those fields are unchanged.

All shipped demo cards state every flag explicitly. In the demo, Cobble & Byte, Quaymark Reference, Stackhollow Guides, Emberline Preprints and the Wikimedia sources allow reuse across end users; Emberline Preprints is licensed for non-commercial use only; Wikipedia is share-alike.

Filtering queries

Add licence filters to constraints on POST /v1/query or POST /v1/acquire. Each filter only narrows results in one direction; the other value is the same as leaving it out.

ConstraintEffect
commercial_use: trueOnly content licensed for commercial use.
share_alike: falseExclude share-alike content (for example CC BY-SA).
attribution_required: falseExclude content that must be credited. citation_required: false does the same.
caching_allowed: trueOnly content that may be cached.
min_cache_seconds: NOnly content that may be cached for at least N seconds.
reuse_across_end_users: trueOnly content where one retrieval may serve many end users.
curl -s localhost:8080/v1/query -d '{
  "query": "how do I configure retries in an http client",
  "agent_id": "my-agent",
  "max_price": { "amount": "0.02", "currency": "USD" },
  "constraints": { "commercial_use": true, "share_alike": false, "reuse_across_end_users": true }
}'

Filters apply to the terms of the tier actually sold, after pricing. Excluded offers count in stats.filtered_by_constraints. If the filters exclude every relevant candidate, the answer is no_match.reason: "filtered_by_constraints".

Indemnity and liability

PLACEHOLDER: to be decided by Paul. Clear Exchange has not set an indemnity or liability position for content bought through it. Nothing in this documentation, the API or an entitlement gives or implies one. Until a position is agreed, every key_terms.indemnity is { "status": "not_defined", ... }. When it is decided, it goes in INDEMNITY_PLACEHOLDER in src/ratecard/licence.ts and in this section.

Open licences

For openly licensed content (Wikinews CC BY, Wikipedia CC BY-SA) the open licence governs reuse. The key terms report what it requires (attribution, share-alike) and never narrow what it grants: there is no display cap, and reuse across end users is allowed. The price is for the exchange's retrieval, entitlement and telemetry service. See Live sources.