Extract With Your Schema
About this tool
How to use it
- Choose this tool.
- Add your document or documents with Upload or drag and drop, or paste the text.
- Write the schema, the list of fields you want.
- Choose whether the result must follow your schema strictly.
- Press Generate, then copy or download the result.
What you get back
Try Extract With Your Schema in the Studio
Use it from your code
cURL
curl -X POST "https://app.h2i.davixlabs.io/v1/ai/extraction/custom" \
-H "X-Api-Key: $DAVIX_H2I_API_KEY" \
-F 'on_unsupported=error' \
-F 'quality=standard' \
-F 'json_schema=xx'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.extraction.custom({
"on_unsupported": "error",
"quality": "standard",
"json_schema": "xx"
});
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()->extraction()->custom([
'on_unsupported' => 'error',
'quality' => 'standard',
'json_schema' => 'xx',
]);
echo $result->requestId;