LangCapture

Authenticated integrations

LangCapture API

Capture useful English, manage a personal library, run guided Replay, request audio, and translate pages from your own tools.

Authentication and access

API calls require a page session or a personal bearer token. Create a token under Settings → API tokens, then send it in the Authorization header. Tokens are shown once; keep them secret.

Authorization: Bearer <YOUR_TOKEN>

The base URL is https://www.langcapture.com. Free accounts can capture and use Replay, with 500 monthly credits. Pro costs $5/month and includes 5,000 credits per paid monthly period. New AI capture preparation and work assistance charge 100× OpenRouter cost; page translation charges 3×; new audio charges 5× the configured provider cost. 1,000 integer credits = $1. Replay and cached audio are free.

Capture one useful English expression

POST /api/library accepts a short English expression. A successful capture is written to the personal library and learning queue immediately. Confirm language preferences under Settings → Language first.

curl -X POST https://www.langcapture.com/api/library \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Could you confirm whether this risk blocks the release?"
  }'

The API returns 202 while translation, quiet high-confidence surface correction, usage guidance, and useful learning focuses are prepared. Repeated captures silently reuse the existing card. POST /api/work remains a separate, optional Output Flow for users who explicitly need generated English.

Browse the personal library

GET /api/library lists captured expressions and supports a query parameter. Each item includes enrichmentStatus so clients can display pending, ready, or failed preparation without blocking the capture acknowledgement.

curl "https://www.langcapture.com/api/library?query=confirm%20release%20risk" \
  -H "Authorization: Bearer <YOUR_TOKEN>"

Refresh learning information

If preparation fails, PATCH /api/library with refresh_enrichment to retry the same expression. This does not create another card or reset learning progress.

curl -X PATCH https://www.langcapture.com/api/library \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "cardId": "<CARD_ID>",
    "action": "refresh_enrichment"
  }'

DELETE /api/library with a cardId removes the expression and its dedicated learning data. Capturing the same text later creates a fresh card.

Guided Replay

GET /api/replay opens or resumes a guided reconstruction session. Pass count as 10, 20, or 50. The response provides a precomputed character mask; clients must not choose random blanks. POST completion evidence records whether hints, automatic character fills, or unaided errors occurred, then returns translation and usage feedback.

curl "https://www.langcapture.com/api/replay?count=10" \
  -H "Authorization: Bearer <YOUR_TOKEN>"

curl -X POST https://www.langcapture.com/api/replay \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "itemId": "<ITEM_ID>",
    "usedHint": false,
    "autoFilled": false,
    "unaidedErrors": 0
  }'

Immersive page translation

POST /api/immersive-translate translates up to 40 visible-text items and 12,000 source characters per request. Provide a stable unique request_id so retries do not count the same batch twice against the shared credit wallet. OpenRouter cost is rounded to three USD decimals, multiplied by 3 and converted to integer credits (1,000 = $1), with a minimum of one credit when the original cost is positive.

curl -X POST https://www.langcapture.com/api/immersive-translate \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "request_id": "page-batch-1",
    "target_language": "Chinese",
    "source_language": "auto",
    "items": [{ "id": "1", "text": "Ship it." }]
  }'

Privacy and status codes

Content-bearing model requests disable provider data collection and require Zero Data Retention. Do not submit secrets, personal data, confidential company content, or material you are not authorized to process. Common status codes include:

  • 400 — invalid request
  • 401 — missing or invalid authentication
  • 403 — read-only access
  • 428 — language setup required
  • 429 — request-rate limit reached; respect Retry-After when present
  • 502/503 — provider output failed validation, required privacy routing was unavailable, or the service is temporarily unavailable

Start with one real task

Use the web Capture page or connect the Chrome Side Panel before building a custom integration.

Open Capture