One endpoint. Evidence included.
A small REST API for specific questions about published terms.
1. Submit a question
Generate and save a random UUID as your secret Idempotency-Key. Send exactly one of source_url or source_text.
curl https://termscheck.online/api/v1/check \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: YOUR_RANDOM_UUID' \
-d '{"source_url":"https://example.com/terms",
"question":"Can an autonomous commercial agent use this API?",
"tier":"standard"}'Optional: context, preferred_output_language (BCP-47, e.g. ru, es, ja), additional_urls, discover_related. Public HTML and plain text are supported; paste extracted text from PDF or other formats. The maximum request size is 160,000 bytes.
2. Pay with x402
A 402 response includes PAYMENT-REQUIRED, a base64-encoded x402 v2 challenge. Use a compatible client to authorize the exact USDC amount on Base and resend the identical request with PAYMENT-SIGNATURE. The receiving address and network are in the challenge. Your wallet keys stay with you.
import { x402Client, wrapFetchWithPayment } from '@x402/fetch';
import { registerExactEvmScheme } from '@x402/evm/exact/client';
// signer is your existing authorized wallet signer.
const client = new x402Client();
registerExactEvmScheme(client, { signer });
const paidFetch = wrapFetchWithPayment(fetch, client);
const key = crypto.randomUUID(); // persist before the request
const response = await paidFetch(
'https://termscheck.online/api/v1/check', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Idempotency-Key': key
},
body: JSON.stringify({
source_url: 'https://example.com/terms',
question: 'Can an autonomous agent use this API?',
tier: 'standard'
})
}
);
const report = await response.json();Read current pricing or call POST /api/v1/quote with the same input before authorizing payment. Set a spending policy in your own agent wallet. The browser interface uses a connected EVM wallet.
3. Inspect the answer
{
"request_id": "…",
"answer": "allowed_with_conditions",
"summary": "Commercial agents are permitted with conditions.",
"conditions": [{
"text": "Identify the agent and follow rate limits.",
"evidence": [0]
}],
"relevant_provisions": [{
"id": 0,
"source_url": "https://example.com/terms",
"document_title": "Example API Terms",
"section": "Commercial access",
"text": "Autonomous agents may use this API commercially…",
"relevance": "Explicit permission with qualifications."
}]
}Illustrative excerpt only. The full report includes restrictions, all reviewed sources, SHA-256 fingerprints, retrieval timestamps, source date text, conflicts and limitations. Citation indexes are zero-based.
| Answer | Meaning |
|---|---|
allowed | Explicit supporting permission. |
prohibited | An applicable published prohibition. |
allowed_with_conditions | Permission subject to stated conditions. |
unclear | Ambiguity, conflict or incomplete document coverage. |
insufficient_information | No sufficient verified evidence for an answer. |
4. Retrieve or safely retry
GET /api/v1/requests/{request_id}
Authorization: Bearer YOUR_ORIGINAL_IDEMPOTENCY_KEYReports are private to the request key. Processing is normally synchronous. A 202 means a request with this key is already running; retrieve its status. There is no detached background job.
A paid provider or retrieval failure can be retried twice with the identical input and key, without a payment header. After an ambiguous settlement, preserve the request ID and do not authorize another payment. An interrupted processing invocation becomes retryable after six minutes. Changing the input under the same key returns 409.
Errors
{"error":{"code":"invalid_url","message":"Use a public HTTP(S) document URL…"}}| 400 | Invalid input, URL, question or tier limits |
| 401 / 404 | Missing retrieval key or report not found |
| 402 | Payment required or rejected |
| 409 | Idempotency conflict or reused payment |
| 413 / 415 | Request too large or unsupported input |
| 429 | Rate limit; respect Retry-After |
| 503 | Configuration, storage, provider or uncertain settlement |
Failures after payment include request_id, paid, status and retryable. Document error codes include document_unavailable, unsupported_document and document_too_large.
Languages
Questions and documents may use different languages. Set preferred_output_language for explanations; otherwise the model uses the question language when it can identify it reliably. Quotes, original_text, titles, section labels, URLs and answer enums stay unchanged. Source language metadata is preserved or detected by the provider; und means unknown. Language does not imply jurisdiction.
Safety notices are available in English, Russian, Spanish, Japanese and Chinese. Other output languages may receive English safety notices, explicitly identified by system_notice_language. Model translation quality is provider-dependent. No separate translation call is made. Related-policy detection covers common labels in several languages but is not exhaustive; supply additional_urls for missing policies.
Scope and privacy
We report what supplied and selected linked policies say. We do not provide legal advice, infer permission from silence, or determine legal precedence beyond explicit document text. Automatic discovery stays on the same registered domain and follows only policy-like links. Use additional URLs for relevant external policies.
Submitted text and questions go to the configured model provider for analysis. Reports and inputs are stored for retrieval and payment recovery. Do not submit secrets or confidential documents. See data handling.