Patchwell

v1.5.0
io.patchwell/patchwell Checked 4 days ago Published 3 days ago

Cited web research, transcription with word timestamps, and CSV/Excel cleaning with a change log.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

transcribe

Transcribe speech in an audio or video file. Use it when you need the words in a recording, quotes with their time, who said what, or subtitles. Returns text, sentence segments, each word with start/end seconds, confidence and speaker (`spk`: 1, 2, ... told apart by voice), `turns` (speaker, start, end, text), `speakers` with talk time (and a `name` with its supporting quote when the recording says who someone is: "My name is...", "the next question comes from..."), SRT and VTT with speaker labels, and `flags` listing any phrase the guards removed (phrases the s…

ParameterTypeDescription
url *stringDirect http(s) link to an audio or video file: mp3, wav, m4a, ogg, flac, mp4, mov, webm and most others. Up to 3 hours. YouTube page links don't work; pass the media file itself.
languageTwo-letter language code such as en, es or ja. Leave it out to detect the language from the audio.
max_secondsRefuse a longer recording before any work, so a call never costs more than you expect. Up to 86400 (24 h); over 10800 (3 h) the recording is processed in parallel pieces.
punctuationbooleanRepair punctuation and casing (default true).
speakersbooleanLabel who speaks when (default true). false skips speaker labels; the price is the same.

research

Research a question on the live web and get an answer in which each sentence cites the page it came from. Use it for facts you can't answer from memory or that may have changed. Returns `answer` (sentences with [url] citations), `claims` (each sentence with its url and the quote found on that page), `sources`, `gaps` (what the sources couldn't confirm) and `confidence` (high/medium/low). A slow question returns {"status": "running", "job_id"} for get_job_result. Declines questions about private individuals and about anyone's personal details (where they…

ParameterTypeDescription
question *stringThe question in plain language, up to 4,000 characters. Ask about topics, markets, products, prices, companies, regulations, places, events or published research.
contextstringOptional constraints the answer must respect, such as country, date range or audience. Leave out personal details.
depthstringstandard ($0.02) for most questions; deep ($0.06) searches about twice as wide for hard multi-step questions.
privatebooleanTrue keeps the question inside Modal, the cloud Patchwell runs on (no outside model company). Same price.

listen_clip

Used by the transcript card to play a spot the speaker labels are unsure of. Free.

ParameterTypeDescription
end *numberEnd, in seconds (at most 20 s after start).
start *numberStart, in seconds.
url *stringThe audio or video link that was transcribed.

get_job_result

Fetch the result of a long transcribe or research call that returned {"status": "running", "job_id"}. Call it again every 20 to 30 seconds until status is 'done'; the finished result has the same shape as the original tool's. Patchwell settles the call's charge when the job finishes, whether you fetch it or not; a failed job costs nothing. This tool is free.

ParameterTypeDescription
job_id *stringThe job_id from a transcribe or research call that returned status 'running'.

submit_batch

Queue many items for one tool. They run in parallel at this key's share, each priced exactly like a single call (failed and refused items are free). Returns the batch at once; follow it with get_batch, and read finished items with get_batch_results while it runs. Already scraped reels? Pass the scraper's rows (or its dataset export link as items_url) with tool "transcribe": Patchwell transcribes each row's audioUrl or videoUrl and returns each transcript with that reel's url, shortCode, ownerUsername, caption and timestamp under "details". Patchwell doe…

ParameterTypeDescription
tool *stringtranscribe, research or clean_data.
itemsarrayUp to 10,000 items, each the same input that tool takes (e.g. {"url": ...} for transcribe, {"ask": ...} for research), optionally {"custom_id": ..., "input": {...}}. For transcribe, rows from a reel s…
items_urlstringInstead of items: a link to a JSONL file (one item per line) or a JSON array, up to 1,000,000; for transcribe, a reel scraper's dataset export link works as it is.
max_cost_usdnumberNever spend more than this on the whole batch.
optionsobjecttranscribe settings for every scraped row: language, speakers, punctuation, max_seconds.
sourcestring"scraper" when the items are rows from a reel scraper (Apify's Instagram Reel Scraper or any tool with the same field names); rows with audioUrl or videoUrl are detected anyway. Over HTTP this is "fro…

get_batch

A batch's status, progress (done / total), item counts, spend and estimated finish. Free.

ParameterTypeDescription
batch_id *stringThe id submit_batch returned (bt_...).

get_batch_results

Finished items, one per entry: index, custom_id, status and the result (or error). Works while the batch runs. Free.

ParameterTypeDescription
batch_id *stringThe batch id (bt_...).
limitintegerAt most this many lines (1-50).
offsetintegerSkip this many lines.
statusstringOnly 'succeeded' or only 'failed' items; empty for all.

cancel_batch

Stop starting new items. Items already running finish and are billed; nothing else is charged.

ParameterTypeDescription
batch_id *stringThe batch id (bt_...).

clean_data

Clean a messy spreadsheet or JSON export into typed, deduplicated records with a log of each change. Use it when a spreadsheet or export needs cleaning or deduplicating before analysis or import. It finds the header row, works out each column's type from the values (ids incl. barcodes/ISBN/IBAN check digits, emails, phones, dates, times, durations, money, percents, quantities with units, ZIP and postal codes, states, countries, US street addresses, coordinates, URLs, names, booleans), keeps leading zeros, reads European decimals, repairs broken encodings…

ParameterTypeDescription
apply_clustersMake spellings of one value consistent (New York / new york / NEW YORK), each change logged: same_words (case, punctuation, word order only) or all (similar spellings too). Off by default.
check_email_domainsbooleanFlag emails whose domain can't receive mail (a DNS lookup, never a mailbox probe). False skips it.
content_base64stringThe file itself, base64-encoded, for small files you hold locally. Use this or url.
csv_textstringThe data itself as CSV text (any delimiter, up to 10 MB), instead of a file.
dedupe_onColumns that identify a record; rows matching on them merge into one. Default: the email column, else the whole row.
encodingstringText files only: the character encoding, if the automatic choice is wrong (utf-8, cp1252, latin-1, shift_jis, cp1251, gb18030).
filenamestringFile name with extension (e.g. customers.csv). Required with content_base64 so the format is known.
fix_email_typosbooleanCorrect obvious typos in big mail providers (gmial.com -> gmail.com). Every fix is in the change log.
header_rowThe file line holding the column names, if the automatic choice is wrong (1 = first line).
hintsForce a column's type, e.g. {"Joined": "date"}. Types: id, email, phone, date, datetime, time, duration, money, percent, number, quantity, zip, postcode, us_state, state, country, address, latitude, l…
inputsSeveral sources merged into one table so duplicates are found across them: up to 20 objects, each with one of url, content_base64 + filename, rows or csv_text, and an optional name. Columns with the s…
keep_rawColumns to pass through exactly as written: no trimming, no encoding repair, never typed.
min_duplicate_confidencenumberList look-alike records as possible duplicates from this likelihood (0-1). Default 0.5; 0.9 for only the near-certain ones; 1 means only the surest (99.5%).
only_newReturn only rows not sent before under this name, for scheduled runs: {"state": "my-leads", "key": ["Email"], "include_changed": false}. Stores keyed hashes, never values.
outputstringfull (default): everything. summary: stats, columns, quality, review counts and the first 20 rows, small enough for an agent's context. rows: the clean rows and the counts only.
phone_formatstring'national' like (415) 555-0100, or 'e164' like +14155550100.
phone_regionstringTwo-letter country for phone numbers written without a country code, e.g. US, GB, DE.
previewbooleanClean only the first 1,000 rows and say what the whole file would cost: column types, quality, 20 sample rows. Costs 1 cent.
recipeThe `recipe` from an earlier run. Pass it to clean a new file with the same column types and rules.
requiredColumns a row must have; rows missing one go to the review list.
rowsThe data itself as a JSON array of objects (up to 10 MB), instead of a file.
rulesChecks on the clean records, e.g. [{"column": "Age", "range": [0, 120]}, {"column": "Status", "one_of": ["active", "churned"]}, {"column": "SKU", "pattern": "^[A-Z]{3}-\d{4}$"}, {"column": "Email", "u…
sheetstringExcel only: the sheet to clean. Default: the first sheet with data.
tableWhen the file holds several tables, which one is the main result (1 = first). Default: the largest; the others are in `other_tables`.
targetMap the result onto your import template: {"columns": [{"name": "email", "required": true}, {"name": "contact", "from": ["Full Name"]}], "extra": "drop"}. Columns match by meaning when "from" is left…
urlstringPublic http(s) link to a CSV, TSV, XLSX or JSON file, up to 1 GB. Use this or content_base64.

find_tools

Search every Patchwell tool, including those not listed here by name. Returns each match's name, one line on what it does and its price. Then describe_tool(name) gives its input, and run_tool(name, input) runs it. Free.

ParameterTypeDescription
categorystringOptional: only this category, e.g. 'Audio & video', 'Data', 'Research'.
querystringWhat you want done, in a few words, e.g. 'remove image background' or 'translate subtitles'. Empty lists every tool.

describe_tool

Everything needed to run one tool: its input as a JSON Schema, options, limits, price and what it returns. Pass that input to run_tool. Free.

ParameterTypeDescription
name *stringA tool name from find_tools, e.g. 'transcribe'.

run_tool

Run any Patchwell tool by name, priced and billed exactly as that tool (see its price in find_tools or describe_tool; refusals and failures cost nothing). A slow call returns {"status": "running", "job_id"}: call get_job_result with it.

ParameterTypeDescription
name *stringThe tool's name, from find_tools.
inputThe tool's input, as describe_tool gives it (the same JSON its HTTP route takes).