About this tool
This is a plain text chat with an AI. You write a message and it answers. It cannot open your files or look things up on the internet, so paste any text you want it to use. You can choose which AI model answers. The AI can make mistakes, so check important answers.
For example, you paste a paragraph from a contract and ask the AI to explain it in simple words.
How to use it
- Choose this tool.
- Type your message in the chat box, and paste any text you want it to use.
- Optionally choose which AI model should answer.
- Press Generate.
- Read the answer, or copy it.
What you get back
You get the AI's answer as text on screen. You can copy it.
TEST IT LIVE
Try AI Chat in the Studio
One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Family
AI
Plan
Plus
Method
POST
Endpoint
/v1/ai/chat
Tool ID
ai.chat
Authentication
API key
Accepts
Text and settings
Background jobs
No
Usage group
Ai
For developers
Use it from your code
cURL
curl -X POST "https://app.h2i.davixlabs.io/v1/ai/chat" \
-H "X-Api-Key: $DAVIX_H2I_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"auto","on_unsupported":"error","messages":[{"role":"system","content":"example"}]}'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.chat({
"model": "auto",
"on_unsupported": "error",
"messages": [
{
"role": "system",
"content": "example"
}
]
});
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()->chat([
'model' => 'auto',
'on_unsupported' => 'error',
'messages' => [[
'role' => 'system',
'content' => 'example',
]],
]);
echo $result->requestId;