Plus plan

Analyze (Generic)

Run any of the available AI analyses by name on your files or text
POST
/v1/ai/analyze

About this tool

This is an advanced tool for running one of the AI analyses by its name, such as documents.summarize, on your files or text. You type the name of the analysis and the tool does that job. If you are not sure which one you need, use the matching ready-made tool instead. An AI does the work, so check the result.
For example, you add a report, type the name of the analysis for finding risks, and get the biggest risks listed.

How to use it

  1. Choose this tool.
  2. Add your files with Upload or drag and drop, or paste your text.
  3. Type the name of the analysis you want to run.
  4. Press Generate.
  5. Read, copy or download the result.

What you get back

You get the result of the analysis you named, on screen. You can copy or download it.
TEST IT LIVE

Try Analyze (Generic) 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/analyze
Tool ID
ai.analyze
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/analyze" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'task=example' \
  -F 'presetId=00000000-0000-4000-8000-000000000000' \
  -F 'validate_only=false'

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.analyze({
    "task": "example",
    "presetId": "00000000-0000-4000-8000-000000000000",
    "validate_only": false
  });
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()->analyze([
    'task' => 'example',
    'presetId' => '00000000-0000-4000-8000-000000000000',
    'validate_only' => false,
]);
echo $result->requestId;
FAQ

Frequently asked questions

Run any registered analysis task by id through the universal request. Readiness: unbenchmarked (see GET /v1/ai/capabilities/core.analyze).

Classification: hybrid. Deterministic stages: task registry dispatch.

Analyze (Generic) works from text and settings, so no file is needed. The required inputs are task.

Not on the Free plan: Analyze (Generic) 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/analyze 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.