# Davix H2I > Davix H2I is one workspace with everyday tools for images, PDFs, documents, data, rendering and AI. Use them in the Studio app, through a REST API with official SDKs, or from your own AI assistant over MCP. This file holds the text of every documentation guide. The index with one line per guide is https://h2i.davixlabs.io/llms.txt ## For AI assistants - Documentation over MCP, no sign-in needed: https://app.h2i.davixlabs.io/mcp/docs (tools: search_docs, get_doc, list_docs) - Full MCP server to run the tools on your files: https://app.h2i.davixlabs.io/mcp (sign-in required) - Machine-readable API contract (OpenAPI): see https://h2i.davixlabs.io/docs/article/openapi-and-the-api-contract/ - Tool API reference, one page per tool: https://h2i.davixlabs.io/docs/section/api-reference/ ## Getting started ### What is Davix H2I https://h2i.davixlabs.io/docs/article/what-is-davix-h2i/ Davix H2I is one place to work on files. It has tools for images, PDFs, documents, data files, HTML rendering (HTML to image or PDF) and AI. You can use the same tools four ways: in the browser, through an API, from an AI assistant, or from your own website and automations. ## The tools There are 308 tools in six families: Images, PDFs, Documents, Data, Render and AI. Each tool does one job, for example resize an image, merge PDFs, convert a spreadsheet or write alt text. Browse them all on the Tools page. ## Four ways to use it - Studio is the web workspace. Pick a tool, add your file and press Generate. It also has an Assistant tab where you describe the job in plain words. Open it at app.h2i.davixlabs.io/studio. - Dashboard is where you manage your account: usage, API keys, history, background jobs, saved items, subscription and connected AI apps. - API and SDKs: every tool is a REST endpoint. There is an official Node.js library and a command line. See Call a tool over REST. - Connections: connect AI apps such as Claude or ChatGPT through MCP, use the WordPress plugin to work on your Media Library, or use the n8n node in your automations. ## Plans and limits You start on the free plan. Each plan sets how much you can use each month, which tools are included, the file sizes you can send and how fast you can send them. The current plans and prices are on the Pricing page. Your own limits are always visible in the Dashboard under Usage. ## Where to go next - Quick start: run your first tool - Core concepts: tools, jobs and credits - Authenticate API requests Checked against the Davix H2I API contract 3.0.0. ### Quick start: run your first tool https://h2i.davixlabs.io/docs/article/quick-start-run-your-first-tool/ This guide takes you from a new account to your first finished result in Studio. It takes a few minutes. ## Before you start You need a Davix H2I account. Create a free account or sign in. You do not need a card for the free plan. ## Run your first tool - Open Studio. The Workspace tab is the default view. - Find a tool. Browse the tool groups, or use Search operations and type what you want to do, for example "resize" or "merge pdf". - Add your file. Drop it on the tool or choose it from your computer. If the tool accepts links, you can give a web address instead. - Set the options. The Simple tab shows only the basics in plain words. The Advanced tab shows every option the tool has. - Press Generate. The result appears with a preview and a download button. ## After the first run - Every result is kept in History so you can download it again. How long it is kept depends on your plan: see How long we keep your files. - Locked tools are shown dimmed with the name of the plan that includes them. You can still read about them. - Prefer to describe the job in words? Open the Assistant tab: Talk to the assistant. - Want to call the tools from code? Create an API key and read Call a tool over REST. ## Run the same tool from code Everything you did in Studio can be done from your own program. Create an API key in the Dashboard under API Keys, keep it in an environment variable, and use the official client for your language (see Choose your SDK). In Python it looks like this: ``` pip install davixlabs-h2i ``` ``` import os from davix_h2i import H2I h2i = H2I(os.environ["DAVIX_H2I_API_KEY"]) result = h2i.images.resize({"images": "photo.jpg", "width": 800}) print(result.status, result.request_id) ``` The same call uses the same credits and follows the same limits as in Studio. The result is also saved in your History. ## If something goes wrong When a run fails, Studio explains what happened and what to try, in plain words. For the meaning of each error code see Error codes and rate limits. Checked against Studio and API contract 3.0.0. ### Core concepts: tools, jobs and credits https://h2i.davixlabs.io/docs/article/core-concepts-tools-jobs-and-units/ A few ideas explain how everything in Davix H2I fits together. Once you know them, the Dashboard, the API and the plan pages make sense. ## Tools and families A tool does one job. Each tool has an id made of its family and its name, such as images.resize, pdfs.merge or documents.convert. There are six families: images, pdfs, documents, data, render and ai. The same id is used in Studio, in the API, in presets and in the SDKs. ## Requests and results Running a tool is one request. The answer lists one result per file in results. Some tools take one file, some take several and give one result per file, and some combine several files into one result (for example merging PDFs). Every response carries a request id that support can use to find the call. ## Credits and your allowance Your plan gives you an allowance for the period, counted in credits. Each successful call uses credits from it. A tool can cost more or less than one credit, and some plans give a family its own allowance, so the exact numbers depend on your plan. The Dashboard Usage page shows what you have used and what is left. ## Limits Besides the allowance, a plan sets limits: how many files and megabytes you can send in one request, how many requests per minute, and which tools and formats are included. These can change, so read them from your account rather than hard-coding numbers: the Dashboard shows them, and the API returns them from GET /v1/limits. ## Jobs Slow work can run in the background. With async: true a tool answers straight away with a job id, and you collect the result later from the job. In Studio this is the Run in the background switch. Background jobs need a personal API key or a signed-in account. See Understand usage and limits and Call a tool over REST. ## Keys, presets and templates - An API key lets code act as your account. See Create and rotate API keys. - A preset saves the settings of one tool so you can reuse them. - A template is a saved HTML design for the Render tools, with variables you fill in. Checked against API contract 3.0.0. ### Glossary https://h2i.davixlabs.io/docs/article/glossary/ The words used across Davix H2I and its documentation. ToolOne job Davix H2I can do on a file or text, such as resizing an image or merging PDFs. Every tool is also an API endpoint. Browse them on the Tools page. FamilyA group of tools: Images, PDFs, Documents, Data, Render and AI. StudioThe web workspace where you pick a tool, add a file and press Generate. It also holds the Assistant. See A tour of the Studio workspace. DashboardWhere you manage your account: usage, logs, API keys, connected apps, saved items, jobs, history, subscription and settings. AssistantA chat in Studio where you describe a job in your own words and an AI agent uses the tools to do it. See Talk to the assistant. API keyA secret that lets a program use your account, sent in the X-Api-Key header. See Authenticate API requests. AllowanceHow much you can use in a period, set by your plan. Calls use part of it. See Understand usage and limits. JobWork that runs in the background. You get a job number and collect the result when it is done. See Background jobs. Idempotency keyA value you send in the Idempotency-Key header (8 to 128 characters) so that retrying the same request does not do the work twice. Request idThe identifier of one call, in the Request-Id header and in every error. Give it to support instead of your key. PresetThe settings of one tool, saved under a name. See Presets and templates. TemplateA document with {{placeholders}} that are filled each time you use it. See Presets and templates. HistoryThe results you made, kept so you can download them again for the time your plan keeps them. See Find past runs in History. MCPThe Model Context Protocol, a standard way for AI apps to use tools. Davix H2I offers its tools to AI apps this way. See Connect an AI assistant over MCP. ScopeA permission you give a connected AI app, such as running the Images tools or reading your files. See MCP scopes and permissions. SDKA code library for calling the API. The Node SDK is available today. See Use the Node SDK. API contractThe machine-readable description of every endpoint, field and error. The SDKs and the API reference are generated from it. Checked against API contract 3.0.0 and the other guides. ### Get help and contact support https://h2i.davixlabs.io/docs/article/get-help-and-contact-support/ If something does not work or you are not sure how to do it, there are three places to look, from fastest to most personal. ## 1. Look it up - This documentation has a guide for each part of Davix H2I. Use the search box at the top of the documentation. - If a run fails, the error tells you why. Fix: a tool run returns an error walks through it, and Error codes and rate limits explains each code. - Every tool page has its own questions and answers, and a list of its options. ## 2. Open a ticket in the Help Center The Help Center is where you open a new ticket, follow your tickets and reply to our team. You need to be signed in, so that your ticket is linked to your account. A real person answers, usually within one business day. ## 3. Write to us If you prefer not to sign in, you can write to us by email. The address is on the Help Center page, and we reply to the address you write from. ## What to include - What you wanted to do, and what happened instead. - The request ID of the request that failed. Studio shows it with the error, and every API and SDK error has one. - The tool and, if you can, the kind of file you used. Never send your API key. The request ID is all we need to find your request. If you ever shared a key by mistake, rotate it: see Keep your account and keys safe. Ideas are welcome too: the roadmap page lets you vote for what we build next and suggest something new. ## Studio ### A tour of the Studio workspace https://h2i.davixlabs.io/docs/article/a-tour-of-the-studio-workspace/ Studio is the web workspace of Davix H2I. You open it at app.h2i.davixlabs.io/studio and sign in with your account. ## The four areas The left menu has four places: - Assistant: describe a job in plain words and an AI agent runs the tools for you. See Talk to the assistant. Your chats are listed under the menu. - Workspace: pick a tool yourself and run it. This is the default view. - History: every result you made, to preview or download again. - Saved: your presets and templates. At the bottom of the menu Studio shows how much of your allowance you have used this month, and your account menu. ## Working in the Workspace - Choose a tool. Use Search operations or browse the families. Tools your plan does not include are shown dimmed with the plan that unlocks them. The home view has filters, including one by plan. - Add files. Studio checks the file against your plan (size, number of files, image size, PDF pages) before you run, so a file that would be refused is turned away with an explanation instead of failing later. - Set the options in the panel on the right. Simple shows only what a beginner needs, in plain words. Advanced shows every option of the tool. Hover the question marks for help. - Press Generate. The result appears with a preview. Click a picture or PDF to open it in the full-screen viewer with zoom. ## Saved presets and templates A preset stores the settings of one tool. A template stores an HTML design for the render tools. Both live under Saved, and the number you can keep depends on your plan. ## Languages and install Studio can be shown in several languages (use the language switch in the menu) and works on phones and tablets. Your account, plan and keys are managed in the Dashboard: A tour of the Dashboard. Next: Run several tools at once and Compare results before and after. Checked against Studio. ### Run several tools at once https://h2i.davixlabs.io/docs/article/run-several-tools-at-once/ There are four honest ways to do more than one thing at a time in Davix H2I. Pick the one that matches your job. ## 1. Many files, one tool Add several files to a tool and run it once. Most tools process each file on its own and return one result per file. One bad file never stops the others: each file gets its own status, and a summary tells you how many succeeded. A few tools combine all their files into a single result instead, for example Merge PDFs. How many files you can send at once is set by your plan. ## 2. Several steps on one image The image pipeline runs an ordered chain of image operations in one call, so you can resize, add a watermark and convert the format in a single step. ## 3. Run in the background Turn on Run in the background for big files or slow tools. Studio queues the job and you keep working. The result appears when it is ready, and the job is listed on the Dashboard under Jobs with its status: queued, running, done or failed. A queued job can be cancelled, but a running one cannot. Your plan sets how many jobs may be queued or running at once. Background jobs need a signed-in account or a personal API key. ## 4. Let the Assistant chain tools for you When the job needs different tools in a row, describe it to the Assistant. It runs the tools step by step and gives you each result as a new version, leaving your original untouched. ## From code The same ideas apply to the API: send several files in one request, use async: true for background jobs, and call the next tool with the result of the last. See Call a tool over REST. ## Try it in your language Choose a tool and a language. The parameters are filled in for you and always match the current API. Checked against API contract 3.0.0 (uploads, jobs) and Studio. ### Compare results before and after https://h2i.davixlabs.io/docs/article/compare-results-before-and-after/ Davix H2I has dedicated tools that compare two versions of a file and tell you what changed. Use them to check a result against the original, or one revision against the next. ## Pick the compare tool that fits Your files | Tool | What you get Two pictures | Compare images | How different they are and where, including the share of differing pixels and a similarity score Two renders, before and after a change | Visual check | A pixel-by-pixel comparison with the changed areas marked Two PDFs | Compare PDFs | A line-level text difference or a per-page visual difference Two documents of any kind (Word, PDF, Excel, text) | Compare documents | What was added and removed, a similarity score and the list of changes Two data files | Compare data files | Rows added, removed or changed, with the old and new value of each changed field ## How to run one in Studio - Open the compare tool in the Workspace. - Add the two files you want to compare, in the order the tool asks for them. - Press Generate and read the report. Open picture or PDF results in the viewer to look closer. ## Checking a result you just made Every result is kept in History. To compare it with the original, download both and run the compare tool for that kind of file. The Assistant can also compare two files when you tag them in the chat. Comparing runs like any other tool, so it uses your allowance in the same way. See Understand usage and limits. ## Try it in your language Choose a tool and a language. The parameters are filled in for you and always match the current API. Checked against the API contract 3.0.0 descriptions of these tools. ## Tools ### Convert and compress images https://h2i.davixlabs.io/docs/article/convert-and-compress-images/ The Images family has 60 tools. This guide covers the ones most people start with: converting formats, making files smaller and changing size. ## Convert the format Convert images changes each picture to the output format you choose without changing its pixels, for example PNG to WebP or JPEG to AVIF. Which formats are available can depend on your plan: if a format is not included, the tool answers format_not_allowed. ## Make files smaller - Optimize images re-encodes a picture for size and format. You choose the quality. - Auto optimize picks the best format and quality for you. ## Change the size Resize image takes a width, a height or both, and a resize mode: fit (keep the whole picture inside), cover (fill the size and cut the overflow), pad (fill the size with a background) or force (stretch to the exact size). With cover you can choose where to cut from. The largest output size you may ask for is set by your plan. Example with curl (replace the address and key with yours): ``` curl -X POST "https://app.h2i.davixlabs.io/v1/images/resize" \ -H "X-Api-Key: $DAVIX_H2I_API_KEY" \ -F 'images=@photo.jpg' \ -F 'width=800' \ -F 'height=600' \ -F 'resizeMode=fit' ``` ## More image tools - Several steps in one call: image pipeline - Transparent background for single-colour backgrounds: remove background - Protect or label pictures: watermark; read or clean hidden data with image metadata - Read text from a picture: image OCR - Make web icons from one logo: favicon; every social size from one picture: social pack; QR codes: QR code - Turn pictures into a PDF: images to PDF Every tool has its own page with a live test, and an API reference entry listing every option. Read about files and limits in Understand usage and limits. ## Try it in your language Choose a tool and a language. The parameters are filled in for you and always match the current API. Checked against API contract 3.0.0. ### Merge, split and rotate PDFs https://h2i.davixlabs.io/docs/article/merge-split-and-rotate-pdfs/ The PDFs family has 47 tools. These are the everyday ones for putting pages together, taking them apart and changing them. ## Merge Merge PDFs joins two or more PDFs into one. Add them in the order you want. Merge is one of the tools that combines all files into a single result. ## Split and extract - Split PDF cuts one PDF into several: every N pages, at the top-level bookmarks, at blank separator pages, or into parts of a size you choose. - Extract pages takes a page range, or makes a separate document per page or per range. ## Rotate, delete, reorder Manipulate pages rotates, deletes, reorders and resizes pages, and can annotate, bookmark, link or stamp them. ## Make it smaller or repair it Optimize PDF reduces the file size and repairs the structure. ## Pictures and text - PDF to images turns pages into pictures. - Extract text reads the text layer (it is not OCR). - OCR a scanned PDF makes text and a searchable PDF from scans. ## Protect and sign - Encrypt or decrypt a PDF with a password. - Redact burns opaque black boxes into the pages, so the hidden content is really removed. - Watermark every page. - Sign with a digital signature, using a certificate you provide (Sign PDFs with a certificate). ## Limits to know Your plan sets the largest file, the number of files per request and caps on pages for tools such as PDF to images. If a PDF is over a limit the tool answers pdf_page_limit_exceeded or file_too_large. See Error codes and rate limits. Except for merge and compare, PDF tools take one file per run: send several files to the same tool and each is processed on its own, with one result per file. ## Try it in your language Choose a tool and a language. The parameters are filled in for you and always match the current API. Checked against API contract 3.0.0. ### Work with documents and spreadsheets https://h2i.davixlabs.io/docs/article/work-with-documents-and-spreadsheets/ The Documents family has 44 tools for Word, Excel, PowerPoint, OpenDocument, text, Markdown, HTML, e-books, archives and more. ## Convert between formats Convert documents converts between PDF and Office, OpenDocument, RTF, EPUB, HTML, text and Markdown files. The conversion runs on the server, so you do not need Office installed. ## Join and read - Merge documents joins documents of different kinds into one. - Document text gets the text of any supported document as plain text, Markdown or a structured view with headings, paragraphs and lists. - Word count counts characters, words, sentences and paragraphs and estimates reading time. - Compare documents shows what was added and removed between two versions. ## Make documents - Mail merge fills {{field}} placeholders in a DOCX or ODT template with the values of one record, or makes one document per record. - Invoice and receipt maker builds an invoice, receipt, credit note or quote as a PDF. - From scan turns scanned pages into an editable Word, OpenDocument, PDF, HTML, Markdown or text file. ## Protect, pack and clean - Protect puts an opening password on a Word, Excel or PowerPoint file, or removes it when you know the password. - Create ZIP puts files into one archive; there are also tools to extract and inspect archives. - Web page to Markdown turns a web page into clean Markdown. ## Good to know Most document tools take one file per run. If you send several files to the same tool, each is processed on its own. Format availability and file size depend on your plan. Working with tables of data (CSV, JSON, Excel as data)? See Clean and convert data files. ## Try it in your language Choose a tool and a language. The parameters are filled in for you and always match the current API. Checked against API contract 3.0.0. ### Clean and convert data files https://h2i.davixlabs.io/docs/article/clean-and-convert-data-files/ The Data family has 27 tools for tables and structured files such as CSV, JSON, XML, YAML and Excel. ## Convert Convert data converts between CSV, TSV, JSON, NDJSON, XML, YAML, TOML, XLSX, ODS, HTML tables, Markdown tables, SQL dumps and more. ## Clean up Clean data tidies a messy file: it trims extra spaces, empties cells that only say N/A or null, and removes empty rows. Use Transform data for a list of operations such as select, rename, filter, sort, limit, cast and dedupe. ## Check - Data profile describes every column: its type, how many cells are filled, how many different values it holds. - Validate data checks every row against a JSON Schema and lists what is wrong: which row, which field and why. - Compare data files lists rows added, removed or changed. ## Combine and reshape - Merge data files appends rows or joins files on a key. - Reshape pivots a long table to a wide one or the other way around. - SQL query runs one SQL SELECT over one or more data files, so you can filter, group, total, sort and join them like database tables. ## Share safely Anonymize data masks, replaces, scrambles or removes personal details such as names and emails before you share a file. ## Tip Run a profile first to see what is in the file, clean it, then validate it. Each step is one request, and the result of one can be the input of the next. ## Try it in your language Choose a tool and a language. The parameters are filled in for you and always match the current API. Checked against API contract 3.0.0. ### Render pages and screenshots https://h2i.davixlabs.io/docs/article/render-pages-and-screenshots/ The Render family has 19 tools that draw things: web pages, HTML you write, charts, tables, diagrams, maps and more. The output is an image or a PDF. ## HTML to image or PDF - HTML to image renders HTML to a PNG or JPEG screenshot. - HTML to PDF renders HTML to a PDF with a browser engine. You send the HTML, or use a saved template with variables that you fill in when you run it. Your plan limits the size of the HTML and the size of the picture. ## Capture a whole site Site capture takes a picture of every page of a site, from one start address (following links on the same host, to a depth and page limit you choose) or from an exact list of addresses. ## Pictures from data and text - Chart from a few simple fields or a Vega-Lite specification. - Table to image from pasted CSV or JSON, or a data file. - Diagram from a short text description: flowcharts, sequence diagrams and more. - Code to image with syntax colours and line numbers. - Map of places given by latitude and longitude. - Visual check compares a picture before and after a change. ## Safety rules for addresses When a tool downloads something from an address, the address must be a public http or https address. Other addresses are refused with url_blocked. A download that fails or is too slow answers url_fetch_failed. Render tools take no uploaded file at all in some modes, so your plan's file limits matter less than its render size limits. See Understand usage and limits. ## Try it in your language Choose a tool and a language. The parameters are filled in for you and always match the current API. Checked against API contract 3.0.0. ### Use the AI tools https://h2i.davixlabs.io/docs/article/use-the-ai-tools/ The AI family has 111 tools that read, write, extract and create using AI models. They work like every other tool: you send a file or text and you get a result. ## What they do - Write content: alt text, captions, titles, tags, product descriptions, social posts, SEO text, translations. For example alt text and translate. - Work with documents: summarize with cited key points, answer questions from one or more documents with citations, compare versions, find personal data, rewrite and correct. - Extract data: invoices, receipts, business cards, ID documents, bank statements, resumes and more. Invoice extraction returns vendor, customer, dates, line items and totals, with the arithmetic checked. - Read pictures: OCR, describe, tag, classify, detect objects, content safety flags. - Create and edit images: generate from a prompt, remove backgrounds, erase, expand, create variations. - Anything else: analyze runs any registered analysis task by id. ## How AI is counted AI can have its own allowance in your plan, separate from the other tools. Depending on the plan it is counted in credits, tokens or a money budget. Your Dashboard Usage page shows what is left. A plan can also limit how expensive a model it may use, and how large one request may be. ## Things to know - AI answers can be wrong. Check results before you rely on them, and remember that text read from a file is the file's own content. - AI tools may send the content they need to the AI provider that runs the model. The other tool families process files on our own server. - A few AI tools are listed in the catalogue but may not be available yet. The API says so with feature_unavailable. GET /v1/ai/capabilities shows the readiness of each task. - If AI is not available on the service, tools answer ai_not_configured. - You can choose a model for a tool in the API, within what your plan allows. For help writing the job in your own words, try the Assistant. ## Try it in your language Choose a tool and a language. The parameters are filled in for you and always match the current API. Checked against API contract 3.0.0. ### Sign PDFs with a certificate https://h2i.davixlabs.io/docs/article/sign-pdfs-with-a-certificate/ A digital signature shows who signed a PDF and that it has not been changed since. The Sign tool signs a PDF with a certificate that belongs to you. You can store the certificate once in your account and choose it each time, so its private key is not sent with every request. ## What you need - A signing certificate and its private key, both as PEM text. The private key must be without a passphrase. - A plan that includes the Sign tool (see the Capabilities page in the Dashboard, A tour of the Dashboard). ## Store a certificate In Studio, open the Sign PDF tool and choose to manage your signing certificates. Give it a name, paste or load the certificate and the private key, and store it. The window then lists each certificate by name, subject and expiry date. It never shows a private key again. With the API, send the same three values: ``` curl -X POST "https://app.h2i.davixlabs.io/v1/certificates" \ -H "X-Api-Key: $DAVIX_H2I_API_KEY" \ -H "Content-Type: application/json" \ -d '{"name": "Office stamp", "certPem": "-----BEGIN CERTIFICATE-----...", "keyPem": "-----BEGIN PRIVATE KEY-----..."}' ``` The answer describes the certificate (id, name, subject, issuer, SHA-256 fingerprint, validity dates, when it was last used). The private key is stored encrypted and is never returned. ## Sign a PDF ``` curl -X POST "https://app.h2i.davixlabs.io/v1/pdfs/sign" \ -H "X-Api-Key: $DAVIX_H2I_API_KEY" \ -F 'file=@contract.pdf' \ -F 'certificateId=12' \ -F 'reason=Approved' \ -F 'signerName=Jane Smith' ``` Use certificateId for a stored certificate. You can also send certPem and keyPem in the request instead, but then the private key travels with every call. The optional reason, signerName, contactInfo and location are written into the signature. ## List and delete certificates - GET /v1/certificates lists your certificates, and GET /v1/certificates/{id} shows one. - DELETE /v1/certificates/{id} deletes a certificate and its private key. You can only see and delete your own; anything else answers not_found. Certificates are part of your account, so they are also removed if you delete your account (How long we keep your files). ## Errors - duplicate_certificate_name: you already have a certificate with that name. - certificate_limit_reached: you stored as many certificates as allowed. - certificates_unavailable: storing certificates is not available right now. Try again later or contact support. The other codes are in Error codes and rate limits. More PDF tools: Merge, split and rotate PDFs. ## Try it in your language Choose a tool and a language. The parameters are filled in for you and always match the current API. Checked against API contract 3.0.0 and the Studio source code. ## Account and billing ### Change or cancel your plan https://h2i.davixlabs.io/docs/article/change-or-cancel-your-plan/ Your plan is your membership on the Davix H2I website. You can see it, change it and cancel it yourself. ## See your plan Open Dashboard > Subscription. It shows your current plan, what it includes, its limits and its validity window. For a paid plan it shows the date and amount of your next payment. ## Change plan - On the Subscription page choose View plans. This opens the plans on the website. - Pick the plan you want and complete the checkout. The current plans and prices are on the Pricing page. Tools your plan does not include are shown in Studio with the name of the plan that unlocks them. ## Cancel On the Subscription page choose Cancel membership. Cancelling stops future payments. The page shows when your membership ends. ## What happens to your usage and data - Your allowance belongs to your plan's period. Moving to a different plan changes the limits that apply from then on. - Your API keys, history and saved items stay with your account. The exact timing of a change (immediately or at renewal) and any refund follow the terms shown at checkout and in our refund policy. ## Delete your account instead Deleting your account cancels a paid subscription first, then removes your membership, API keys, presets, templates, files, history and Assistant chats. It cannot be undone and time you already paid for is not refunded automatically. Records of payments already made are kept for accounting. We email you a link to confirm that it is you. Once you confirm, we process the request and you get an email when it is done. Find it under Dashboard > Account. Need help with billing? See Invoices and payment methods or contact support. Checked against the Dashboard. ### Invoices and payment methods https://h2i.davixlabs.io/docs/article/invoices-and-payment-methods/ Billing for Davix H2I is handled by your membership on the Davix H2I website, so invoices and payment methods are managed there. The Dashboard links you to them. ## Where do I find my invoices? Open Dashboard > Subscription. Under Billing history each payment is listed, and each invoice opens on its own page. Choose All invoices for the full list. Until you pay for a plan, the list says "No payments yet". ## How do I change my payment method? On the Subscription page choose Payment method & billing. It opens the billing page of your membership on the website, where you can update how you pay. ## When is my next payment? The Subscription page shows the date and amount of your next payment for a paid plan, or the date your membership ends if it was cancelled. ## Billing says it is not available yet That means your Davix H2I account is not yet linked to a website membership, so there is nothing to bill. Contact support and we will check the link. ## Billing history could not be loaded The website that holds your membership did not answer. Choose Try again in a moment. If you use the API you may see wordpress_unavailable (502), which is also retryable. ## Which plan am I on, and what does it cost? Your plan and its limits are on the Subscription page. Prices of all plans are on the Pricing page. ## Cancel or change plan See Change or cancel your plan. Checked against the Dashboard and API contract 3.0.0. ### Account and profile https://h2i.davixlabs.io/docs/article/account-and-profile/ The Account page shows who you are, your plan, how you are signed in, and your data. ## Your profile Your name, email, picture and password belong to your membership on the Davix H2I website, so they are changed there. The Account page shows them and has two buttons that open the right pages: Edit profile & password and Membership account. Your password is checked by the website's secure sign-in and is never stored by the app. ## How you are signed in The page shows how this browser is signed in and has Sign out of this browser. If the browser uses an API key you pasted instead of a normal sign-in, the page says "Signed in with an API key". ## Account activity Open Account activity to see who signed in, from where, and what changed on your account, with a filter. It is the place to check if something looks wrong; see Keep your account and keys safe. ## Download or delete your data Under How data requests work you can ask to download your data, or to delete your account. Each request needs your confirmation by an email link. Details are in How long we keep your files and Change or cancel your plan. - Deleting your account asks you to type the word DELETE as a safeguard. - Data requests are not available until your account setup is complete; the page says so if that is the case. Checked against the Dashboard and API source code. ### Custom (enterprise) plans https://h2i.davixlabs.io/docs/article/enterprise-plans/ Our standard plans (Free, Plus and Agency) fit most people. If you need something different, such as more credits, bigger files, only certain tools, more speed or more API keys, you can ask for a custom plan, also called an enterprise plan. It is made for you, and only you can see it. ## How it works - You ask. Open Enterprise in your Customer Portal and press Ask for a custom plan. Tick what you need, add a few words, choose how often you want to pay (every day, week, month or year, but never longer than a year) and write the price you would like to pay for that period. You need a signed-in account to do this. - We look at it. You can follow the request on the same page. You also get an email at each step. - We make you an offer. Our offer can be different from what you asked: a different price, a different period, or a different set of limits. It shows the price, how often it is paid, what the plan gives and until when the offer stands (14 days). - You decide. Accept or decline the offer in your Customer Portal. If you do nothing, the offer ends after 14 days and nothing is charged. - We prepare your plan. After you accept, this usually takes 1 to 2 days. We email you, and your portal shows Ready to pay. - You pay. Payment is by card on our website. You have 14 days from the day your plan is ready. If it is not paid in time, the plan is removed automatically and you can send a new request. Nothing is charged. - Your plan is active. Your account moves to your plan and renews every period, like the standard plans. ## Good to know - The lowest prices. Each period has a lowest price. The form shows it under the price box. - Prices can change. This is true for every plan, standard or custom. If we ever need to change the price of your plan, we will make you a new offer first and you decide whether to accept it. If you do not accept, your plan ends at the end of the period you already paid for, and your account moves to the Free plan. If you do not answer within 14 days, we treat it as a no. When you accept a new price, it starts with your next period. - Your plan is private. Nobody else sees it or its price. Other customers do not see that it exists. - You can still see the standard plans to compare. The comparison is on the pricing page. - Credits. Like the standard plans, a custom plan gives you credits. Each tool uses its own number of credits for each file, so how many files your credits cover depends on the tools you use. See Understand usage and limits. - One request at a time. You can have one request open at a time. Send a new one after we have answered the last, or after you cancel it (you can cancel before you accept an offer). To keep things fair, you can send up to 3 requests in 24 hours. Questions? Contact support from the help centre. The full wording is in the custom plan terms, and refunds follow our Refund Policy. Checked against the Customer Portal. ## Dashboard ### Understand usage and limits https://h2i.davixlabs.io/docs/article/understand-usage-and-limits/ Your plan decides how much you can do and how fast. This guide shows where to see your usage and limits, and what happens when you reach one. ## Where to look - Dashboard > Overview and Usage: what you have used this period, what is left, usage over time and per tool, per API key, and why requests failed. Open the Usage page. - Dashboard > Logs: the request log of your keys, with time, status, request id and the reason for a failure. - Studio shows "This month" at the bottom of the menu. ## Allowance Your plan has an allowance for each period. Every successful call uses part of it. The plan can set a total, give some tool families an allowance of their own, and cap the heaviest tools. AI can have a separate allowance. If you were given extra credits on top of your plan, they are used when the plan cannot cover a request, and they have their own expiry date. ## Limits A plan also limits how much one request can carry and how often you can call: - Files per request, total size and size of each file. - The largest image or page you may ask for, and caps on PDF pages and render size. - Requests per minute and data volume. - Which tools and formats are included, and how many background jobs may run at once. - How many API keys, presets and templates you may keep. These numbers are set per plan and can change, so do not copy them into your code. Read them with GET /v1/limits, which returns the limits that apply to your key right now. GET /v1/usage returns usage and GET /v1/subscription returns your plan and its status. ## When you reach a limit Error | Meaning | What to do monthly_quota_exceeded (429) | The allowance for the period is used up | Wait for the next period or change plan key_quota_exceeded (429) | The key was created with its own limit and has used it | Use another key or make one with a higher limit rate_limit_exceeded (429) | Too many requests, or a size limit was reached | Slow down and retry file_too_large, too_many_files, total_upload_exceeded (413) | The request is bigger than the plan allows | Send less per request endpoint_not_allowed (403) | Your plan does not include this tool | Choose a plan that includes it Some plans keep working past the total and show you how far over you are; most block. Details: Error codes and rate limits. Plans and prices are on the Pricing page. Checked against API contract 3.0.0. ### Create and rotate API keys https://h2i.davixlabs.io/docs/article/create-and-rotate-api-keys/ An API key lets your code, scripts and integrations use Davix H2I as your account. All your keys share your account's plan, allowance and tool permissions. ## Create a key - Open Dashboard > API Keys and choose Add API key. - Give it a label so you remember what it is for. - Optional: set when it expires (1 to 3650 days), a limit of its own, and for plans where AI has its own allowance, an AI limit. A key limit cannot be higher than your plan's total. - Copy the key straight away. It is shown only once. We keep only a protected form, so we cannot show it again. The most keys you can have depends on your plan. When you reach it the API answers key_limit_reached. ## Rotate a key Rotating creates a new secret for the same key. The old secret stops working immediately, so update your code first or do it in one step. The new secret is also shown only once. ## Revoke or delete a key - Revoke disables the key. This cannot be undone from your side. If it was your only key you will not be able to use the API until you make another one in Studio or the Dashboard. - Delete removes the key. Use it for keys that expired or that you no longer need. What the key used still counts in your usage history. ## Keep keys safe - Send keys in a header only: X-Api-Key or Authorization: Bearer. A key in the address or body is refused. See Authenticate API requests. - Keep keys in environment variables or a secret store. Never put them in browser code or a public repository. - Use one key per app, so you can revoke one without breaking the others, and so you can see in Usage which one used what. - If a key leaks, rotate or revoke it at once. ## From the API Keys can also be managed with GET /v1/keys (list, metadata only), POST /v1/keys, POST /v1/keys/{id}/rotate, POST /v1/keys/{id}/revoke and DELETE /v1/keys/{id}. These need a personal customer key. Checked against API contract 3.0.0. ### Find past runs in History https://h2i.davixlabs.io/docs/article/find-past-runs-in-history/ Every result you make is saved in your History, so you can find it again, preview it and download it. ## Where to find it - Studio > History lists your results with previews. - Dashboard > History shows the same history with filters and detail. - Dashboard > Jobs lists background jobs: waiting, running, done or failed. Click a job for more. ## What each entry shows The tool, the time, the files, and an App label telling you where the run came from. Runs in Studio's Workspace show H2I Workspace, runs from the Assistant show H2I Assistant, and the official apps name themselves (for example the WordPress plugin and the n8n node). Your own code can name itself by sending an app value, such as My shop importer, up to 60 characters. It is only a label for your history: it never changes what a call does. ## Filter and search Search by file name, tool or job id, and filter by date range, tool and app. You can sort by newest, oldest, largest or smallest. Through the API, GET /v1/files returns the same history and accepts the filters status, category, operation, app, from, to, search, sort and job_id (Manage your files with the API). ## Download again Open an entry to preview it and download the files. Pictures and PDFs open in the full-screen viewer. Download links are signed and expire, so open the entry again to get a fresh one. ## How long results are kept Results are kept for the history retention of your plan, then removed automatically. To remove one earlier, delete it from History: the entry and the file are deleted right away (DELETE /v1/files/{id}). See How long we keep your files. Checked against API contract 3.0.0 and the Dashboard. ### Presets and templates https://h2i.davixlabs.io/docs/article/presets-and-templates/ Presets and templates are things you save once and use again. They live in your account, so Studio, the Dashboard, the API, the WordPress plugin and the n8n node all see the same ones. Open them in the Dashboard under Saved. ## Presets: saved settings for a tool A preset is the settings of one tool, saved under a name, for example "Blog image 1200 px". Using it fills in those settings for you. - A preset belongs to one tool. Its name is 1 to 100 characters and must be unique for that tool. - It saves the settings only, never a file. - In the Dashboard, Saved > Presets lists them. Choosing Use opens the tool in Studio with that preset applied. - In the API, create and manage them with /v1/presets, and apply one to a call with its id in the presetId field. ## Templates: a document with blanks A template is a document with placeholders such as {{name}} or {{customer.address}}. Each time you use it, the placeholders are filled with your values. There are two kinds: Kind | What it is | Used with HTML | HTML and optional CSS | The tools that turn HTML into a PDF or an image Word or OpenDocument | A DOCX or ODT file with placeholders, including in headers, footers and footnotes | The mail merge tool - A template name is 1 to 100 characters and unique in your account; the note is up to 300 characters. - The placeholders are found automatically. You can add details to each: a default value, whether it is required, and a description. - A template holds the content only. The settings of the render (page size, format and so on) stay in a preset or in the request. - There is no version history: when you change a template, the next run that uses it gets the new content. - Word files with macros are refused. ## Use them - In Studio: choose a preset or template in the tool. - By API: pass templateId and the values for the placeholders. The templates endpoints are /v1/templates (and /v1/templates/upload for Word and OpenDocument files). - In WordPress: the plugin's Library screen shows the same presets and templates. How many you can keep depends on your plan; see Understand usage and limits. Checked against API contract 3.0.0 and the Dashboard. ### Background jobs https://h2i.davixlabs.io/docs/article/background-jobs/ A job is work that runs in the background, so you do not have to wait for it. Open the list in the Dashboard under Jobs: every job your account has run, from the moment it starts until it finishes. ## How a job starts - You send an API call with async=true. The answer returns a job id at once (Call a tool over REST). Background jobs need a personal API key. - The Assistant, an AI app over MCP, the WordPress plugin or an n8n workflow starts work that takes time. ## Statuses Status | Meaning Waiting | Queued, not started yet Running | Being worked on Done | Finished; the result is available Failed | It did not finish; the job's page shows why Cancelled | Stopped before it made a result ## Find and open a job Search by job number or type, filter, and sort by newest, oldest, longest or shortest. Each row shows the job, its status, date, time taken and number of files, and the name of the app that started it when one was given. Open a job to see how long it waited and ran, its result files, or the reason it failed. If no file is shown for a finished job, it saved none, or its files were removed after the time your plan keeps results (How long we keep your files). ## By API - GET /v1/jobs lists your jobs (paged). - GET /v1/jobs/{id} returns one job's status, progress and result. - POST /v1/jobs/{id}/cancel cancels a job that is still waiting. A job that is already running or finished cannot be cancelled. How many jobs may run at once depends on your plan. Checked against API contract 3.0.0 and the Dashboard. ### Dashboard settings https://h2i.davixlabs.io/docs/article/dashboard-settings/ Under Dashboard > Settings you choose which notices you get, which emails you get, how Studio looks for you, and your language. The choices are saved on your account, so they follow you to every device. ## Notifications Notices inside the app and on your devices. You can turn on push notifications for the device you are using. Security notices about your API keys are always on. ## Emails Choose which emails you get. Emails about your account and your security, such as a new API key, are always sent. News about new tools, tips and offers is optional, and every one of those emails has a link that stops them. ## Studio Setting | What it does Studio opens on | The page you see first: Tools or Assistant A tool opens on | Simple (easy controls), Advanced (every setting) or the tab you used last Show the Advanced tab | Turn off for a simpler Studio. A tool that can only be set up in Advanced still shows it Keep "More settings" open | Shows the extra settings of a tool without opening them each time Show your plan limits | The line with your limits above each tool Code examples in | The language shown first when you copy a request as code: cURL, Python, JavaScript, Node.js, PHP, Ruby, Go, Java, C# or PowerShell ## Language Your default language. Davix H2I opens in it every time, on every device, and your emails use it too. The language menus elsewhere change one visit only. Related: A tour of the Studio workspace. Checked against the Dashboard. ### A tour of the Dashboard https://h2i.davixlabs.io/docs/article/a-tour-of-the-dashboard/ The Dashboard is where you manage your account: your plan, your keys, your usage and everything you have run. Open it at app.h2i.davixlabs.io/dashboard. The menu on the side lists these pages. Studio, where you run the tools, is described in A tour of the Studio workspace. Page | What it is for Overview | Your home screen: a welcome, a short list of first steps that ticks itself off as you do them, your latest files, your API keys and a first API call you can copy in your language. It warns you only about the one thing that blocks work: an allowance that is used up. Usage | What you have used and what is left in this period, over time, per tool and per API key, and why requests failed. See Understand usage and limits. Logs | Every request of your account, worked or failed, with the Assistant's runs. See below. API Keys | Create, rotate and revoke keys. See Create and rotate API keys. Connect | Every way to use your account from other places. See below. Capabilities | Every tool and whether your plan allows it. See below. Saved | Your presets and templates. See Presets and templates. Jobs | Work that runs in the background. See Background jobs. History | Every result you made. See Find past runs in History. Subscription | Your plan, its limits, payments and invoices. See Change or cancel your plan and Invoices and payment methods. Account | Who you are, how you are signed in, account activity and your data. See Account and profile. Settings | Notices, emails, how Studio looks and your language. See Dashboard settings. ## Logs The Logs page lists every request your account made, whether it worked or not. The buttons All, Worked and Failed narrow the list quickly, and the Filters button adds a search, a date range, the kind of work (Images, PDFs, Render, AI, Data, Documents), the API key and the order. Each row shows what the request was and where it came from: an API key by its name, Studio, or the Assistant. Open a row to see whether it worked, why it did not in plain words, what it cost (credits, or a share of your AI allowance) and, for a request that worked, a button to open its result in History. Share the request id from this panel if you contact support. ## Connect Connect has a card for each way to use your account: - AI assistants (MCP) for Claude, ChatGPT and other AI apps: Connect an AI assistant over MCP. - n8n and automations: n8n node. - SDKs and plugins: set-up steps for the JavaScript, PHP and WordPress libraries and the AI helper, and for other languages. An entry that is not released yet says Coming soon until its download is available. Guides: Node, WordPress plugin, command line. - Developer API: your key, the address to call and a first request in the language you choose: Call a tool over REST. ## Capabilities The Capabilities page lists every tool by family, and shows for each whether your plan allows it. For a tool you cannot use yet it names the plan that includes it. Filters let you search by name or id, show only the tools allowed or not allowed on your plan, pick a family or a plan, and sort. The ? next to a tool explains it in plain words. The same information is available to your programs: Find formats, limits and capabilities. Checked against the Dashboard source code. ## API ### Authenticate API requests https://h2i.davixlabs.io/docs/article/authenticate-api-requests/ Every API call that does work is made with an API key. This page explains how to send it and what the errors mean. ## Where the API lives The base address is https://app.h2i.davixlabs.io. Every endpoint starts with /v1/, for example https://app.h2i.davixlabs.io/v1/images/resize. ## Send the key in a header Use either header: ``` X-Api-Key: YOUR_KEY Authorization: Bearer YOUR_KEY ``` Keys in the query string or in the body are refused with api_key_location_not_allowed, because addresses end up in logs and browser history. Get a key from Dashboard > API Keys. ## Test the key ``` curl -H "X-Api-Key: $DAVIX_H2I_API_KEY" https://app.h2i.davixlabs.io/v1/account ``` A good key returns your account details. GET /v1/capabilities needs no key and shows what the server offers. ## With an SDK The official clients take the key once, send it only in a header and never print it. In Python, for example: ``` import os from davix_h2i import H2I h2i = H2I(os.environ["DAVIX_H2I_API_KEY"]) print(h2i.capabilities.account()) # your plan, limits and usage ``` Pick your language in Choose your SDK. ## Authentication errors Code | HTTP | Meaning invalid_api_key | 401 | The key is missing, incomplete, deleted or replaced key_expired | 401 | The key reached its expiry date api_key_location_not_allowed | 400 | The key was sent in the address or body forbidden | 403 | The operation needs an individual customer key endpoint_not_allowed | 403 | Your plan does not include this tool ## Which operations need a personal key Tools run with any valid key. Account operations (keys, usage, jobs, history) and background jobs with async need an individual customer key, not a shared or public one. ## Good habits - Never expose a key in browser code. Call the API from your server. - Use one key per application and rotate keys on a schedule. - The official SDKs send the key only as a header and never print it. Next: Call a tool over REST. Checked against API contract 3.0.0. ### Call a tool over REST https://h2i.davixlabs.io/docs/article/call-a-tool-over-rest/ Every tool is one REST endpoint. You send a request with your API key and your file or settings, and you get JSON back. Examples use your own key in the variable DAVIX_H2I_API_KEY. ## Your first call ``` curl -X POST "https://app.h2i.davixlabs.io/v1/images/resize" \ -H "X-Api-Key: $DAVIX_H2I_API_KEY" \ -F 'images=@photo.jpg' \ -F 'width=800' \ -F 'height=600' \ -F 'resizeMode=fit' ``` File tools take multipart/form-data. The answer holds a results list with one entry per file, including a download link for each result. ## Find the endpoint and its options - Every tool has a page in the API reference with all its fields, limits and errors. The tool id images.resize is the path /v1/images/resize. - The machine-readable description is at GET /v1/contract, with small slices such as /v1/contract/endpoints/images.resize/fields. An OpenAPI document is available too: OpenAPI and the API contract. - Limits that depend on your plan are not fixed: read them from GET /v1/limits (Find formats, limits and capabilities). ## Choose how you get the result Image tools take a response field: url (the default, a download link), binary (the file itself) or base64. With several results, output_bundle=zip returns one ZIP. ## Work from an address instead of a file Where a tool allows it, send source_url instead of a file. Only public http and https addresses are accepted, and your plan must include address input. ## Test without running Add validate_only=true to check your settings without doing the work. ## Background jobs Send async=true to get an answer straight away with a job id and a status address. Poll GET /v1/jobs/{id} until the status is completed (or failed); the finished job holds the result. You can cancel a job that is still queued with POST /v1/jobs/{id}/cancel. Jobs need a personal customer key. ## Retry safely Send an Idempotency-Key header (8 to 128 letters, digits and ._:-) so a retry of the same request is not run twice. Reusing a key for a different request answers idempotency_key_conflict. ## Several files Most tools take several files in one request and return one result each: a failing file does not stop the others. Merge-type tools combine all files into one result. The plan sets how many files per request you may send. ## Name your app Send an app value (or the X-Davix-App header) to label calls in your History. If a call fails, see Error codes and rate limits. Prefer a library? See Use the Node SDK. Checked against API contract 3.0.0. ### Error codes and rate limits https://h2i.davixlabs.io/docs/article/error-codes-and-rate-limits/ When a call fails, Davix H2I answers with an HTTP status and a JSON body that says what went wrong and what to do. ## The shape of an error ``` { "status": "error", "code": "invalid_api_key", "message": "Your API key is missing or invalid.", "error": { "code": "invalid_api_key", "message": "...", "hint": "..." }, "request_id": "..." } ``` code is stable: build your logic on it, not on the message. hint says what to try. Keep the request_id (also in the Request-Id response header) when you contact support. ## Retry or not Each code is marked retryable or not. Retry only retryable errors, such as rate_limit_exceeded (429), server_busy (503), timeout (503) and rate_limit_unavailable (503), and wait a little longer after each try. Do not retry errors that say your request is wrong. The official SDKs do this for you and only retry safe calls or calls that carry an idempotency key. ## The most common codes Code | HTTP | What it means invalid_api_key | 401 | Key missing or invalid key_expired | 401 | Key expired invalid_parameter | 400 | A setting is invalid; the message names it missing_field | 400 | A required field or file is missing unsupported_media_type | 415 | That file type is not accepted invalid_upload | 400 | The file could not be read file_too_large | 413 | The file is over the size limit too_many_files | 413 | More files than allowed in one request pdf_page_limit_exceeded | 413 | The PDF has more pages than allowed endpoint_not_allowed | 403 | Your plan does not include this tool format_not_allowed | 403 | Your plan does not include this format monthly_quota_exceeded | 429 | Allowance used up rate_limit_exceeded | 429 | Too many requests url_blocked / url_fetch_failed | 400 | The address is not allowed, or could not be downloaded async_requires_customer_key | 400 | Background jobs need a personal key idempotency_key_conflict | 409 | Same Idempotency-Key, different request image_processing_failed, pdf_tool_failed, data_conversion_failed, html_render_failed | 500 | The file could not be processed; try another file or setting internal_error | 500, 503 | Something went wrong on our side ## The full list The API has 93 error codes. Read them all, with HTTP status and whether they are retryable, at GET /v1/contract/errors, or the errors of one endpoint at /v1/contract/endpoints/{id}/errors. Each tool's page in the API reference lists the errors it can return. Stuck? See Fix: a tool run returns an error. Checked against API contract 3.0.0. ### Fix: a tool run returns an error https://h2i.davixlabs.io/docs/article/fix-a-tool-run-returns-an-error/ When a run fails, the error tells you why. Work through this list from the top. ## 1. Read the code and the hint In Studio the error is explained in plain words with steps to try. In the API every error has a code, a message and a hint. Keep the request_id. Look up the code in Error codes and rate limits. ## 2. Match the symptom You see | Likely cause | Try this invalid_api_key (401) | Key missing, incomplete, deleted or replaced | Copy the whole key again, send it in the X-Api-Key header, or make a new key. See Authenticate API requests api_key_location_not_allowed | Key sent in the address or body | Move it to a header invalid_parameter (400) | A setting is out of range or malformed | The message names the setting. The tool's page in the API reference lists its allowed values missing_field (400) | A required file or field is missing | Check the tool's required fields and the field name of the file unsupported_media_type (415) | The file type is not accepted by this tool | Convert the file first, or choose a tool for that type file_too_large, too_many_files, total_upload_exceeded (413) | Over your plan's size limits | Send less per request. Read your limits with GET /v1/limits endpoint_not_allowed, format_not_allowed (403) | Your plan does not include this tool or format | See Change or cancel your plan monthly_quota_exceeded, rate_limit_exceeded (429) | Allowance used up, or too many requests | See Understand usage and limits; for rate limits wait and retry url_blocked, url_fetch_failed (400) | The web address is private, not http(s), or could not be downloaded | Use a public address that opens in a browser image_processing_failed, pdf_tool_failed, data_conversion_failed (500) | The file is damaged or unusual | Try another copy of the file or different settings server_busy, timeout (503) | The service was briefly busy | Retry after a moment; use background jobs for big files ai_not_configured, feature_unavailable | The AI feature is not available on this server yet | Try later, or another tool ## 3. Still stuck? Contact support with the request id, the tool, the time, and what you expected. Do not send your API key. Checked against API contract 3.0.0. ### Manage your files with the API https://h2i.davixlabs.io/docs/article/manage-your-files-with-the-api/ Every result you make is saved in your History. With a personal API key you can list those files, fetch one again and delete one, the same things the History pages do. Background: Find past runs in History. ## List your files ``` curl -H "X-Api-Key: $DAVIX_H2I_API_KEY" "https://app.h2i.davixlabs.io/v1/files?limit=20&operation=images.resize" ``` The answer has results, page, limit, total and has_more. Go to the next page with page=2 while has_more is true. You can filter with status, category, operation, app, from, to, search and job_id, and change the order with sort. ## What a file entry holds Field | Meaning id | The file's id in your History original_filename, mime_type, size_bytes | What the file is operation, category, job_id | Which tool made it, and the background job if there was one status | Whether the file is still available url | A signed download link. It is empty unless the status is available expires_at, created_at | When the file will be removed, and when it was made app | The name your code or app gave the call parameters, settings, input_names | The settings used and the names of the files that went in. Secrets and bulky content are left out ## Fetch a file again GET /v1/files/{id} returns one file with a fresh signed link while it is still available. When a tool answers, its result carries a file_id that you can use here. Download links expire, so ask again instead of keeping old links. ## Delete a file now DELETE /v1/files/{id} deletes the History entry and the file right away, and its download link stops working at once. You can only delete your own files; anything else answers not_found. Files that you do not delete are removed automatically after the retention time of your plan (How long we keep your files). These calls need a personal API key. See Authenticate API requests. Checked against API contract 3.0.0. ### OpenAPI and the API contract https://h2i.davixlabs.io/docs/article/openapi-and-the-api-contract/ Davix H2I describes its whole API in a machine-readable way. You can use it to generate a client in any language, to fill an API tool such as an API explorer, or to check exactly what a tool accepts. Reading it needs no API key. ## OpenAPI Address | What you get GET /openapi.json | The whole API as an OpenAPI 3 document GET /openapi/categories/{name}.json | A smaller OpenAPI document with only the tools of one category GET /openapi/endpoints/{id}.json | An OpenAPI document with a single tool ``` curl https://app.h2i.davixlabs.io/openapi/endpoints/images.resize.json ``` ## Postman The same API is available as a Postman collection, with a request for every tool. It needs no key to download. In Postman choose Import, then Link, and paste: ``` https://app.h2i.davixlabs.io/postman_collection.json ``` Then put your API key in the collection's variables and send a request. The address always serves the collection of the current release. ## The API contract The contract is the complete description the official libraries are built from. GET /v1/contract returns it whole. Because it is large, small slices are available: Address | What you get /v1/contract/endpoints | A light list of every tool: id, name, method, path, category /v1/contract/endpoints/{id} | One tool in full: fields, limits, the response, errors /v1/contract/endpoints/{id}/fields | Every request field of one tool; add /{name} for a single field /v1/contract/endpoints/{id}/examples | Ready-made cURL, Node.js and PHP examples /v1/contract/endpoints/{id}/errors | The error codes that tool can return /v1/contract/categories | The categories and how many tools each has /v1/contract/errors | Every error code, with its HTTP status, whether to retry, and its meaning /v1/contract/enums | The shared lists of allowed values /v1/contract/auth | How to sign in, the headers the API uses, the retry rules and the paths a generic client may call The tool id is the one used in the API reference, for example images.resize. ## What the contract tells you - Sign-in: send the key in the X-Api-Key header, or as Authorization: Bearer. A key in the address or body is refused. - Retries: only answers with the statuses 429, 503 and 504 that an error marks as retryable may be repeated. A POST is repeated only when the tool supports idempotency, and then with the same Idempotency-Key every time. - Headers: the optional Idempotency-Key and X-Davix-App request headers, and the Request-Id and Retry-After response headers. - Every field with its type, whether it is required, its default, its allowed values and its limits. Limits that depend on your plan are not in the contract; read them with Find formats, limits and capabilities. ## Keep a client up to date The contract has a version. The official libraries ship the contract they were built from and can also read the live one, so a newer API does not break them. See Use the Node SDK. Checked against API contract 3.0.0. ### Find formats, limits and capabilities https://h2i.davixlabs.io/docs/article/find-formats-limits-and-capabilities/ Three read-only calls tell your program what it can do, so you do not have to guess or copy numbers into your code. ## Limits of your plan ``` curl -H "X-Api-Key: $DAVIX_H2I_API_KEY" "https://app.h2i.davixlabs.io/v1/limits" curl -H "X-Api-Key: $DAVIX_H2I_API_KEY" "https://app.h2i.davixlabs.io/v1/limits?endpoint=images.resize" ``` For every tool the answer says whether your plan allows it and, if not, the smallest plan that includes it. For the tools it applies to, it also gives the timeout, the file limits (files per request, size of one file, total size), the largest result you may ask for, the page cap for PDFs, the cost of one call and the tool's own cap per plan period. A value that is null means there is no limit. Plans can change, so read these values from here instead of writing them down. See also Understand usage and limits. ## Formats ``` curl -H "X-Api-Key: $DAVIX_H2I_API_KEY" "https://app.h2i.davixlabs.io/v1/formats?family=images" ``` Lists every format Davix H2I knows: its MIME types and extensions, what it can do (read, write, animated, transparent, lossy, vector, multi-page), which tools accept it as an upload and which produce it as a result, whether it is available, and whether your plan allows it. You can filter with family, direction, endpoint and status. ## Capabilities ``` curl https://app.h2i.davixlabs.io/v1/capabilities curl https://app.h2i.davixlabs.io/v1/capabilities/pdfs curl https://app.h2i.davixlabs.io/v1/capabilities/pdfs/ocr ``` Shows what the service offers right now, by section (images, PDFs, render, data and more) and feature. It needs no key. In the Dashboard, the Capabilities page shows the same for your account: every tool, whether your plan allows it, and which plan unlocks the others (A tour of the Dashboard). Your own plan, usage and account are at GET /v1/account, GET /v1/subscription and GET /v1/usage. Checked against API contract 3.0.0. ## SDKs and CLI ### Use the Node SDK https://h2i.davixlabs.io/docs/article/use-the-node-sdk/ The Node SDK is the official JavaScript client. Its methods and typings are generated from the same API contract as the server, so they match the API. It needs Node 18 or newer and has no runtime dependencies. ## Install ``` npm install @davixlabs/h2i-sdk ``` ## Use it ``` const { DavixH2I, enums } = require('@davixlabs/h2i-sdk'); const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: 'https://app.h2i.davixlabs.io', }); const res = await h2i.images.resize({ images: './photo.jpg', width: 800, resizeMode: enums.ResizeFit.COVER, }); console.log(res.data, res.requestId); ``` ## What it does for you - Key safety: the key is sent only in the X-Api-Key header. - Uploads: a file can be a path, a Buffer, a Blob or File, a stream, or { data, filename, contentType }. - Errors: every failure is a DavixH2IError with status, code, requestId, hint, retryable and more. Compare codes with ErrorCodes. - Retries: only retryable errors, and only for calls that cannot do the work twice. By default the SDK makes one idempotency key per call and reuses it on every retry, so a retry never charges you twice. You can pass your own idempotencyKey or turn the automatic key off with autoIdempotencyKey: false. - Metadata: h2i.schema('images.resize') gives each field's type, limits, default and allowed values. await h2i.capabilities() shows what the server offers and h2i.capabilities.account() your plan, limits and usage. - Escape hatch: h2i.request('POST', '/v1/…', { json }) reaches any public /v1/ path the SDK does not know yet. - Name your app: add app: 'My shop importer' to a call to label it in your History. ## Other languages Clients for Python, PHP, Go, Java, .NET and Ruby are published on their package registries too and are built from the same contract, so they match the API. Each guide has the install command and the package page. Checked against the Node SDK README and the npm registry. ### H2I command line reference https://h2i.davixlabs.io/docs/article/h2i-command-line-reference/ The command line h2i comes in the npm package @davixlabs/h2i-mcp. It runs Davix H2I tools on files and folders on your computer, and the same program is also the helper that lets AI apps work on your local files (MCP). It needs Node.js 18 or newer. ## Sign in ``` npx -y @davixlabs/h2i-mcp login npx -y @davixlabs/h2i-mcp login --no-browser # on a server: shows a code and an address ``` A browser window opens on the Davix H2I website; check the name "Davix H2I helper" and press Allow access. Your sign-in is stored on your computer, readable only by you, and stays valid for 90 days without use by default. logout ends it on the computer and on the server. For scripts and servers you can set DAVIX_H2I_TOKEN instead. ## Commands The examples write h2i. If you have not installed the package (npm install -g @davixlabs/h2i-mcp), write npx -y @davixlabs/h2i-mcp in its place; h2i-mcp is the same command. ``` h2i ops resize # find an operation h2i run images.resize photo.png --param width=1600 # run it on a file h2i run pdfs.merge a.pdf b.pdf --out merged.pdf # several files in, one result h2i folder images.optimize ./photos --out-dir ./small --recursive ``` - ops searches the operations, which are read live from the server so the list is never out of date. - run sends one or more files to an operation and saves the result next to the original (named like photo.davix.png) or where you say with --out. An existing file is never replaced unless you add --overwrite. - folder runs an operation on every matching file of a folder, with --out-dir into another folder, with --recursive into sub-folders and with --ext jpg,png only for those file types. - setup adds Davix H2I to the AI apps on your computer (--client picks one app, --all and --yes skip the question, --print only shows what it would write); doctor checks Node, the connection, your sign-in and each app's settings; whoami shows where your sign-in comes from and when it expires; logout ends it. Files are sent untouched, and the helper checks that the copy on the server is identical before it works on it. ## Requirements The command line uses your Davix H2I account, so the tools and limits of your plan apply. Using it as the helper for AI apps needs a plan that includes MCP. Prefer code? Use the Node SDK. Checked against the helper README and the npm registry. ### Use the Python SDK https://h2i.davixlabs.io/docs/article/use-the-python-sdk/ Available now. The Python SDK is published on PyPI and works with the install command below. See the package page on PyPI. If you prefer not to use it, you can also call the REST API from Python with any HTTP client (Call a tool over REST). The Python SDK is the official Python client. Its methods, field names, allowed values and error codes are generated from the same API contract as the server, so they match the API. ## Requirements and install Python 3.8 or newer. It needs no other packages. ``` pip install davixlabs-h2i ``` ## Create a client Create an API key first (Create and rotate API keys) and keep it in an environment variable or a secrets manager, never in the code. ``` import os from davix_h2i import H2I, DavixH2IError, ErrorCodes, enums h2i = H2I(os.environ["DAVIX_H2I_API_KEY"]) ``` The address defaults to https://app.h2i.davixlabs.io. ## Run a tool ``` result = h2i.images.resize({ "images": "photo.jpg", "width": 800, "resizeMode": enums.ResizeFit.COVER, }) print(result.status, result.request_id) ``` Tools are grouped like the API: h2i.images.resize(...), h2i.pdfs.merge(...), h2i.ai.documents.summarize(...). You pass the parameters as a dict, using the names of the API reference. Find every tool and its fields in the tool list; each tool page has an API reference. ## The result What | Meaning result.data | The answer: parsed JSON, text or bytes result.status, result.request_id | HTTP status and the id to quote to support result.files() | Every result file in the answer, each with a signed url result.accepted, result.job_id | True when the server accepted a background job (HTTP 202), and its id result.attempts, result.idempotency_key | How many tries it took and the key used ## Send files and download results A file parameter accepts a path string, bytes, an open file, FileInput(data=..., filename="a.png"), or a dict such as {"path": "a.png"} or {"data": b"...", "filename": "a.png"}. A path is read from disk only for fields the API defines as files. Results are files with a signed address. Download them with the client; the API key is not sent with the download, and only addresses of your Davix H2I host are accepted. ``` h2i.download(result.files()[0], dest="photo-800.jpg") # saves the file data = h2i.download(result.files()[0]) # or returns the bytes ``` ## Options ### Client options Option | What it does base_url | Another Davix H2I address. It must be https (http is allowed only for localhost) timeout | Seconds for one attempt, 60 by default max_retries, max_retry_delay | 2 retries and a longest wait of 30 seconds by default auto_idempotency_key | On by default, see Retries validate | Check parameters before sending, off by default auth_scheme | "x-api-key" (default) or "bearer" user_agent_suffix | Text added to the User-Agent, to name your program ### Options of one call Options of one call are keyword arguments after the parameters: idempotency_key, headers, timeout, max_retries, retry (False turns retries off), validate and strict. ``` h2i.images.resize({"images": "photo.jpg", "width": 800}, idempotency_key="order-42", timeout=120) ``` ## Retries and idempotency The client retries only what is safe to repeat: a rate limit answer (429, it waits as long as the server says), and 503 or 504 answers that are marked retryable, for calls that cannot do the work twice. By default it makes one idempotency key for each call and reuses it on every retry, so a retry never charges you twice. You can give your own key, which must be 8 to 128 characters from letters, digits and . _ : -, and you can turn retries or the automatic key off. See Error codes and rate limits. ## Errors ``` try: result = h2i.images.resize({"images": "photo.jpg", "width": 800}) except DavixH2IError as error: if error.code == ErrorCodes.MONTHLY_QUOTA_EXCEEDED: print("Allowance used up:", error.hint) else: print(error.status, error.code, error.hint, error.request_id) ``` Every failure is a DavixH2IError. The subclasses are ValidationError, UploadError, AuthenticationError, PlanError, QuotaError, RateLimitError, ProcessingError, ServerError, NotFoundError, ConflictError, AiError, KeyManagementError, JobError and SignedUrlError for answers of the API, NetworkError and TimeoutError for connection problems, and ConfigError when the SDK is used wrongly. An error has code, status, hint, details, request_id, renewal_url, retryable, retry_after and body. ErrorCodes holds every code as a constant. Quote the request id when you contact support. The meaning of each code is in Error codes and rate limits. ## Look up fields, limits and your plan ``` h2i.schema("images.resize").fields # type, limits, default and allowed values of each field h2i.capabilities() # what the server offers h2i.capabilities.account() # your plan, limits and usage h2i.contract.refresh() # use the live contract instead of the bundled one ``` The schema of a tool gives each field's type, limits, default and allowed values. The account information shows what your plan allows and what you have used. ## Reach a new endpoint If the API gets an endpoint this version does not know yet, use the generic request method. It only reaches the public /v1/ API. ``` h2i.request("GET", "/v1/usage") h2i.request("GET", "/v1/jobs", query={"limit": 10}) ``` ## Name your app in the History Every processing call accepts an optional app parameter. Its text is shown under each result in your History, for example My shop importer. ## Safe by design - The API key is sent only in a header. It is never put in an address or a body, never printed (showing the client does not reveal it), and never sent to a redirect or to a download address. - The client refuses plain http for any host except your own computer, and refuses an address with a password in it. - Redirects are not followed. Other clients: Node SDK, PHP SDK, Go SDK, Java SDK, .NET SDK, Ruby SDK. Checked against the Python SDK source code and API contract 3.0.0. ### Use the PHP SDK https://h2i.davixlabs.io/docs/article/use-the-php-sdk/ Available now. The PHP SDK is published on Packagist and works with the install command below. See the package page on Packagist. If you prefer not to use it, you can also call the REST API from PHP with any HTTP client (Call a tool over REST). The PHP SDK is the official PHP client. Its methods, field names, allowed values and error codes are generated from the same API contract as the server, so they match the API. ## Requirements and install PHP 7.4 or newer with the curl and json extensions. ``` composer require davixlabs/h2i-sdk ``` ## Create a client Create an API key first (Create and rotate API keys) and keep it in an environment variable or a secrets manager, never in the code. ``` require 'vendor/autoload.php'; $h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY')]); ``` The address defaults to https://app.h2i.davixlabs.io. ## Run a tool ``` $result = $h2i->images()->resize([ 'images' => '/path/photo.jpg', 'width' => 800, 'resizeMode' => \Davix\H2I\Enums\ResizeFit::COVER, ]); echo $result->status, ' ', $result->requestId; ``` Tools are grouped like the API: $h2i->images()->resize(...), $h2i->pdfs()->merge(...), $h2i->ai()->documents()->summarize(...). You pass the parameters as an array, using the names of the API reference. Find every tool and its fields in the tool list; each tool page has an API reference. ## The result What | Meaning $result->data | The answer: an array for JSON, otherwise text or bytes $result->status, $result->requestId | HTTP status and the id to quote to support $result->files() | Every result file in the answer, each with a signed url $result->accepted(), $result->jobId() | True when the server accepted a background job (HTTP 202), and its id $result->attempts, $result->idempotencyKey | How many tries it took and the key used ## Send files and download results A file parameter accepts a file path, a string of bytes wrapped as ['data' => $bytes, 'filename' => 'a.png'], or a stream. A path is read from disk only for fields the API defines as files. Results are files with a signed address. Download them with the client; the API key is not sent with the download, and only addresses of your Davix H2I host are accepted. ``` $h2i->download($result->files()[0], ['dest' => 'photo-800.jpg']); // saves the file $file = $h2i->download($result->files()[0]); // or returns ['body' => ..., 'contentType' => ..., 'size' => ...] ``` ## Options ### Client options Option | What it does baseUrl | Another Davix H2I address. It must be https (http is allowed only for localhost) timeoutMs | Milliseconds for one attempt, 60000 by default maxRetries, maxRetryDelayMs | 2 retries and a longest wait of 30000 ms by default autoIdempotencyKey | On by default, see Retries validate | Check parameters before sending, off by default authScheme | 'x-api-key' (default) or 'bearer' userAgentSuffix | Text added to the User-Agent, to name your program ### Options of one call Options of one call are an array after the parameters: idempotencyKey, headers, timeoutMs, maxRetries, retry (false turns retries off), validate and strict. ``` $h2i->images()->resize(['images' => '/path/photo.jpg', 'width' => 800], ['idempotencyKey' => 'order-42', 'timeoutMs' => 120000]); ``` ## Retries and idempotency The client retries only what is safe to repeat: a rate limit answer (429, it waits as long as the server says), and 503 or 504 answers that are marked retryable, for calls that cannot do the work twice. By default it makes one idempotency key for each call and reuses it on every retry, so a retry never charges you twice. You can give your own key, which must be 8 to 128 characters from letters, digits and . _ : -, and you can turn retries or the automatic key off. See Error codes and rate limits. ## Errors ``` try { $result = $h2i->images()->resize(['images' => '/path/photo.jpg', 'width' => 800]); } catch (\Davix\H2I\Exceptions\DavixH2IException $error) { if ($error->errorCode === \Davix\H2I\ErrorCodes::MONTHLY_QUOTA_EXCEEDED) { echo 'Allowance used up: ', $error->hint; } else { echo $error->status, ' ', $error->errorCode, ' ', $error->hint, ' ', $error->requestId; } } ``` Every failure is a DavixH2IException (in the Davix\H2I\Exceptions namespace). The subclasses are ValidationException, UploadException, AuthenticationException, PlanException, QuotaException, RateLimitException, ProcessingException, ServerException, NotFoundException, ConflictException, AiException, KeyException, JobException and SignedUrlException for answers of the API, NetworkException and TimeoutException for connection problems, and ConfigException when the SDK is used wrongly. An exception has the public properties status, errorCode, hint, details, requestId, renewalUrl, retryable, retryAfterMs and body. ErrorCodes holds every code as a constant. Quote the request id when you contact support. The meaning of each code is in Error codes and rate limits. ## Look up fields, limits and your plan ``` $h2i->schema('images.resize'); // type, limits, default and allowed values of each field $h2i->capabilities()->runtime(); // what the server offers $h2i->capabilities()->account(); // your plan, limits and usage $h2i->refreshContract(); // use the live contract instead of the bundled one ``` The schema of a tool gives each field's type, limits, default and allowed values. The account information shows what your plan allows and what you have used. ## Reach a new endpoint If the API gets an endpoint this version does not know yet, use the generic request method. It only reaches the public /v1/ API. ``` $h2i->request('GET', '/v1/usage'); $h2i->request('GET', '/v1/jobs', ['query' => ['limit' => 10]]); ``` ## Name your app in the History Every processing call accepts an optional app parameter. Its text is shown under each result in your History, for example My shop importer. ## Safe by design - The API key is sent only in a header. It is never put in an address or a body, never printed (showing the client does not reveal it), and never sent to a redirect or to a download address. - The client refuses plain http for any host except your own computer, and refuses an address with a password in it. - Redirects are not followed. Other clients: Node SDK, Python SDK, Go SDK, Java SDK, .NET SDK, Ruby SDK. Checked against the PHP SDK source code and API contract 3.0.0. ### Use the Go SDK https://h2i.davixlabs.io/docs/article/use-the-go-sdk/ Available now. The Go SDK is published on the Go module proxy and works with the install command below. See the package page on pkg.go.dev. If you prefer not to use it, you can also call the REST API from Go with any HTTP client (Call a tool over REST). The Go SDK is the official Go client. Its methods, field names, allowed values and error codes are generated from the same API contract as the server, so they match the API. ## Requirements and install Go 1.21 or newer. It uses only the standard library. A client is safe to share between goroutines. ``` go get github.com/Davixlabs/davix-h2i-sdk-go ``` ## Create a client Create an API key first (Create and rotate API keys) and keep it in an environment variable or a secrets manager, never in the code. ``` import ( "context" "errors" "log" "os" h2i "github.com/Davixlabs/davix-h2i-sdk-go" ) client, err := h2i.New(os.Getenv("DAVIX_H2I_API_KEY")) if err != nil { log.Fatal(err) } ctx := context.Background() ``` The address defaults to https://app.h2i.davixlabs.io. From version 2 on, the module path ends in /v2. ## Run a tool ``` result, err := client.Images().Resize(ctx, h2i.Params{ "images": "photo.jpg", "width": 800, "resizeMode": h2i.ResizeFitCover, }) ``` Tools are grouped like the API: client.Images().Resize(...), client.Pdfs().Merge(...), client.Ai().Documents().Summarize(...). Every method takes a context first, then h2i.Params with the names of the API reference. Find every tool and its fields in the tool list; each tool page has an API reference. ## The result What | Meaning result.Data | The answer: parsed JSON, text or bytes; result.Map() gives a JSON object result.Status, result.RequestID | HTTP status and the id to quote to support result.Files() | Every result file in the answer, each with a signed url result.Accepted(), result.JobID() | True when the server accepted a background job (HTTP 202), and its id result.Attempts, result.IdempotencyKey | How many tries it took and the key used ## Send files and download results A file parameter accepts a path string, h2i.FilePath("a.png") to mark a path explicitly, or h2i.File{Data: bytes, Filename: "a.png"} for bytes you already have. A path is read from disk only for fields the API defines as files. Results are files with a signed address. Download them with the client; the API key is not sent with the download, and only addresses of your Davix H2I host are accepted. ``` err = client.DownloadTo(ctx, result.Files()[0]["url"].(string), "photo-800.jpg") // saves the file data, err := client.Download(ctx, address) // or returns the bytes ``` ## Options ### Client options Option | What it does h2i.WithBaseURL(url) | Another Davix H2I address. It must be https (http is allowed only for localhost) h2i.WithTimeout(d) | Time for one attempt, 60 seconds by default h2i.WithMaxRetries(n), h2i.WithMaxRetryDelay(d) | 2 retries and a longest wait of 30 seconds by default h2i.WithoutAutoIdempotencyKey() | Turns the automatic key off, see Retries h2i.WithValidation() | Check parameters before sending h2i.WithBearerAuth() | Send the key as a Bearer token instead of X-Api-Key h2i.WithHTTPClient(c) | Your own http.Client, for a proxy for example. Redirects are always refused ### Options of one call Options of one call are extra arguments after the parameters: h2i.IdempotencyKey(key), h2i.Header(name, value), h2i.Timeout(d), h2i.MaxRetries(n), h2i.NoRetry(), h2i.Validate() and h2i.Strict(). ``` client.Images().Resize(ctx, h2i.Params{"images": "photo.jpg", "width": 800}, h2i.IdempotencyKey("order-42"), h2i.Timeout(2*time.Minute)) ``` ## Retries and idempotency The client retries only what is safe to repeat: a rate limit answer (429, it waits as long as the server says), and 503 or 504 answers that are marked retryable, for calls that cannot do the work twice. By default it makes one idempotency key for each call and reuses it on every retry, so a retry never charges you twice. You can give your own key, which must be 8 to 128 characters from letters, digits and . _ : -, and you can turn retries or the automatic key off. See Error codes and rate limits. ## Errors ``` result, err := client.Images().Resize(ctx, h2i.Params{"images": "photo.jpg", "width": 800}) var failure *h2i.Error if errors.As(err, &failure) { if failure.Code == h2i.CodeMonthlyQuotaExceeded { log.Println("Allowance used up:", failure.Hint) } else { log.Println(failure.Status, failure.Code, failure.Hint, failure.RequestID) } } ``` Every failure is an *h2i.Error; find it with errors.As. Its Kind says what went wrong: KindValidation, KindUpload, KindAuth, KindPlan, KindQuota, KindRateLimit, KindProcessing, KindServer, KindNotFound, KindConflict, KindAI, KindKey, KindJob, KindSignedURL, KindAPI, KindNetwork, KindTimeout or KindConfig (the SDK was used wrongly). It also has Code, Status, Hint, Details, RequestID, RenewalURL, Retryable, RetryAfter and Body. Every code is a constant such as h2i.CodeMonthlyQuotaExceeded. Quote the request id when you contact support. The meaning of each code is in Error codes and rate limits. ## Look up fields, limits and your plan ``` client.Schema("images.resize") // type, limits, default and allowed values of each field client.RuntimeCapabilities(ctx) // what the server offers client.AccountCapabilities(ctx) // your plan, limits and usage client.RefreshContract(ctx) // use the live contract instead of the bundled one ``` The schema of a tool gives each field's type, limits, default and allowed values. The account information shows what your plan allows and what you have used. ## Reach a new endpoint If the API gets an endpoint this version does not know yet, use the generic request method. It only reaches the public /v1/ API. ``` client.Request(ctx, "GET", "/v1/usage", h2i.GenericRequest{}) client.Request(ctx, "GET", "/v1/jobs", h2i.GenericRequest{Query: map[string]any{"limit": 10}}) ``` ## Name your app in the History Every processing call accepts an optional app parameter. Its text is shown under each result in your History, for example My shop importer. ## Safe by design - The API key is sent only in a header. It is never put in an address or a body, never printed (showing the client does not reveal it), and never sent to a redirect or to a download address. - The client refuses plain http for any host except your own computer, and refuses an address with a password in it. - Redirects are not followed. Other clients: Node SDK, Python SDK, PHP SDK, Java SDK, .NET SDK, Ruby SDK. Checked against the Go SDK source code and API contract 3.0.0. ### Use the Java SDK https://h2i.davixlabs.io/docs/article/use-the-java-sdk/ Available now. The Java SDK is published on Maven Central and works with the install command below. See the artifact page on Maven Central, which shows the latest version. If you prefer not to use it, you can also call the REST API from Java with any HTTP client (Call a tool over REST). The Java SDK is the official Java client. Its methods, field names, allowed values and error codes are generated from the same API contract as the server, so they match the API. ## Requirements and install Java 11 or newer. It needs no other libraries. ``` io.davixlabs h2i-sdk THE_LATEST_VERSION ``` ## Create a client Create an API key first (Create and rotate API keys) and keep it in an environment variable or a secrets manager, never in the code. ``` import io.davixlabs.h2i.*; H2IClient h2i = new H2IClient(System.getenv("DAVIX_H2I_API_KEY")); ``` The address defaults to https://app.h2i.davixlabs.io. To change an option, build the client with H2IClient.builder(key)...build(). ## Run a tool ``` Response result = h2i.images().resize(Params.of( "images", "photo.jpg", "width", 800, "resizeMode", Enums.ResizeFit.COVER)); System.out.println(result.status() + " " + result.requestId()); ``` Tools are grouped like the API: h2i.images().resize(...), h2i.pdfs().merge(...), h2i.ai().documents().summarize(...). You pass the parameters as Params, using the names of the API reference. Find every tool and its fields in the tool list; each tool page has an API reference. ## The result What | Meaning result.data(), result.json() | The answer: parsed JSON, text or bytes, and the JSON object result.status(), result.requestId() | HTTP status and the id to quote to support result.files() | Every result file in the answer, each with a signed url result.accepted(), result.jobId() | True when the server accepted a background job (HTTP 202), and its id result.attempts(), result.idempotencyKey() | How many tries it took and the key used ## Send files and download results A file parameter accepts a path string, or new H2IFile(bytes, "a.png") for bytes you already have. A path is read from disk only for fields the API defines as files. Results are files with a signed address. Download them with the client; the API key is not sent with the download, and only addresses of your Davix H2I host are accepted. ``` h2i.downloadTo((String) result.files().get(0).get("url"), java.nio.file.Path.of("photo-800.jpg")); // saves the file byte[] data = h2i.download(address); // or returns the bytes ``` ## Options ### Client options (on the builder) Option | What it does baseUrl(url) | Another Davix H2I address. It must be https (http is allowed only for localhost) timeout(Duration) | Time for one attempt, 60 seconds by default maxRetries(n), maxRetryDelay(Duration) | 2 retries and a longest wait of 30 seconds by default autoIdempotencyKey(boolean) | On by default, see Retries validate(boolean) | Check parameters before sending, off by default bearerAuth() | Send the key as a Bearer token instead of X-Api-Key ### Options of one call Options of one call are a CallOptions after the parameters: idempotencyKey, header, timeout, maxRetries, noRetry, validate and strict. ``` h2i.images().resize(Params.of("images", "photo.jpg", "width", 800), new CallOptions().idempotencyKey("order-42").timeout(java.time.Duration.ofMinutes(2))); ``` ## Retries and idempotency The client retries only what is safe to repeat: a rate limit answer (429, it waits as long as the server says), and 503 or 504 answers that are marked retryable, for calls that cannot do the work twice. By default it makes one idempotency key for each call and reuses it on every retry, so a retry never charges you twice. You can give your own key, which must be 8 to 128 characters from letters, digits and . _ : -, and you can turn retries or the automatic key off. See Error codes and rate limits. ## Errors ``` try { Response result = h2i.images().resize(Params.of("images", "photo.jpg", "width", 800)); } catch (H2IException error) { if (ErrorCodes.MONTHLY_QUOTA_EXCEEDED.equals(error.getCode())) { System.out.println("Allowance used up: " + error.getHint()); } else { System.out.println(error.getStatus() + " " + error.getCode() + " " + error.getHint() + " " + error.getRequestId()); } } ``` Every failure is an H2IException (unchecked). getKind() says what went wrong: VALIDATION, UPLOAD, AUTH, PLAN, QUOTA, RATE_LIMIT, PROCESSING, SERVER, NOT_FOUND, CONFLICT, AI, KEY, JOB, SIGNED_URL, API, NETWORK, TIMEOUT or CONFIG (the SDK was used wrongly). It also has getCode(), getStatus(), getHint(), getDetails(), getRequestId(), getRenewalUrl(), isRetryable(), getRetryAfter() and getBody(). ErrorCodes holds every code as a constant. Quote the request id when you contact support. The meaning of each code is in Error codes and rate limits. ## Look up fields, limits and your plan ``` h2i.schema("images.resize"); // type, limits, default and allowed values of each field h2i.capabilities().runtime(); // what the server offers h2i.capabilities().account(); // your plan, limits and usage h2i.contract().refresh(); // use the live contract instead of the bundled one ``` The schema of a tool gives each field's type, limits, default and allowed values. The account information shows what your plan allows and what you have used. ## Reach a new endpoint If the API gets an endpoint this version does not know yet, use the generic request method. It only reaches the public /v1/ API. ``` H2IClient.RequestInput input = new H2IClient.RequestInput(); input.query = java.util.Map.of("limit", 10); h2i.request("GET", "/v1/jobs", input, null); ``` ## Name your app in the History Every processing call accepts an optional app parameter. Its text is shown under each result in your History, for example My shop importer. ## Safe by design - The API key is sent only in a header. It is never put in an address or a body, never printed (showing the client does not reveal it), and never sent to a redirect or to a download address. - The client refuses plain http for any host except your own computer, and refuses an address with a password in it. - Redirects are not followed. Other clients: Node SDK, Python SDK, PHP SDK, Go SDK, .NET SDK, Ruby SDK. Checked against the Java SDK source code and API contract 3.0.0. ### Use the .NET SDK https://h2i.davixlabs.io/docs/article/use-the-dotnet-sdk/ Available now. The .NET SDK is published on NuGet and works with the install command below. See the package page on NuGet. If you prefer not to use it, you can also call the REST API from .NET with any HTTP client (Call a tool over REST). The .NET SDK is the official .NET client. Its methods, field names, allowed values and error codes are generated from the same API contract as the server, so they match the API. ## Requirements and install .NET 8 or newer. It needs no other packages. ``` dotnet add package Davixlabs.H2I ``` ## Create a client Create an API key first (Create and rotate API keys) and keep it in an environment variable or a secrets manager, never in the code. ``` using Davix.H2I; using var h2i = new H2IClient(Environment.GetEnvironmentVariable("DAVIX_H2I_API_KEY")!); ``` The address defaults to https://app.h2i.davixlabs.io. To change an option, pass an H2IOptions as the second argument. ## Run a tool ``` var result = await h2i.Images.ResizeAsync(new Params { ["images"] = "photo.jpg", ["width"] = 800, ["resizeMode"] = Davix.H2I.Enums.ResizeFit.Cover, }); Console.WriteLine($"{result.Status} {result.RequestId}"); ``` Tools are grouped like the API: h2i.Images.ResizeAsync(...), h2i.Pdfs.MergeAsync(...), h2i.Ai.Documents.SummarizeAsync(...). Every method is asynchronous and takes Params with the names of the API reference, then optional CallOptions and a cancellation token. Find every tool and its fields in the tool list; each tool page has an API reference. ## The result What | Meaning result.Data, result.Json | The answer: parsed JSON, text or bytes, and the JSON node result.Status, result.RequestId | HTTP status and the id to quote to support result.Files() | Every result file in the answer, each with a signed url result.Accepted, result.JobId | True when the server accepted a background job (HTTP 202), and its id result.Attempts, result.IdempotencyKey | How many tries it took and the key used ## Send files and download results A file parameter accepts a path string, or new H2IFile(bytes, "a.png") for bytes you already have. A path is read from disk only for fields the API defines as files. Results are files with a signed address. Download them with the client; the API key is not sent with the download, and only addresses of your Davix H2I host are accepted. ``` await h2i.DownloadToAsync(result.Files()[0]["url"]!.GetValue(), "photo-800.jpg"); // saves the file byte[] data = await h2i.DownloadAsync(address); // or returns the bytes ``` ## Options ### Client options (H2IOptions) Option | What it does BaseUrl | Another Davix H2I address. It must be https (http is allowed only for localhost) Timeout | Time for one attempt, 60 seconds by default MaxRetries, MaxRetryDelay | 2 retries and a longest wait of 30 seconds by default AutoIdempotencyKey | On by default, see Retries Validate | Check parameters before sending, off by default AuthScheme | "x-api-key" (default) or "bearer" UserAgentSuffix | Text added to the User-Agent, to name your program ### Options of one call Options of one call are a CallOptions after the parameters: IdempotencyKey, Headers, Timeout, MaxRetries, Retry (false turns retries off), Validate and Strict. ``` await h2i.Images.ResizeAsync(new Params { ["images"] = "photo.jpg", ["width"] = 800 }, new CallOptions { IdempotencyKey = "order-42", Timeout = TimeSpan.FromMinutes(2) }); ``` ## Retries and idempotency The client retries only what is safe to repeat: a rate limit answer (429, it waits as long as the server says), and 503 or 504 answers that are marked retryable, for calls that cannot do the work twice. By default it makes one idempotency key for each call and reuses it on every retry, so a retry never charges you twice. You can give your own key, which must be 8 to 128 characters from letters, digits and . _ : -, and you can turn retries or the automatic key off. See Error codes and rate limits. ## Errors ``` try { var result = await h2i.Images.ResizeAsync(new Params { ["images"] = "photo.jpg", ["width"] = 800 }); } catch (H2IException error) { if (error.Code == Davix.H2I.ErrorCodes.MonthlyQuotaExceeded) Console.WriteLine($"Allowance used up: {error.Hint}"); else Console.WriteLine($"{error.Status} {error.Code} {error.Hint} {error.RequestId}"); } ``` Every failure is an H2IException. The subclasses are H2IValidationException, H2IUploadException, H2IAuthenticationException, H2IPlanException, H2IQuotaException, H2IRateLimitException, H2IProcessingException, H2IServerException, H2INotFoundException, H2IConflictException, H2IAiException, H2IKeyException, H2IJobException and H2ISignedUrlException for answers of the API, H2INetworkException and H2ITimeoutException for connection problems, and H2IConfigException when the SDK is used wrongly. An exception has Code, Status, Hint, Details, RequestId, RenewalUrl, Retryable, RetryAfter and Body. ErrorCodes holds every code as a constant. Quote the request id when you contact support. The meaning of each code is in Error codes and rate limits. ## Look up fields, limits and your plan ``` h2i.Schema("images.resize"); // type, limits, default and allowed values of each field await h2i.Capabilities.RuntimeAsync(); // what the server offers await h2i.Capabilities.AccountAsync(); // your plan, limits and usage await h2i.Contract.RefreshAsync(); // use the live contract instead of the bundled one ``` The schema of a tool gives each field's type, limits, default and allowed values. The account information shows what your plan allows and what you have used. ## Reach a new endpoint If the API gets an endpoint this version does not know yet, use the generic request method. It only reaches the public /v1/ API. ``` await h2i.RequestAsync("GET", "/v1/usage"); await h2i.RequestAsync("GET", "/v1/jobs", query: new Params { ["limit"] = 10 }); ``` ## Name your app in the History Every processing call accepts an optional app parameter. Its text is shown under each result in your History, for example My shop importer. ## Safe by design - The API key is sent only in a header. It is never put in an address or a body, never printed (showing the client does not reveal it), and never sent to a redirect or to a download address. - The client refuses plain http for any host except your own computer, and refuses an address with a password in it. - Redirects are not followed. Other clients: Node SDK, Python SDK, PHP SDK, Go SDK, Java SDK, Ruby SDK. Checked against the .NET SDK source code and API contract 3.0.0. ### Use the Ruby SDK https://h2i.davixlabs.io/docs/article/use-the-ruby-sdk/ Available now. The Ruby SDK is published on RubyGems and works with the install command below. See the gem page on RubyGems. If you prefer not to use it, you can also call the REST API from Ruby with any HTTP client (Call a tool over REST). The Ruby SDK is the official Ruby client. Its methods, field names, allowed values and error codes are generated from the same API contract as the server, so they match the API. ## Requirements and install Ruby 3.0 or newer. It uses only the standard library. ``` gem install davixlabs-h2i ``` ## Create a client Create an API key first (Create and rotate API keys) and keep it in an environment variable or a secrets manager, never in the code. ``` require 'davix_h2i' h2i = DavixH2I::Client.new(api_key: ENV['DAVIX_H2I_API_KEY']) ``` The address defaults to https://app.h2i.davixlabs.io. ## Run a tool ``` result = h2i.images.resize( images: 'photo.jpg', width: 800, resizeMode: DavixH2I::Enums::ResizeFit::COVER ) puts result.status, result.request_id ``` Tools are grouped like the API: h2i.images.resize(...), h2i.pdfs.merge(...), h2i.ai.documents.summarize(...). You pass the parameters as keyword arguments or a hash, using the names of the API reference. Ruby keeps inspect for itself, so the API method inspect is called inspect_file (for images and for PDFs). Find every tool and its fields in the tool list; each tool page has an API reference. ## The result What | Meaning result.data | The answer: parsed JSON, text or bytes result.status, result.request_id | HTTP status and the id to quote to support result.files | Every result file in the answer, each with a signed url result.accepted?, result.job_id | True when the server accepted a background job (HTTP 202), and its id result.attempts, result.idempotency_key | How many tries it took and the key used ## Send files and download results A file parameter accepts a path string, DavixH2I::FileInput.new(data: bytes, filename: 'a.png'), an open file, or a hash such as { path: 'a.png' }. A path is read from disk only for fields the API defines as files. Results are files with a signed address. Download them with the client; the API key is not sent with the download, and only addresses of your Davix H2I host are accepted. ``` h2i.download(result.files.first, dest: 'photo-800.jpg') # saves the file data = h2i.download(result.files.first) # or returns the bytes ``` ## Options ### Client options Option | What it does base_url | Another Davix H2I address. It must be https (http is allowed only for localhost) timeout | Seconds for one attempt, 60 by default max_retries, max_retry_delay | 2 retries and a longest wait of 30 seconds by default auto_idempotency_key | On by default, see Retries validate | Check parameters before sending, off by default auth_scheme | 'x-api-key' (default) or 'bearer' user_agent_suffix | Text added to the User-Agent, to name your program ### Options of one call To give options for one call, pass the parameters as a hash and the options after it: idempotency_key, headers, timeout, max_retries, retry (false turns retries off), validate and strict. ``` h2i.images.resize({ images: 'photo.jpg', width: 800 }, idempotency_key: 'order-42', timeout: 120) ``` ## Retries and idempotency The client retries only what is safe to repeat: a rate limit answer (429, it waits as long as the server says), and 503 or 504 answers that are marked retryable, for calls that cannot do the work twice. By default it makes one idempotency key for each call and reuses it on every retry, so a retry never charges you twice. You can give your own key, which must be 8 to 128 characters from letters, digits and . _ : -, and you can turn retries or the automatic key off. See Error codes and rate limits. ## Errors ``` begin result = h2i.images.resize(images: 'photo.jpg', width: 800) rescue DavixH2I::Error => e if e.code == DavixH2I::ErrorCodes::MONTHLY_QUOTA_EXCEEDED warn "Allowance used up: #{e.hint}" else warn [e.status, e.code, e.hint, e.request_id].inspect end end ``` Every failure is a DavixH2I::Error. The subclasses are ValidationError, UploadError, AuthenticationError, PlanError, QuotaError, RateLimitError, ProcessingError, ServerError, NotFoundError, ConflictError, AiError, KeyManagementError, JobError and SignedUrlError for answers of the API, NetworkError and TimeoutError for connection problems, and ConfigError when the SDK is used wrongly. An error has code, status, hint, details, request_id, renewal_url, retryable, retry_after and body. DavixH2I::ErrorCodes holds every code as a constant. Quote the request id when you contact support. The meaning of each code is in Error codes and rate limits. ## Look up fields, limits and your plan ``` h2i.schema('images.resize') # type, limits, default and allowed values of each field h2i.capabilities.runtime # what the server offers h2i.capabilities.account # your plan, limits and usage h2i.contract.refresh # use the live contract instead of the bundled one ``` The schema of a tool gives each field's type, limits, default and allowed values. The account information shows what your plan allows and what you have used. ## Reach a new endpoint If the API gets an endpoint this version does not know yet, use the generic request method. It only reaches the public /v1/ API. ``` h2i.request('GET', '/v1/usage') h2i.request('GET', '/v1/jobs', query: { limit: 10 }) ``` ## Name your app in the History Every processing call accepts an optional app parameter. Its text is shown under each result in your History, for example My shop importer. ## Safe by design - The API key is sent only in a header. It is never put in an address or a body, never printed (showing the client does not reveal it), and never sent to a redirect or to a download address. - The client refuses plain http for any host except your own computer, and refuses an address with a password in it. - Redirects are not followed. Other clients: Node SDK, Python SDK, PHP SDK, Go SDK, Java SDK, .NET SDK. Checked against the Ruby SDK source code and API contract 3.0.0. ### Choose your SDK https://h2i.davixlabs.io/docs/article/choose-your-sdk/ Davix H2I has official clients for seven languages and a command line. They are all generated from the same API contract as the server, so their methods, field names, allowed values and error codes match the API. Every one is published on its own package registry. ## Pick your language Language | Install | Needs | Where to find it Node.js | npm install @davixlabs/h2i-sdk | Node 18 or newer | npm Python | pip install davixlabs-h2i | Python 3.8 or newer | PyPI PHP | composer require davixlabs/h2i-sdk | PHP 7.4 or newer | Packagist Go | go get github.com/Davixlabs/davix-h2i-sdk-go | Go 1.21 or newer | pkg.go.dev Java | io.davixlabs:h2i-sdk (Maven) | Java 11 or newer | Maven Central .NET | dotnet add package Davixlabs.H2I | .NET 8 or newer | NuGet Ruby | gem install davixlabs-h2i | Ruby 3.0 or newer | RubyGems Command line | npx -y @davixlabs/h2i-mcp setup | Node 18 or newer | npm ## How to choose - Use the language your program is already written in. They all do the same things: run a tool, send files, download results, handle errors and retries. - No SDK for your language? Call the REST API with any HTTP client: Call a tool over REST. The OpenAPI contract can generate a client for most languages. - Just want to run a few files from a terminal? Use the command line. - Want an AI assistant to do the work? Connect it over MCP: Connect an AI assistant over MCP. ## What every client does the same way - You sign in with an API key (Create and rotate API keys). The key is sent only in a header, never in an address or a body. - A failed call raises a typed error with a code, a hint, a status and a request ID. Quote the request ID when you write to support. - Rate-limit answers and temporary server errors are retried safely, and a retry never charges you twice. - Credits and limits are the ones of your plan, the same as in the Studio. Other ways in: the OpenAPI contract, the MCP server and the developer page. ## MCP ### Connect an AI assistant over MCP https://h2i.davixlabs.io/docs/article/connect-an-ai-assistant-over-mcp/ Davix H2I speaks the Model Context Protocol (MCP). That lets AI apps such as Claude, ChatGPT, Claude Code and Codex use the same tools you use in Studio, on your behalf and with your plan. ## What you need - A Davix H2I plan that includes AI agent access (MCP). - The server address: https://app.h2i.davixlabs.io/mcp. - To be signed in to Davix H2I when the app asks you to approve access. You approve in the Dashboard, and you choose which permissions to give. ## Fastest way for files on your computer ``` npx -y @davixlabs/h2i-mcp setup ``` This finds the AI apps on your computer (Claude Code, Claude Desktop, Codex, OpenCode, Cursor, VS Code, Gemini CLI), adds Davix H2I to their settings and signs you in. It keeps a backup of each settings file it changes. Restart the app afterwards. The helper reads your files from disk and sends them untouched, so the AI never sees the file's bytes. See the command line reference. ## Connect an app by address App | How Claude | Customize, then Connectors, then Add custom connector. Paste the address. Choose to sign in now. ChatGPT | Add a custom connector or app with the address and OAuth. Availability depends on your ChatGPT plan. Claude Code | claude mcp add --transport http davix-h2i https://app.h2i.davixlabs.io/mcp, then /mcp to sign in Codex | Add [mcp_servers.davix-h2i] with the url to ~/.codex/config.toml, then codex mcp login davix-h2i The Dashboard page Connect shows exact steps for each app. Vendors change their screens, so if a step looks different, follow the app's own help for adding a remote MCP server. ## How the sign-in works The app discovers the sign-in, registers itself and sends your browser to the Davix H2I approval page. You see who is asking and a checklist of permissions, and choose Allow. Access tokens are short-lived (one hour by default) and renew by themselves. You never give the app your API key. ## Files - On your computer: use the helper above, or let the agent run the upload command Davix H2I gives it. - A public web address: pass it as the input. - Chat attachments: whether a file attached in the chat reaches Davix H2I depends on the AI app. If it does not, add the file in Studio or give a public address. - Already in your account: the agent can list and use your earlier results. Results come back as download links. Long jobs return a job id that the agent polls. ## Documentation for your assistant The full server also gives your assistant the documentation: it can search and read every guide, with no extra permission. There is a documentation-only server too, which needs no sign-in. See Use the documentation with your AI assistant. ## Control and disconnect In the Dashboard, the Connect page lists every connected app. You can change its permissions or disconnect it at any time, and the next call is refused. Next: MCP scopes and permissions. Checked against the app's MCP documentation (client steps last verified by us on 18 October 2026; vendors may have changed their screens). ### MCP scopes and permissions https://h2i.davixlabs.io/docs/article/mcp-scopes-and-permissions/ When you connect an AI app you decide what it may do. This page explains the permissions (scopes) and the rules that always apply. ## The permissions Permission | Lets the app operations:images, operations:pdf, operations:render, operations:documents, operations:data | Run the tools of that family operations:ai | Run the AI tools (off by default on the approval screen) files:read, files:write | Read your earlier results, and upload files jobs | Check and collect background jobs templates:read, templates:write | Read, or also change, your saved templates presets:read, presets:write | Read, or also change, your saved presets AI and the two write permissions for saved items are off by default on the approval screen. A tool the app has no permission for is not even listed to it. ## Rules that always apply - Your plan is the limit. Every tool call runs as you, with your current plan. Allowance, rate limits, file sizes and included tools are the same as in the API. If your plan stops including MCP, connections stop on their next call and resume if you move to a plan that includes it. - Only your data. An app can only see your own files, jobs and saved items. - Nothing without approval. You approve each app in the Dashboard. The app's name and the permissions are shown first. - Revoke any time. Disconnecting an app revokes its tokens and cancels its queued jobs. A job already running finishes, and its files stay in your own History. ## Personal access tokens For scripts and agents that cannot open a browser, create a personal access token on the Dashboard Connect page. A token works only on the MCP address, only for the permissions you chose, and you can remove it at any time. It is not an API key. ## Good to know - Text that comes out of a file (OCR, extraction, AI) is the file's own content. Do not let an agent treat it as instructions. - Download links in results are signed links that expire. Back to Connect an AI assistant over MCP. Checked against the app's MCP security documentation. ### Fix: an AI app cannot connect over MCP https://h2i.davixlabs.io/docs/article/fix-an-ai-app-cannot-connect-over-mcp/ When an AI app cannot connect to Davix H2I, or a connected app cannot do what you expect, work through this list from the top. How to connect is explained in Connect an AI assistant over MCP. ## 1. Check the address The server address is https://app.h2i.davixlabs.io/mcp. It must be exactly this, with https. Paste it into the app's "add a remote MCP server" or "custom connector" screen. Vendors change their screens, so if a step looks different, follow the app's own help. ## 2. Finish the sign-in The app sends your browser to the Davix H2I approval page. You need to be signed in to Davix H2I in that browser, see who is asking and the permissions, and choose Allow. If you closed the page or chose to cancel, start the connection again. You never give the app your API key. ## 3. A tool is missing from the app An app only sees the tools it has permission for. Open the Connect page in your Dashboard, open the app and check its permissions. The AI tools and the two write permissions for saved items are off by default on the approval screen: tick them, or disconnect and connect again. See MCP scopes and permissions. ## 4. Calls are refused - The app may have been disconnected: if so its next call is refused. Connect it again. - Your plan sets the limit: allowance, rate limits and file sizes are the same as in the API. If your plan stops including MCP, connections stop on their next call and resume when you move to a plan that includes it. - Access tokens are short-lived and renew by themselves. If the app keeps asking you to sign in again, disconnect it in the Dashboard and connect it once more. ## 5. A file does not arrive - For files on your computer, use the helper: npx -y @davixlabs/h2i-mcp setup, then restart the AI app. - Whether a file attached in a chat reaches Davix H2I depends on the AI app. If it does not, add the file in the Studio or give a public address. - A file already in your account can be used by its earlier result. ## 6. Still stuck Write to us from the Help Center and say which AI app you use, what you did and what you saw. See Get help and contact support. Never send a token or an API key. ### Use the documentation with your AI assistant https://h2i.davixlabs.io/docs/article/use-the-documentation-with-your-ai-assistant/ Your AI assistant can read this documentation itself. Instead of guessing how the API, the plans or the SDKs work, it searches the official guides and answers from them. This is the fastest way to get an integration right: connect it once, then ask in plain words. ## Two ways to connect Server | Address | Sign-in | What it can do Documentation only | https://app.h2i.davixlabs.io/mcp/docs | None | Search and read the documentation. Nothing else. The full server | https://app.h2i.davixlabs.io/mcp | Your account | Everything above, and run the tools on your files. See Connect an AI assistant over MCP. If you already connected the full server, the documentation tools are already there: they need no extra permission and use no credits. ## Connect the documentation server App | How Claude | Customize, then Connectors, then Add custom connector. Paste the address. No sign-in is needed. Claude Code | claude mcp add --transport http davix-h2i-docs https://app.h2i.davixlabs.io/mcp/docs Codex | Add [mcp_servers.davix-h2i-docs] with the url to ~/.codex/config.toml Other apps | Follow the app's own help for adding a remote MCP server, and use the address above. ## What your assistant gets Tool | What it does search_docs | Finds the guides that answer a question, with a short passage, the headings and the address of each. get_doc | Reads one guide as text. A long guide comes in parts, or you can ask for just one heading. list_docs | Lists every guide by section, with a one-line summary. Every guide is also a resource of the form docs://guides/, for apps that browse resources instead of calling tools. ## Things to ask - "Using the Davix H2I docs, write a Python script that resizes every photo in a folder to 800 pixels wide." - "What happens when I hit the rate limit, and how should my code retry?" - "How long are my files kept on the Free plan?" - "Which SDK should I use for a Go service, and how do I install it?" ## Good to know - It is the same text as this website, updated with every release, so the answers are never older than the documentation. - The documentation server holds public text only. It has no access to any account, file or key. - For the exact fields of one tool, an assistant connected to the full server can call describe_operation, which reads the live API contract. - Prefer plain files? The same documentation is available as one index, llms.txt, and as one file with every guide, llms-full.txt. Next: MCP scopes and permissions, and Fix: an AI app cannot connect over MCP. ## Integrations ### WordPress plugin https://h2i.davixlabs.io/docs/article/wordpress-plugin/ The Davix H2I plugin brings your Davix H2I account into WordPress. From the Media Library and from your posts you can optimize and edit images, make social cards, write alt text and search texts with AI, work with PDFs, and keep a history of everything it did. The work is done by Davix H2I, so your plan, allowance and limits apply. ## Requirements - WordPress 6.0 or newer and PHP 7.4 or newer. - A Davix H2I account and an API key (Create and rotate API keys). ## Connect your site - Install and activate the plugin. A Davix H2I item appears in the admin menu, and a setup wizard opens the first time. - Open Davix H2I > Account and paste your API key from the Dashboard. - Test it, then choose Save connection. The plugin then shows your plan. Until a key is saved, a notice reminds administrators on the Plugins, Media and Dashboard screens. ### Where the key is kept The key is stored encrypted in your database and is never shown again; only its last four characters are. If you prefer, define it in wp-config.php instead: ``` define( 'DAVIX_H2I_API_KEY', 'your key' ); ``` ## The screens Screen | What it is for Dashboard | Your plan, your library and what is happening Account | Connection (your key) and Plan (what your plan allows) Automatic | Rules that run by themselves. See Automatic rules Activity | Background jobs, and Review for results that wait for your approval AI | AI settings and status Library | Your presets and templates (the same ones as in Studio and the Dashboard) History | Everything the plugin did, with the option to put an original back Settings | Performance, Privacy and data, and Import / Export of the plugin settings (your key is never exported) Help | Help and debug logs ## Work on files in the Media Library Tick one or more files in the Media Library, or in a list of posts, and open the Davix H2I sidebar. It shows what your plan allows for that many items. The Image tab has steps you can combine: optimize, convert, resize, crop, transform, effects, padding, frame, background and watermark. There are also tabs to write texts with AI, to use AI actions, to make a QR code and to render. Your original is kept for the time you set under Settings > Privacy and data, and History can put it back. After that time the original is deleted. ## Faster images with modern formats The plugin can make WebP and AVIF copies of your images. The originals stay as they are. On your pages an image is shown with the modern copy for browsers that can show it, and every other visitor still gets the original from the same page. Because nothing depends on the visitor's browser on the server, page caches and CDNs keep working. ## Widgets for your pages You can make a QR code, a chart, an AI image or a PDF button once, by pressing Generate in the block editor, Bricks or Elementor, or in Studio. Visitors only see the stored file. Each widget also has a shortcode: [davix_qr image="123"], [davix_chart image="123"], [davix_ai_image image="123"] and [davix_pdf]. Any setting of a widget can be given as an attribute, for example align="left". ## Plan limits An action your plan does not include is shown as unavailable. Your allowance is shared with Studio, the API and everything else on your account, and you can see it in the plugin and in the Dashboard. See Understand usage and limits. ## Who can use it By default anyone who can upload files can use the plugin. You can change this under Settings > Privacy and data. People without the manage capability only see their own actions. ## Notifications The plugin can tell you by email, by a signed webhook, or both, when your plan is nearly used up, background work was paused, a bulk run finished, or a job failed. Each kind is limited so a repeating problem never floods you. The webhook is a JSON POST with the header X-Davix-Signature, which holds sha256= and the HMAC-SHA256 of the body made with your signing secret. ## Commands for WP-CLI ``` wp davix verify # test the key and show the plan wp davix limits [--refresh] # what your plan allows wp davix queue [status|run|retry|resume|clear] wp davix history [--limit=20] wp davix optimize 12,15 # or "all" wp davix alt-text 12,15 # or "all"; --queue to review the suggestions later wp davix bulk optimize --dry-run # actions: optimize, modern, alt, gps, pdf ``` Next: Automatic rules. Prefer workflows? See the n8n node. Checked against the Davix H2I plugin source code. ### WordPress plugin: automatic rules https://h2i.davixlabs.io/docs/article/wordpress-plugin-automatic-rules/ Automatic rules make the Davix H2I plugin do a job for you every time something happens on your site, for example every new image gets compressed and described. You find them under Davix H2I > Automatic. ## How a rule works The Automatic screen has one New rule button and one table of every rule, which you can filter. A rule always starts with what starts it. The side panel then lists only the actions that make sense for that start. Starts when | What you can do An image is uploaded | Make it smaller, change its format or size, add a watermark, remove the background, write its alt text and more. The settings are the same as in the Media Library sidebar. A PDF is uploaded | Compress it, stamp it, protect it, make pictures of its pages, write a summary and more. Another file is uploaded | Work on Word, Excel and PowerPoint documents, text and CSV files, and the files other actions can use. A post or a page is published or updated | Work on the post itself, or on the pictures, PDFs and other files it uses. A product is published or updated (only when WooCommerce is active) | Work on the product, its pictures, gallery, PDFs and other files. A template is published or updated | The same, for Elementor, Bricks and block-theme templates. ## AI rules for new files - Alt text, caption, tags and title for new images. - Search texts: a search title, description and keywords for new images and PDFs. - Summary of every new PDF or text file. - Safety check that looks for unsafe content in new images. ## Rules that write the text of a post When a post, page, product or template is published or updated, a rule can write its title, excerpt, body text or search engine texts. The text can be written when it is empty, corrected, rewritten, shortened, lengthened, summarized or translated. A text is only changed if it is still what the rule saw, and a text a rule already did is not done again, so your own later edits are not overwritten. If you use Yoast, Rank Math or Davix SEO, the search title, description and keywords are put into that plugin. ## Good to know - Work that takes time runs in the background, driven by your site's scheduled tasks (WordPress cron). You can follow it under Activity > Background jobs. Results that wait for your approval are under Activity > Review. - Every rule uses your allowance and is limited by your plan. If an action is not in your plan it is shown as unavailable. - Before a file or a text is changed its original is kept, and History can put it back for as long as you keep originals (Settings > Privacy and data). Back to Davix H2I plugin for WordPress. Checked against the Davix H2I plugin source code. ### n8n node https://h2i.davixlabs.io/docs/article/n8n-node/ The Davix H2I node for n8n lets a workflow use the same tools as Studio and the API. One node covers images, PDFs, documents, data, render and AI actions, and also your templates, presets, files and jobs. ## Install The node is the community package @davixlabs/n8n-nodes-davix-h2i on npm. In n8n open Settings > Community nodes, choose to install, and enter that package name. ## Add your credentials - Create an API key in the Dashboard (Create and rotate API keys). - In n8n create a credential of the type Davix H2I API and paste the key. - Press Test. n8n asks Davix H2I whether the key is valid. n8n stores the key encrypted and sends it only in the X-Api-Key header, never in an address or a body. ## What the node can do Resource | What it covers Images, Render, Data, PDFs, Documents | The tools of those families AI | Content writing, documents, enhancement, extraction, generation, vision, OCR and general AI, chosen with a second dropdown Templates, Presets | Your saved templates and presets File | List, get, download and delete your stored result files, and fetch a file from a public web address into your account Job | List jobs, get one, wait for one, or cancel one Certificate | Signing certificates used by the PDF signing tool Usage | Read your usage, a breakdown and recent calls, so a workflow can warn you before your allowance runs out The settings of each action come from the API contract, so they match the API reference. The most important settings are on the main screen; the rest are under Options, the same as the simple and advanced controls in Studio. ## Files - Input: name the binary field that holds the file (usually data, when it comes straight from the node before, such as HTTP Request or Google Drive). Actions that take several files accept several binary fields separated by commas. Or give a web address instead. - Output: the node can download the files the action made and return them as binary data (data, then data_1 and so on), or return only the links. ## Background jobs For actions that run in the background, use the Job resource to wait for the job (with a maximum time you choose) and collect its result files. Only a job that is still waiting to start can be cancelled by the API. ## Limits and errors Your plan and allowance apply as everywhere else. When a call fails, the node shows the error with its hint; see Error codes and rate limits. Checked against the n8n node source code and the npm registry. ## Assistant ### Talk to the assistant https://h2i.davixlabs.io/docs/article/talk-to-the-assistant/ The Assistant is a chat in Studio. You attach files and say what you want in your own words, and an AI agent uses Davix H2I's tools, step by step, to do it. Open the Assistant tab in Studio. ## Start a chat - Choose New chat in the menu. - Attach one or more files with the + button. - Describe the job, for example "make these photos 1200 px wide and convert them to WebP". - Watch the steps. Results appear as new versions in the chat. Your original file is never changed. ## Be precise - Type @ to tag a file that is already in the chat (an upload or any earlier result). The request then applies only to the tagged files. - Type / to pick a tool by name. The Assistant then uses exactly that tool. - Use Edit this on a result card to continue from that result. - Click a result's picture to open it in the full-screen viewer. ## Quality and cost The + menu has Quality and cost: Economy, Balanced or Precision, and a "double-check every result" switch that makes the Assistant inspect each result and try again with other settings if needed. Your plan decides the highest quality you can pick. ## Voice The microphone button records your voice and turns it into text in the message box. A recording with no sound is turned away without charge. ## What it costs - A message that is not a job (small talk, an empty message) gets a short reply and is not counted as a run. - Your plan limits how many runs you get per period, steps per run, messages per chat, the size and number of files per message, and voice use. When you reach one, the chat tells you. - The tools the Assistant runs use your normal allowance, at the normal cost per call. Results are also saved in History, labelled "H2I Assistant". ## If it asks a question When it needs a decision, a sheet slides up with options and an "Other" field. ## Limits to know - You must be signed in. Visitors on the demo cannot use the Assistant. - It answers in the language of your message. - Delete old chats you no longer need: the account can keep only so many chats and files. Related: Run several tools at once, and the Assistant page. Checked against the app's Assistant documentation. ## Security and privacy ### How long we keep your files https://h2i.davixlabs.io/docs/article/how-long-we-keep-your-files/ We keep your files only as long as they are useful to you. This page explains what is kept, for how long, and how to remove things sooner. ## Your results Every result you make is saved in your History so you can download it again. It is kept for the history retention of your plan, and then removed automatically, together with its file. The retention period is part of each plan: you can see it on your plan's page in the Dashboard (Subscription), and plans are compared on the Pricing page. ## Remove something sooner - Delete a result from History: the entry and its file are removed right away. Through the API this is DELETE /v1/files/{id}. - Delete an Assistant chat: its files go with it. - Delete your whole account: see below. ## Files you send to tools Files you upload are used to run the tool you chose, and you can only see your own files and results. Tools that use AI may send the content they need to the AI provider that runs the model. The tools of the other families process files on our own server. ## Other data - Request log (time, status, tool, key, size, reason for a failure) is kept for a limited time and shown in the Dashboard under Logs. - Temporary files made while a tool runs, and files staged for AI apps, are removed automatically once they are used or expired. - Download links are signed and expire. All of this cleaning runs automatically on a schedule, so nothing stays longer than its retention period. ## Download or delete your data Under Dashboard > Account you can ask to download your data or delete your account. We email you a link to confirm it is you. Deleting removes your membership, API keys, presets, templates, certificates, files, jobs, history, usage and Assistant chats, and cannot be undone. Records of payments already made are kept because the website must keep them for accounting. Read more in our privacy policy and security page. Checked against the Dashboard and API contract 3.0.0. Retention periods are set per plan and can change, so this page does not list numbers. ### Keep your account and keys safe https://h2i.davixlabs.io/docs/article/keep-your-account-and-keys-safe/ An API key lets anyone who has it use your plan. This page lists what protects your account and what you should do yourself. ## What Davix H2I does - A new key's secret is shown one time. Copy it then; it cannot be shown again. - Keys are accepted only in a request header, never in an address or a request body (Authenticate API requests). - Security notices about your API keys, and emails about your account such as a new key, are always sent and cannot be turned off. - Every AI app you connect over MCP is approved by you, limited to the permissions you chose, and can be disconnected at any time (MCP scopes and permissions). ## What you should do - Keep keys out of code that others can read. Use environment variables or a secrets manager, never a public repository or browser code. - Use one key per app and give each a clear name, so you know which to stop if one leaks. You can also give a key its own limit. - Rotate a key when someone who knew it leaves: the new secret works, the old one stops at once. Revoke stops a key but keeps it in your list. Delete removes it from your list and your usage by key; what it already did stays in your total usage. See Create and rotate API keys. - Check Account activity now and then (Dashboard > Account > Account activity): who signed in, from where, and what changed. - Check Logs (Dashboard > Logs) if usage looks higher than you expect. It shows every request with time, status and the key used. - Never send a key to support. Send the request id instead. ## If a key leaked - Rotate or revoke it in Dashboard > API Keys. Rotating gives a new secret and the old one stops working at once. - Update the new key everywhere the old one was used. - Look at Logs and Usage for requests you do not recognise. The same care applies to the key you paste into the WordPress plugin or the n8n node; both store it encrypted. Checked against the Dashboard and API source code.