@doconda/sdk 0.9.0 (TypeScript) and doconda 0.7.0 (Python). Both SDKs have the same
methods. In Python, names are snake_case, the body goes as keyword arguments (create(format="docx", prompt=…)),
responses are dicts, and every call is synchronous: streams are generators (for event in …) and there is no signal.
Client
new Doconda(options?) · Doconda(api_key=None, *, base_url=None, max_retries=2, http_client=None, language=None)
In Python the client is a context manager;
close() releases its connections.
doconda.documents
body is the body of POST /documents without background: operation, format,
prompt, content, style, sources, file, quality, max_quality, name, metadata, artifact and
retention. See Create documents and Edit your file.
doconda.files
doconda.convert
convert(file, to, { filename?, signal? }) · convert(file, to, filename=None) → Conversion
Turns a file into another format with no AI, and waits while a scan is read with OCR. The first 1,000 conversions each
month are free, then €0.01 each.
file: afile_…ordoc_…ID, a public URL, a path, bytes (withfilename),{ url }or{ data, filename }. TypeScript also takes aBlob; it reads paths only on Node.js.to:docx,pdf,md,txt,html,odt,rtf,xlsx,csvorpptx, depending on the source; see what becomes what.- Returns
from,to,pages,expires_at, and eithertext(md,txt,html,csv) oroutputwith a 5-minuteurl(the other formats).
doconda.webhooks
Without
event_types, an endpoint receives all five: document.ready, document.failed, document.canceled,
document.updated and document.update_failed.
verifyWebhook · verify_webhook
verifyWebhook(body, headers, secret, toleranceSeconds = 300) · verify_webhook(body, headers, secret, tolerance_seconds=300) → WebhookEvent
Checks a notification’s Standard Webhooks signature against the raw body and returns the parsed event. It throws
(Python: ValueError) when a webhook-* header is missing, the signature doesn’t match, or the timestamp is more than
toleranceSeconds off. TypeScript’s version is async. See Webhooks.
doconda.editor
doconda.tools
tools({ localFiles?, waitSeconds? }) · tools(local_files=False, wait_seconds=240) → DocondaTool[] / list[Tool]
The eight tools for your agent: create_document, upload_file, convert_file, edit_document, list_documents,
get_document, get_report and read_artifact_data. Each has name, description, inputSchema (Python:
input_schema) and run(args). With localFiles, upload_file also takes a path on this machine.
waitSeconds (default 240) is how long create_document and edit_document wait for the document. One still being
made by then comes back with its id, status and a note telling the model to call get_document later. Lower it
for a client that gives up on a tool call sooner: Doconda’s hosted MCP server uses 50 s for Claude’s connector.
run doesn’t throw on an API error: it returns { error, message, fields }, where error is the code and fields
appears only on validation errors. See agents.
doconda.request and doconda.json
request(method, path, init?) returns the raw Response (Python: httpx.Response) with your key, language and retries
applied; json(method, path, init?) also parses the body. In Python, init is keyword arguments such as json= and
params=. Use them for an endpoint the SDK doesn’t wrap; path is relative to baseUrl, for example /documents.
DocondaError
See Errors and retries.
Types
@doconda/sdk exports the types the API validates with: Document, DocumentFormat, DocumentEvent, Output,
Report, Retention, ArtifactRecord, CreateDocumentBody, Conversion, ConvertTo, DocondaFile, InputFile,
WebhookEndpoint, CreatedWebhookEndpoint, CreateWebhookEndpointBody, WebhookEvent, EditorCollabToken,
DocondaTool, ToolOptions, JsonSchema and DocondaOptions. In Python, responses are dicts with the same fields,
and the package exports Doconda, DocondaError, Tool and verify_webhook.