Dokumentų įkėlimas / Document uploads
Pasirinkite kelią pagal kliento galimybes. / Choose the path your client can use.
create_upload: klientui su failų prieiga / Client with file access
PDF, JPEG arba PNG iki 10 MiB (10485760 baitų). Apskaičiuokite pasirinktų baitų SHA-256, perduokite name, bytes, sha256, periodId ir expectedRevision. Gautu uploadUrl per 10 minučių vieną kartą siųskite PUT su grąžintomis antraštėmis ir tiksliais baitais. Authorization nereikia. URL laikykite privačiai. Daugiausia 20 atvirų įkėlimų vienam leidimui.
PDF, JPEG or PNG up to 10 MiB (10485760 bytes). Hash the selected bytes with SHA-256 and provide name, bytes, sha256, periodId and expectedRevision. Within 10 minutes PUT those exact bytes once to uploadUrl with the returned headers. No Authorization header is needed. Keep the URL private. At most 20 open uploads per grant.
Po PUT / After PUT
Atsakymo id yra dokumento ID. PUT importuoja ir pakeičia revision, todėl prieš kitą pakeitimą vėl kvieskite pipeline_state. Revoked, expired, netinkamo mėnesio ar ištrintos darbo erdvės leidimas neleidžia naudoti URL. Hash ar dydžio neatitikimas gali sunaudoti vienkartinį URL; sukurkite naują.
The response id is the document ID. PUT imports and changes revision, so call pipeline_state before the next write. Revoked or expired grants, forbidden months and deleted workspaces cannot use the URL. A hash or size mismatch may consume it; create a new upload.
import_document: mažam failui / Small file
Mažam pasirinktam failui naudokite canonical base64, name, sha256, periodId ir expectedRevision. Virš 64 KB geriau create_upload. Nesiųskite vietinio kelio, savavališko URL ar išgalvotų failo baitų. Base64 padidina įrankio užklausą ir gali patekti modelio teikėjui.
For a small selected file provide canonical base64, name, sha256, periodId and expectedRevision. Prefer create_upload above 64 KB. Never provide a local path, arbitrary URL or invented document bytes. Base64 increases the tool payload and can reach the model provider.
request_document_upload: tik pokalbiui / Chat-only clients
ChatGPT ar claude.ai agentas kviečia request_document_upload({periodId, reason}) su prepare teise. Pateikite savininkui grąžintą URL. Savininkas prisijungia įprastai, o ne perduoda agentui Google ar OAuth žetoną. Jis pasirenka PDF/JPEG/PNG naršyklėje po vieną iki 10 MiB.
A ChatGPT or claude.ai agent calls request_document_upload({periodId, reason}) with prepare scope. Share the returned URL with the owner. The owner signs in normally instead of sending Google or OAuth tokens to the agent, then selects PDF/JPEG/PNG files in the browser, one at a time up to 10 MiB.
Užklausos būsena / Handoff state
get_request({requestId}) grąžina jūsų leidimo užklausą ir rezultato dokumentų ID. Užklausa galioja iki 24 valandų arba iki leidimo pabaigos, jei ši ankstesnė. Būsenos pending, completed, cancelled, expired. URL tik suranda užklausą: veiksmą leidžia tik prisijungęs dabartinis savininkas ir galiojantis leidimas bei teisinis sutikimas.
Poll get_request({requestId}) for your grant’s request and result document IDs. Expiry is at most 24 hours and never beyond grant expiry. States: pending, completed, cancelled, expired. A URL only locates a request; current signed-in owner authority, the live grant and current legal acceptance authorize it.
Po importo / After import
Perskaitykite read_source, prireikus ocr_page ir vėl read_source. Naudokite naujausią extraction.id. Per split_source padenkite visą tekstą; nepamirškite tuščių ar nuskaitymo reikalaujančių puslapių patikros. Tik tada siūlykite įrašus.
Read with read_source, use ocr_page when needed, then read_source again. Use the newest extraction.id. Cover all text with split_source and address blank or scan-only page review. Then propose records.