Plus plan

Data from a Request

Describe the table you want and get it from your data files
POST
/v1/ai/documents/transform

About this tool

You describe in your own words the table you want, and the tool builds it from your data files. The AI writes one short SQL query (a database instruction that picks and combines rows) and the tool runs it on your files. It only reads your data and never changes it. You choose the table format of the result.
For example, you add a sales sheet and ask for only the orders from 2026 with a new column for the total including 20 percent tax.

How to use it

  1. Choose this tool.
  2. Add your data files with Upload or drag and drop (up to 3 files, such as CSV or Excel).
  3. Describe the table you want in the instructions box.
  4. Choose the table format of the result, such as CSV, Excel or JSON.
  5. Press Generate, check the query shown, and download the result.

What you get back

You get a new table file in the format you chose, and you can see the query that was used. You can download it.
TEST IT LIVE

Try Data from a Request 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/documents/transform
Tool ID
ai.documents.transform
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/documents/transform" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'files=@document.pdf' \
  -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.documents.transform({
    "files": 'document.pdf',
    "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()->documents()->transform([
    'files' => 'document.pdf',
    'on_unsupported' => 'error',
    'instructions' => 'example',
    'quality' => 'standard',
]);
echo $result->requestId;
FAQ

Frequently asked questions

Describe the table you want in words; the model writes one SQL query, code runs it on your files and gives the result as CSV, TSV, JSON or XLSX. Readiness: unbenchmarked (see GET /v1/ai/capabilities/documents.transform).

Classification: hybrid. Deterministic stages: table files read into real tables, SQL run on the data (SELECT only), result written by the data codecs.

Data from a Request works from text and settings, so no file is needed. The required inputs are instructions.

Not on the Free plan: Data from a Request 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/documents/transform 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.