Run Claude on pages, PDFs, images, texts or any Apify dataset: several tasks per run, extraction to your JSON schema, cited evidence with verified quotes, exact dataset statistics, dedupe, trends and anomalies without AI cost. Cheapest model by default (Haiku 5.5). Not affiliated with Anthropic.
Unreleased — data tasks billed per row (owner decisions 2026-11-11; local only, not pushed)
data-row ("Data row processed", $0.0002 per row on every tier) replaces data-rows-1k (ceil per
1,000 rows) and the interim $0.00005-per-row price: $0.20 per 1,000 rows, billed per row: 10 rows = $0.002,
2,500 rows = $0.50. Same rules: once per run on the distinct rows read by the data tasks, ONE
Actor.charge(event_name='data-row', count=N) call (SDK 3.4.1 has no per-call cap; N <= the 100,000 row cap, no
chunking), reserved before the data tasks (if the maximum cost per run covers only part of the rows: clean stop,
budgetStop, nothing charged, no partial result), never on a refused / empty / failed load, never twice on
resume, only when live in the run's pricing. launch_billing.DATA_ROW_PRICE_USD = '0.0002'; models.json,
docs/LAUNCH_EVENTS.json, input form, README, PRICING_V2 (margins: break-even ~3–4 rows, ≥ 30 % from ~4–6 rows,
99.3–99.9 % from 1,000 rows), STORE, OWNER, USER_GUIDE, FEATURES, MIGRATION updated; tests: one event per row,
exact Decimal price, partial room → stop, exact-fit room → charged.
STORE.md / docs/USER_GUIDE.md / docs/FEATURES.md aligned with the launch decisions: managed mode not available yet
(managedNotAvailable), data tasks priced per row, quality "not measured with real API calls yet".
Unreleased — v2 launch decisions (2026-11-11, owner; apify-pricing/ai-v2/LAUNCH_SPEC.md; local only, not pushed)
New src/launch_billing.py (same rules and event names as the OpenAI / Gemini Actors). SAFETY: every new or
changed paid behaviour charges its event only if the event is in the run's LIVE pricing, read once at start
(LiveEvents, pattern of marjane page_billing.py); absent / not pay-per-event / unreadable → counted, not
charged, ONE log line per event and run.
Data-rows event (then $0.05 per started 1,000 rows; now data-row, see above) in src/v2.py: AI-free data tasks (profile, clean, dedupe,
cluster, trends, anomalies, align, dataIntelligence). Decision: ONCE PER RUN on the DISTINCT rows read for the data
tasks (union of their sources), not per task; count = ceil(rows / 1,000). Never charged for a refused load
(tooManyRows / notEnoughMemory), an empty / unreadable dataset (0 rows) or when no data task produced a result.
Reserved before the data tasks run (calculate_max_event_charge_count_within_limit): too little "maximum cost per
run" → data tasks not run, budgetStop, stopReason maxTotalChargeUsd, nothing charged. Charged after they ran;
state v2.dataRows persisted (set before the charge) → never charged twice on resume. RUN_SUMMARY.dataRows.
batch-status-check ($0.0013) ON (models.json batch.statusCheckEvent.enabled = true): charged once per batch
and collect run whose status check finds the batch NOT ready (persisted in the run state), only if live-priced.
RUN_SUMMARY.batch.statusChecksCharged; status message says what was charged.
Long-output units (PRICING_V2 F1) ON: item-analyzed + 1 unit per started 1,250 output tokens above level
units x 1,250 (v1 path, v2 AI tasks, aiNarrative, batch collect); extra units charged only if item-analyzed is
live-priced (RUN_SUMMARY.longOutputUnits / longOutputUnitsNotCharged).
Managed-key mode OFF at launch: code kept; models.json managed.availableAtLaunch = false
(config.managed_available()); apiKeyMode removed from the input form (still accepted, no unknown-field warning);
"managed" → "managed mode is not available yet", FAILED_INPUTS managedNotAvailable, FAILED, nothing called or
charged. Older managed tests run with the switch ON (conftest fixture); @pytest.mark.launch_defaults tests use
the production value.
Input schema / README: data-task and batch-check prices, long-output units, managed "coming later", "not measured
with real API calls yet" (Claude benchmark mocked; Gemini numbers real), image hosting list (HTML comment).
New .actor/actor.prod.json (production identity, version 2.0; dev actor.json unchanged) and
docs/LAUNCH_EVENTS.json (the 2 events to create). MIGRATION.md: rollback = production build 0.1.6, backup
ai-intelligence-backups\claude\v1.0.3-datasets.
Tests 390 → 408 (tests/test_launch.py 18 new; test_final_pass status-check test rewritten for ON;
test_data_limits schema text). Dataset-schema guard still green.
Unreleased — 100,000 rows for the data tasks (2026-11-11, owner decision "A"; local only, not pushed or published, no price / event change)
maxItems up to 100,000 (was 10,000; default 100 unchanged). This Actor has no per-dataset row field: maxItems
(sources + dataset rows of the run, in order) is its row limit. Above 10,000 it applies to the AI-free data tasks
only (profile, clean, dedupe, cluster, trends, anomalies, align): they read up to maxItems rows (texts + dataset
rows), within the 100,000-row cap of the run (intelcore.limits.MAX_DATA_ROWS).
AI tasks keep their limits: at most the first 10,000 items per run (config.AI_MAX_ITEMS, Config.ai_max_items;
inline sources first, then the first dataset rows); task analytics the first 10,000 rows; every v1 input (no
tasks) at most 10,000 items (warning maxItems when higher). A run without a data task never reads more than
10,000 rows.
Streamed, memory-bounded loading: new main.iterate_dataset (pages of 1,000 rows, intelcore.loaders.iter_pages
dataset_fetcher, Dataset.get_data(offset, limit)) and main.iterate_datasets; v2.load_sources keeps each row
once by reference (LoadedRows) and builds AI items only for the rows the AI tasks read. Rows above what the run
memory allows (v2.rows_allowed) are counted, not kept, and the run is refused right after loading
(v2.check_loaded_rows, new: datasets whose row count is unknown at start-up are now checked on the rows read).
Input schema: maxItems maximum 100,000, description with the memory table, the AI limit and the $0.05 per 1,000
rows proposal marked "proposed, not yet active". README "Data tasks: rows per run and memory" (which limit for which
task); README extraction note: v2 extraction costs about +8.5 % more AI tokens than v1 (estimate) for accuracy.
Measured: see bench/data_rows_memory.py / bench/results/data_rows_memory.json (LOCAL, synthetic rows streamed
through the loader, whole-process peak, no AI call, all runs SUCCEEDED): all data tasks on 10,000 / 50,000 / 100,000 rows → 187 / 535 /
965 MB peak (512 MB / 1 GB / 4 GB asked by the rule); profile alone on 100,000 rows 206 MB. Billing unchanged (data tasks free; same
charges for maxItems 100 or 100,000). Tests 362 -> 371 (tests/test_data_limits.py; FakeDataset.get_data).
Unreleased — _raw token diet (2026-11-11; local only, not pushed, not published, no price change)
DATE_RAW_RULE + PRICE_RAW_RULE (two long rules) and the long *_raw schema descriptions are replaced by ONE short
shared rule (extraction.RAW_RULE, same text in the 3 AI Actors), sent once in the cached system block, and a
5-word description per *_raw field. *_raw still only for date and price / amount fields; conversion unchanged.
Offline estimate on the 30-text benchmark: ~1,146 -> ~947 input tokens per call (Gemini REAL re-test of the same
rule: accuracy unchanged at 1.000). Tests 361 -> 362. Caching note: see the RAW_COST report (system block now
~390 tokens, below Haiku 5.5's 512 minimum unless the structured-output schema counts in the cached prefix).
Unreleased — data-task run limits (2026-11-11; local only, not pushed, not published)
Changed
Shared core re-synced to intelcore 2.2.3 (sync_core.ps1, -Check OK): new intelcore/limits.py, cluster_texts memory fix (no behaviour change).
Added
Start-up check of runs with data tasks (profile, clean, dedupe, cluster, trends, anomalies, align; src/v2.pycheck_data_limits): BEFORE any row is loaded and before any AI call, the run counts the rows the data tasks will actually read — every texts entry + per dataset min(itemCount, what is left of maxItems), the itemCount coming from the dataset metadata (Apify API itemCount on the platform, the dataset's metadata locally; unknown → not counted, log line) — and applies intelcore.limits.check_data_run: more than 100,000 rows → tooManyRows; less run memory (ACTOR_MEMORY_MBYTES) than needed (≤ 10,000 rows 512 MB, ≤ 50,000 1 GB, ≤ 100,000 4 GB) → notEnoughMemory. Local runs (env unset) skip the memory rule with a log line; the cap still applies. maxItems, the rows read and .actor/actor.json are unchanged, so today tooManyRows is only reachable with very long texts lists and notEnoughMemory mainly for runs below 512 MB (e.g. 256 MB).
A refused run follows the existing start-up input-error path (stop_early, PARITY "input error, nothing done"): one FAILED_INPUTS entry (input: "tasks", the code, the message, rows, maxRows, memoryMbytes, requiredMemoryMbytes), RUN_SUMMARY.stopReason = the code, run FAILED with the message as status, nothing charged (no item fee, no token event). Choice: the whole run stops, AI tasks of the same run included (same policy as an invalid tasks input: nothing analysed). AI-only runs are not checked.
README: section "Data tasks: rows per run and memory" (table, cap, codes, what to do, honest note on maxItems), Limits line, Troubleshooting row; proposals line now says "$0.05 per 1,000 rows (proposed, not yet active)".
PRICING_V2.md §3 E1: the data-rows event proposed at $0.05 per 1,000 rows on all tiers (Scale $0.045 / Business $0.04 withdrawn) with the measured 2026-11-11 margin table (97.2–99.8 %), the cap and the memory rule; old cost text / 79 % margin replaced. Still a proposal (owner OK needed).
Tests 350 → 361: tests/test_data_limits.py (core rules with large counts, row count capped by maxItems, Apify itemCount, unknown count logged, not enough memory, too many rows, cap without memory env, enough memory, no env → skip + log, inline texts counted, AI-only runs unchecked; nothing charged / no AI call on refusal).
2.0.0 — final pass (2026-11-11; still the dev build, not pushed, not published)
Changed
Shared core re-synced to intelcore 2.1.0 (sync_core.ps1, -Check OK): checkpoint under state['intelcore'] with a fallback for a run started on 2.0 (flat state, namespace=None: nothing redone or re-charged); PARITY code names (unexpected instead of crash); modelNotFound is now a core STOP code — in tasks runs it keeps its own message (not the API-key wording) and the other units get notProcessed. Removed workarounds: the CORE_TYPE task-type mapping (the core knows evidence / analytics / missing_info / synthesis), the adapter's own price (core price_of with Haiku's long-context rates).
Batch mode = submit and exit (owner rules): the run never waits for a Message Batch (the 1-hour polling loop is removed). It returns a signed receipt BATCH_RECEIPT (HMAC-SHA256, secret BATCH_RECEIPT_SECRET, see OWNER.md) and charges nothing; a collect run (batchReceipt) verifies the receipt before any call (batchNotOwned otherwise), makes ONE status check (not ready → SUCCEEDED, "try later", nothing charged), then delivers the rows and charges each item once (signed ledger in the user's named store; a second collect charges nothing). Below batchMinItems (default 20) normal requests are used. No secret → batch refused in both key modes. Large PDFs go inline in batches (no Files API: the submit run ends first). The 1-hour cache stays. batchMaxWaitSecs is accepted but unused. batch-status-check event implemented behind a flag that is OFF.
Claude Fable 5.2 is own-key only: managed mode refuses it with a clear message before any call (apiKeyNoAccess); the Fable 5.2 managed-event proposal is removed (models.json ownKeyOnly).
intelcore 2.2.1 synced (-Check OK). dedupe task: options.mode = precise (default) | balanced; the removed find_all runs balanced with a warning (no error); unknown mode / sharedValueRows < 2 = input error. Every input row is kept unchanged and marked (duplicateGroupId, duplicateOf, duplicateConfidence, duplicateReasons) in the record MARKED_<taskId>; no row is removed or merged. README section "Duplicate detection" with the held-out figures (precise 0.988 / 0.940, balanced 0.980 / 0.969). Data-task speed and memory re-measured for PRICING_V2 E1 (10k rows: dedupe 6 s, peak ~0.3 GB -> 512 MB). rapidfuzz==3.14.6 pinned in requirements.txt / constraints.txt (the core's fast fuzzy matcher; Linux py3.12 dry-run resolve OK).
tasks runs: a failed item that used tokens is ONE dataset error row, no longer also a FAILED_INPUTS entry (v1 / PARITY rule); the unit is not redone on resume.
Added
Price exact-text rule (owner, 2026-11-11) + intelcore 2.2.2 synced (-Check OK): every price / amount field of an extraction schema gets a REQUIRED <field>_raw (string | null) in the schema sent to Claude, plus one prompt rule (copy the exact price text with currency and scale words). The Actor converts it with intelcore.clean.parse_number and ignores Claude's own number: "€35 million" → 35000000 EUR, "2,5 Mrd €" → 2500000000 EUR, currency words (euros, US dollars, dirhams, livres…) → ISO; a range / bound ("10–20 €", "from $10") → null + raw kept + ambiguousFields; "about X" → X + <field>_approximate: true. with_date_raw is now with_raw_copies (old name kept as an alias). Tests 348 → 350.
Extraction normalisation through intelcore.clean.normalize_record: dates and amounts typed by the schema (phones / emails / URLs only when typed; new input fieldTypes), originals in <field>_raw, amounts as number + <field>_currency, ambiguous values null + ambiguousFields. Owner rule 2026-11-11: Claude copies the exact date text into <field>_raw (added to the schema sent to Claude + one prompt rule) and the Actor converts it to ISO itself (dates in words included); 03/04/2026 stays null.
PRICING_V2.md §3: ONE launch proposal (data-rows event, batch-status-check, code-execution-call, long-output units F1, 256 MB collect runs, managed-batch exposure F3) with cost, tier prices and margins; compute check per level incl. long outputs; MEASURED batch runs (peak 109–123 MB, collect work 0.6–5.5 s for 20–500 items, mock).
README: batch mode, extracted values, batchNotOwned, an HTML comment listing the images to upload for the Store.
Tests 320 → 346 (offline). Tests changed on purpose: test_map_error_covers_every_v1_exception (code unexpected), test_estimate_only_tasks_and_refused_item_gives_error_row (no FAILED_INPUTS entry), test_extract_result_is_validated_against_the_user_schema (normalised amount), the five batch tests (test_batches_through_main_*, test_batch_fatal_error_stops_the_run, test_batch_results_failure_*, test_batch_api_is_half_price_*, test_batch_roundtrip_*, test_batch_uses_1h_cache_*: submit + collect), the Fable 5.2 billing tests (own key only).
2.0.0 (2026-11-10; dev build ai-document-web-analyzer-claude-v2-dev, not pushed, not published)
Changed
Default model: Claude Haiku 5.5 (cheapest; owner rule). quick / standard default to Haiku 5.5, deep to Sonnet 5.5, new expert to Opus 5.5; an explicit model always wins (v1 default was Opus 5.5 — see MIGRATION.md).
Managed key: billed = per-item fee + tokens (the item-analyzed fee is now charged in managed mode too).
SDK anthropic==2.8.0 (API version 2026-10-21; v1 pinned >=1.17,<2); every direct dependency pinned exactly, transitive ones in constraints.txt, Dockerfile installs with -c constraints.txt.
Documents up to 100 MB (was 32 MB); PDFs of 24 MB or more go through the Files API (deleted at the end of the run).
Fixed
HTTP 429 enforced_spend_limit_reached (spend cap, no retry-after) was retried as a rate limit: it now stops the run at once with quotaExceeded.
README said PDFs were limited to 32 MB: the first-party API accepts 128 MB per request.
Added
tasks: up to 20 tasks per run with priority; types summarize, extract, classify, analyze, detect_key_info, report, custom, qa, compare, contradictions, missing_info, synthesis, evidence, analytics, profile, clean, dedupe, cluster, trends, anomalies, align (shared core intelcore 2.0.0 vendored in src/intelcore/).
Evidence: conclusions with quotes verified against the input, computed confidence (verified quotes + pass agreement), limitations; modelReportedConfidence kept apart.
Claude Citations (evidence task) with exact char / page locations, optional structuring second call.
Code execution tool (analytics) on dataset rows uploaded with the Files API; deterministic fallback.
followLinks: Claude's web fetch tool (web_fetch_20260318) on Sonnet / Opus / Fable, the Actor's SSRF-safe fetcher on Haiku.
Message Batches: 1-hour cache on the shared prompt, stable request ids, resume of a submitted batch after a restart.
Concurrency driven by the anthropic-ratelimit-* headers.
INTEL_REPORT / INTEL_REPORT_MD reports; CLEANED_<taskId> records.
Tests 278 → 320 (offline); bench/claude_bench.py (v1 production vs v2, MOCK); real-tests/run_real_v2.py (ready, not run).
Consciously updated v1 tests: test_config (default model Haiku 5.5, level → model map incl. expert), test_analyzer::make (pins Opus 5.5 for the price-based mechanics tests), test_main::test_managed_mode_for_paying_user_bills_tokens (item fee in managed mode), test_main::test_max_cost_stops_the_run_cleanly (pins Opus 5.5: one Haiku item is under $0.01), test_billing (Fable 5.2 events are a new-event proposal; managed off for Fable 5.2), test_sources::test_response_size_is_capped (document cap 100 MB, lowered in the test), test_main harness (also patches src.v2.Actor).
2026-11-10 (parity pass with the OpenAI and Gemini siblings; local, not pushed)
One error-code vocabulary in the three AI Actors (table: README "Troubleshooting"). RUN_SUMMARY.status is now the run's real final status, SUCCEEDED or FAILED (was FINISHED also for FAILED runs), and RUN_SUMMARY.stopReason is always set at the end: completed, nothingAnalysed, an account-stop code (invalidApiKey, apiKeyNoAccess, quotaExceeded), modelNotFound or a limit.
api_key_errors.py is identical in the three Actors except the provider constants: every stop message says what happened, why, how to fix it (provider key / billing page), and "Only Apify's run start event was charged" only when nothing was analysed before the stop.
New tests/test_parity.py: the same scenarios, codes and statuses as the sibling Actors (auth stop, quota stop, mixed inputs, nothing analysed, no key, 5xx / 429 / network / timeout, 404 model, cut answer, restart without re-charge), plus a check that the shared part of api_key_errors.py has not drifted.
Empty texts entries are now listed in FAILED_INPUTS with code emptyText (were dropped silently), like the Gemini Actor.
Renamed codes (old name -> new name; integrations that filter on the old name must be updated): privateAddress -> blockedAddress; emptyDataset -> datasetEmpty; datasetError -> datasetUnreadable (both were documented in the README); error-row codes outputLimit -> maxOutputTokens, refused -> refusal, badAnswer -> invalidJson, budget -> budgetStop; internal -> unexpected; document type unsupported -> unsupportedType; model without vision unsupported -> unsupportedByModel; input longer than maxInputTokensPerItem even when split tooLarge -> tooLong (tooLarge stays for files / HTTP 413). A dropped connection to Anthropic is network (was providerError).
Items not analysed because a limit was reached (maxCostUsd, maxTotalTokens, max charge) are budgetStop (was notProcessed); notProcessed now only means "the run had already stopped for another reason" (e.g. modelNotFound). RUN_SUMMARY.stopReason is modelNotFound instead of fatal after an HTTP 404.
Managed key not configured on the Actor: invalidApiKey (was apiKeyNoAccess), like the siblings; the other managed refusals stay apiKeyNoAccess.
quotaExceeded stop message now reads "Anthropic refused the request: account quota, credit or spend limit used up" (was "no credit left or spend limit reached").
2026-11-10 (reliability fixes; local, not pushed — details in docs/RELIABILITY_REPORT.md)
Run status: FAILED (via Actor.fail, clear message with counts per error code) whenever no item could be analysed — every input unreadable, every item failing on the provider side, a cap too low for the first item, unusable input (was SUCCEEDED with 0 rows), managed key not available / not allowed (was SUCCEEDED; now every source is listed with apiKeyNoAccess). At least one item analysed → SUCCEEDED + FAILED_INPUTS. No key → estimate-only, SUCCEEDED (unchanged).
New run-stopping code quotaExceeded: Anthropic's HTTP 400 "credit balance is too low" / "reached your specified API usage limits" stops the run at the first error like a rejected key (was one badRequest per item, each sending a request), with the link to the billing page.
A key with spaces, line breaks, quotes or non-ASCII characters inside is refused as invalidApiKey before any request (was an "Unexpected error" per item). Spaces/quotes around a pasted key are stripped.
Provider error codes aligned with the OpenAI/Gemini Actors: providerError (5xx, 529 overloaded, network; was serverError / overloaded / network), timeout, rateLimited; HTTP 404 → modelNotFound (was providerFatal). A retry-after longer than 60 s is no longer retried early.
count_tokens errors are mapped like message errors (were raw SDK exceptions → "Unexpected error"); a Message Batch whose polling or results fail now fails its items (batchError) instead of crashing the run.
Until the key has answered once, items are sent one at a time also in estimate-only runs with a key (a rejected key = one request).
Migration/restart: the own-key item-analyzed fee is never charged twice for the same item (chargedIds in the run state); token/cost totals and a key stop are persisted too (caps keep counting, no new request after a key stop).
Rejected-key stop message no longer says "Only Apify's run start event was charged" when items were analysed (and charged) before the rejection.
The exact key value (any shape, raw and stripped) is removed from dataset rows and the report as well as from logs, FAILED_INPUTS, RUN_SUMMARY and status messages.
Truncated answers (max_tokens): verified that the row reports the tokens of every attempt and its cost (managed: token events charged); the 0-token bug seen on Gemini does not exist here. Regression tests added.
Tests: 205 → 259 (new tests/test_reliability.py).
2026-11-10 (rejected API key: same behaviour in the Claude, OpenAI and Gemini Actors; local, not pushed)
A rejected key (HTTP 401 / 403 (also from count_tokens and the Message Batches API)) is a configuration error of the run: it stops after the FIRST such error (no further AI call; until the key has answered once, items are sent one at a time so a bad key costs one request whatever concurrency), every item not analysed goes to FAILED_INPUTS with one shared code invalidApiKey (or apiKeyNoAccess for 403 / permission) and a fix hint (where to create/check the key, the "Anthropic API key" field, nothing billed), RUN_SUMMARY gets stoppedReason + stoppedHint + apiKeyError, no dataset row, and the run ends FAILED via Actor.fail with the status "Stopped: Anthropic rejected the API key — nothing was analysed or billed. ..." (schedules and integrations notice a broken key). Only Apify's run start event is charged.
Before: run FAILED with "Anthropic rejected the API key (401). Check the key in "API key"", codes providerFatal + notProcessed.
Unchanged: 429 and 5xx are retried and never treated as key errors; a missing key still gives the successful estimate-only demo run.
Shared wording in src/api_key_errors.py (identical in the three Actors except the provider constants). New tests: 401, 403, stop after the first call (concurrency 1 and 5), 429 not a key error.
2026-11-10 (status messages; local, not pushed)
Fix: the estimate-only status said "about 0 tokens used (estimates are in each row's estimate)". It now states the total estimated input, like the OpenAI/Gemini Actors: "Estimate only: N item(s) estimated, nothing analysed. Total estimated input: X tokens ...".
Fix: task compare ended with "Done: 1 of 3 item(s) analysed" (one comparison row for all sources); now "Done: 3 source(s) compared in 1 comparison row ...". Sources were already compared in input order ("Source N").
2026-11-09 (empty-input demo + own-key fee by level; local, not pushed)
Fixed
A run without any source (no startUrls/texts/documentUrls/imageUrls/mediaUrls/datasetIds), e.g. Apify's automatic Store test with {} or defaults only, no longer ends with "Nothing to analyse": it uses the demo sources = the prefill of those fields in .actor/input_schema.json (read at runtime; src/demo.py keeps a fallback checked against the schema by a test), logs "No source given: running the demo input" and continues. Without a key it is an estimate-only run: SUCCEEDED, 1 row, nothing billed. Runs with explicit sources are unchanged.
Changed (owner decision 2026-11-09)
Own-key fee scales with the analysis level: one event item-analyzed ($0.0015) charged with count 1 (quick), 2 (standard), 4 (deep) per analysed item = $0.0015 / $0.003 / $0.006. Never charged for errors, refusals, estimates or skipped items. README launch text ("free ... no fee of its own") replaced; PRICING.md updated.
2026-11-09 (0.3, commercial safety: local, not pushed; no price change)
Fixed (from FINANCE_AUDIT.md part C and TESTS_AUDIT.md)
Managed mode refuses before any AI call unless the run is pay-per-event and the live pricing info of the run (apify 3.x Actor.get_charging_manager().get_pricing_info(): pricing_model, per_event_prices) has the input / cached-input / output events of the chosen model (a 0-priced event counts as missing). Charging decisions no longer fall back to the proposed prices of models.json (billing.plan_managed_pricing / ManagedPricing).
Refusal-fallback models are billed on their own events, else on the most expensive configured tier only if its live prices cover the fallback's list price; otherwise managed mode is refused up front. Finding: with the proposed prices, Fable's cache-read event ($0.41/M) does not cover Opus 5 / Opus 4.8 cache reads ($0.50/M), so those events must be configured for Opus 5.5 and Fable 5.1.
New per-model managedEnabled flag in models.json (true on every current model; missing = disabled): switches managed mode off for one model with a build, not a price change.
Timeouts: every managed request is streamed and its usage accumulated from the stream events (message_start, content_block_delta, message_delta), so a request broken late (timeout, network, itemTimeoutSecs cancellation) is still charged on the reported tokens (output at least a neutral estimate of the text received). Managed mode never retries a timeout or broken attempt whose usage was not charged; a retry after a charged partial attempt re-reserves the budget first. itemTimeoutSecs defaults to 2 x output limit / 30 tok/s + 60 s (managed: a floor; own key: warning if set lower; the schema default 600 was removed). An item cut by the timeout after billing gives an error row with its tokens and billedEvents.
Token estimates: managed mode always counts the input with messages.count_tokens (free per the claude-api skill) before each call, including every map-reduce part (a part counted over the cap is split again) and the final reduce/compare request, so Haiku 5.5 stays strictly under its 100K-prompt price step on counted tokens. The heuristic now applies a non-Latin safety multiplier (1.5 tokens per non-Latin character, 3 per emoji / non-BMP) - src/tokens.py.
Charge limit: when Actor.charge reports event_charge_limit_reached (or charges fewer events than asked), the run stops starting items (stopReason: maxTotalChargeUsd), both key modes.
Redaction: every log record goes through a redacting filter (message and exc_info traceback); an uncaught error is logged as a redacted traceback and re-raised as CrashError with a redacted message and no chained cause; __main__ installs a redacting sys.excepthook. Unknown input fields whose value looks like a key (sk-ant-, sk-, AIza) trigger a warning to rotate the key; the value is registered for redaction and never echoed. The Actor warns when Apify's apify-default-dataset-item event is configured.
Tests
188 offline tests (was 159). New: compare and Message Batches through main() (rows, errored and skipped items, batch fatal), item timeout (managed: streamed usage charged, no retry; own key: FAILED_INPUTS), crash path (FAILED report, redacted traceback, CrashError), charge limit reached mid-run (fake Actor reports it), missing-event / not-PPE / no-manager refusal, managedEnabled: false refusal, log-filter traceback redaction, key pasted in an unknown field, streamed partial usage and retry rules, Haiku under 100K on counted CJK tokens (with re-splitting), non-Latin multiplier, timeout sizing. The Node card-renderer test now skips cleanly when node is absent or does not run.
2026-11-09 (0.2.1, model audit: local, not pushed)
Fixed
claude-sonnet-5-5 cache-read price was $0.20/MTok; the official pricing page (platform.claude.com/docs/en/about-claude/pricing, read 2026-11-09) lists $0.10/MTok (0.05x input, footnote 2, same rule as Opus 5.5). src/models.json and PRICING.md corrected. The event price proposal cached-input-tokens-1k-sonnet-5-5 ($0.000325) was left unchanged: it still covers the cost (now 2x margin) and is an owner pricing decision.
claude-haiku-5-5 price note: cache-read ($0.01 / $0.05) and cache-write prices are published on the official page, not derived; values unchanged.
All 7 model ids, statuses (all Active), effort low/medium/high, structured outputs, PDF, vision, batch and server-side fallback support re-checked against platform.claude.com/docs: no other change.
2026-11-09 (0.2, local build: not pushed)
Security
DNS rebinding closed: each hop's host (first URL, robots.txt, every redirect) is resolved once, every answer must be public, and the connection is pinned to that exact IP (PinnedIPTransport: URL rewritten to the IP, original host kept in the Host header and as the httpx/httpcore sni_hostname extension, so TLS SNI and certificate hostname verification still use the real name; TLS verification unchanged). Keep-alive off so a TLS connection is never reused across host names; proxies from the environment ignored (trust_env=False). Same privateAddress code, redirect and size caps. Tests run the real httpx/httpcore stack on a fake network backend.
2026-11-09 (0.1, local build: not pushed)
Added
First version. Sources: web pages (honest plain GET, robots.txt, no anti-bot bypass), texts, documents (PDF native document blocks, DOCX, TXT, MD, CSV), images (vision), and Apify datasets (datasetIds + datasetFields).
Tasks: summarize, extract (customer JSON Schema, normalised for structured outputs and validated), classify (labels with basis; confidence shown only as model-reported), analyze, detect_key_info, compare, report, custom.
Claude through the official anthropic SDK 1.x. Structured output via output_config.format; output_config.effort per analysis level (quick low / standard medium / deep high) on the default model Claude Opus 5.5; model override from src/models.json (Sonnet 5.5, Haiku 5.5, Fable 5.1); prompt caching of the shared system prompt; streaming above 16K output tokens; Message Batches API option (useBatchApi).
Stop reasons: refusal handled before reading the content, with the server-side refusal fallback (fallbacks: "default", beta server-side-fallback-2026-07-01) on Opus 5.5 / Sonnet 5.5 / Fable 5.1; max_tokens retried once with twice the limit.
Retries with back-off and retry-after on 429 / 5xx / 529 / network errors; typed SDK exceptions; a bad key stops the run at once.
Cost guards: maxInputTokensPerItem (map-reduce chunking, never silent truncation), maxOutputTokensPerItem, maxTotalTokens, maxCostUsd, estimateOnly (count_tokens), worst-case check before every request.
Key modes: own_key (item-analyzed event) and managed (paying Apify users only, per-1k-token events per model, server ceilings, Apify max-charge check before each request; key from the MANAGED_ANTHROPIC_API_KEY secret env var).
Security: secrets redacted from every message; SSRF guard (private, loopback, link-local, metadata and ULA addresses refused after DNS resolution and after each redirect, at most 5 redirects, 32 MB cap).
Visual report (kit 1.1.0, copied from kick-streamers-scraper), RUN_SUMMARY, FAILED_INPUTS, review invitation on successful runs.
MOCK_PROVIDER=1 local mock mode (ignored on the Apify platform).