Plus plan

Document writer

Write a letter, report or other document from your notes
POST
/v1/ai/content/document

About this tool

AI writes a full document from your instructions and any material you give it. You can choose the kind (letter, report, article, proposal, memo, essay, press release or policy), the tone and the length. Spots where facts are missing are marked so you can fill them in. The text is written by AI, so read it before you use it.
For example, you type a few points about your return rules and get a one-page guide for customers.

How to use it

  1. Choose this tool.
  2. Type what you want written, and add files with source material if you have them (up to 5).
  3. Choose the kind of document, the tone and about how many words.
  4. Press Generate.
  5. Copy the text or download it.

What you get back

You get the finished document as text, with a word count and a list of places to fill in. You can copy or download it.
TEST IT LIVE

Try Document writer in the Studio

One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Open in the Studio
Family
AI
Plan
Plus
Method
POST
Endpoint
/v1/ai/content/document
Tool ID
ai.content.document
Authentication
API key
Accepts
Text and settings
Background jobs
Yes
Usage group
Ai
For developers

Use it from your code

cURL

curl -X POST "https://app.h2i.davixlabs.io/v1/ai/content/document" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'on_unsupported=error' \
  -F 'instructions=example' \
  -F 'quality=standard'

Node.js

const { DavixH2I } = require('@davixlabs/h2i-sdk');

const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.ai.content.document({
    "on_unsupported": "error",
    "instructions": "example",
    "quality": "standard"
  });
console.log(result.data, result.requestId);

PHP

<?php
require 'vendor/autoload.php';

$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->ai()->content()->document([
    'on_unsupported' => 'error',
    'instructions' => 'example',
    'quality' => 'standard',
]);
echo $result->requestId;
FAQ

Frequently asked questions

Write a letter, report, article, proposal, memo or policy from your instructions and source material; code counts the words, assembles the text and lists the placeholders to fill in. Readiness: unbenchmarked (see GET /v1/ai/capabilities/content.document).

Classification: hybrid. Deterministic stages: file type detection from content, native PDF text extraction / OCR for documents, image normalisation (Sharp).

Document writer works from text and settings, so no file is needed. The required inputs are instructions.

Not on the Free plan: Document writer is available on the Plus plan and above. Free accounts can upgrade any time to use it. Each run uses credits from your monthly allowance.

Send a POST request to /v1/ai/content/document with your API key in the X-Api-Key header. Official SDKs for Node.js, Python, PHP, Go, Java, .NET and Ruby do the same for you, and the code box on this page shows ready-to-copy examples. For large work it can also run as a background job, so your request returns straight away.