curl --request POST \
--url https://api.effectiveai.app/api/v2/insurance/form-comparisons \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"variants": [
{
"key": "verus",
"label": "<string>",
"documents": [
"01a150b0-b6a4-774f-a0e0-ad385dbc5028"
],
"context": {
"product": {
"id": "product_00001AB",
"state": "CA"
},
"documents": [
"01a150b0-b6a4-774f-a0e0-ad385dbc5028"
],
"facts": "<string>"
}
}
],
"sharedContext": {
"product": {
"id": "product_00001AB",
"state": "CA"
},
"documents": [
"01a150b0-b6a4-774f-a0e0-ad385dbc5028"
],
"facts": "<string>"
},
"knowledge": [
"01a150b0-b6a4-774f-a0e0-ad385dbc5028"
],
"focus": [
"<string>"
],
"scenarios": [
{
"id": "water-backup",
"facts": "<string>",
"question": "<string>",
"expectations": [
{
"id": "<string>",
"assertion": "<string>",
"variant": "<string>"
}
]
}
],
"reviewMaterial": [
"01a150b0-b6a4-774f-a0e0-ad385dbc5028"
]
}
'import requests
url = "https://api.effectiveai.app/api/v2/insurance/form-comparisons"
payload = {
"variants": [
{
"key": "verus",
"label": "<string>",
"documents": ["01a150b0-b6a4-774f-a0e0-ad385dbc5028"],
"context": {
"product": {
"id": "product_00001AB",
"state": "CA"
},
"documents": ["01a150b0-b6a4-774f-a0e0-ad385dbc5028"],
"facts": "<string>"
}
}
],
"sharedContext": {
"product": {
"id": "product_00001AB",
"state": "CA"
},
"documents": ["01a150b0-b6a4-774f-a0e0-ad385dbc5028"],
"facts": "<string>"
},
"knowledge": ["01a150b0-b6a4-774f-a0e0-ad385dbc5028"],
"focus": ["<string>"],
"scenarios": [
{
"id": "water-backup",
"facts": "<string>",
"question": "<string>",
"expectations": [
{
"id": "<string>",
"assertion": "<string>",
"variant": "<string>"
}
]
}
],
"reviewMaterial": ["01a150b0-b6a4-774f-a0e0-ad385dbc5028"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
variants: [
{
key: 'verus',
label: '<string>',
documents: ['01a150b0-b6a4-774f-a0e0-ad385dbc5028'],
context: {
product: {id: 'product_00001AB', state: 'CA'},
documents: ['01a150b0-b6a4-774f-a0e0-ad385dbc5028'],
facts: '<string>'
}
}
],
sharedContext: {
product: {id: 'product_00001AB', state: 'CA'},
documents: ['01a150b0-b6a4-774f-a0e0-ad385dbc5028'],
facts: '<string>'
},
knowledge: ['01a150b0-b6a4-774f-a0e0-ad385dbc5028'],
focus: ['<string>'],
scenarios: [
{
id: 'water-backup',
facts: '<string>',
question: '<string>',
expectations: [{id: '<string>', assertion: '<string>', variant: '<string>'}]
}
],
reviewMaterial: ['01a150b0-b6a4-774f-a0e0-ad385dbc5028']
})
};
fetch('https://api.effectiveai.app/api/v2/insurance/form-comparisons', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.effectiveai.app/api/v2/insurance/form-comparisons",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'variants' => [
[
'key' => 'verus',
'label' => '<string>',
'documents' => [
'01a150b0-b6a4-774f-a0e0-ad385dbc5028'
],
'context' => [
'product' => [
'id' => 'product_00001AB',
'state' => 'CA'
],
'documents' => [
'01a150b0-b6a4-774f-a0e0-ad385dbc5028'
],
'facts' => '<string>'
]
]
],
'sharedContext' => [
'product' => [
'id' => 'product_00001AB',
'state' => 'CA'
],
'documents' => [
'01a150b0-b6a4-774f-a0e0-ad385dbc5028'
],
'facts' => '<string>'
],
'knowledge' => [
'01a150b0-b6a4-774f-a0e0-ad385dbc5028'
],
'focus' => [
'<string>'
],
'scenarios' => [
[
'id' => 'water-backup',
'facts' => '<string>',
'question' => '<string>',
'expectations' => [
[
'id' => '<string>',
'assertion' => '<string>',
'variant' => '<string>'
]
]
]
],
'reviewMaterial' => [
'01a150b0-b6a4-774f-a0e0-ad385dbc5028'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.effectiveai.app/api/v2/insurance/form-comparisons"
payload := strings.NewReader("{\n \"variants\": [\n {\n \"key\": \"verus\",\n \"label\": \"<string>\",\n \"documents\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ],\n \"context\": {\n \"product\": {\n \"id\": \"product_00001AB\",\n \"state\": \"CA\"\n },\n \"documents\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ],\n \"facts\": \"<string>\"\n }\n }\n ],\n \"sharedContext\": {\n \"product\": {\n \"id\": \"product_00001AB\",\n \"state\": \"CA\"\n },\n \"documents\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ],\n \"facts\": \"<string>\"\n },\n \"knowledge\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ],\n \"focus\": [\n \"<string>\"\n ],\n \"scenarios\": [\n {\n \"id\": \"water-backup\",\n \"facts\": \"<string>\",\n \"question\": \"<string>\",\n \"expectations\": [\n {\n \"id\": \"<string>\",\n \"assertion\": \"<string>\",\n \"variant\": \"<string>\"\n }\n ]\n }\n ],\n \"reviewMaterial\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.effectiveai.app/api/v2/insurance/form-comparisons")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"variants\": [\n {\n \"key\": \"verus\",\n \"label\": \"<string>\",\n \"documents\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ],\n \"context\": {\n \"product\": {\n \"id\": \"product_00001AB\",\n \"state\": \"CA\"\n },\n \"documents\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ],\n \"facts\": \"<string>\"\n }\n }\n ],\n \"sharedContext\": {\n \"product\": {\n \"id\": \"product_00001AB\",\n \"state\": \"CA\"\n },\n \"documents\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ],\n \"facts\": \"<string>\"\n },\n \"knowledge\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ],\n \"focus\": [\n \"<string>\"\n ],\n \"scenarios\": [\n {\n \"id\": \"water-backup\",\n \"facts\": \"<string>\",\n \"question\": \"<string>\",\n \"expectations\": [\n {\n \"id\": \"<string>\",\n \"assertion\": \"<string>\",\n \"variant\": \"<string>\"\n }\n ]\n }\n ],\n \"reviewMaterial\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.effectiveai.app/api/v2/insurance/form-comparisons")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"variants\": [\n {\n \"key\": \"verus\",\n \"label\": \"<string>\",\n \"documents\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ],\n \"context\": {\n \"product\": {\n \"id\": \"product_00001AB\",\n \"state\": \"CA\"\n },\n \"documents\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ],\n \"facts\": \"<string>\"\n }\n }\n ],\n \"sharedContext\": {\n \"product\": {\n \"id\": \"product_00001AB\",\n \"state\": \"CA\"\n },\n \"documents\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ],\n \"facts\": \"<string>\"\n },\n \"knowledge\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ],\n \"focus\": [\n \"<string>\"\n ],\n \"scenarios\": [\n {\n \"id\": \"water-backup\",\n \"facts\": \"<string>\",\n \"question\": \"<string>\",\n \"expectations\": [\n {\n \"id\": \"<string>\",\n \"assertion\": \"<string>\",\n \"variant\": \"<string>\"\n }\n ]\n }\n ],\n \"reviewMaterial\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"idempotencyExpiresAt": "2023-11-07T05:31:56Z",
"request": {
"variants": [
{
"key": "<string>",
"label": "<string>",
"documents": [
{
"inputId": "<string>",
"fileId": "<string>",
"label": "<string>",
"name": "<string>"
}
],
"form": {
"scope": "<string>",
"editionId": "<string>",
"formId": "<string>",
"formNumber": "<string>",
"title": "<string>",
"edition": "<string>",
"documents": [
{
"inputId": "<string>",
"fileId": "<string>",
"label": "<string>",
"name": "<string>"
}
]
},
"context": {
"facts": "<string>",
"documents": [
{
"inputId": "<string>",
"fileId": "<string>",
"label": "<string>",
"name": "<string>"
}
]
}
}
],
"sharedContext": {
"facts": "<string>",
"documents": [
{
"inputId": "<string>",
"fileId": "<string>",
"label": "<string>",
"name": "<string>"
}
]
},
"focus": [
"<string>"
],
"scenarios": [
{
"id": "<string>",
"facts": "<string>",
"question": "<string>",
"expectations": [
{
"id": "<string>",
"assertion": "<string>",
"variant": "<string>"
}
]
}
],
"knowledge": [
{
"inputId": "<string>",
"fileId": "<string>",
"label": "<string>",
"name": "<string>"
}
],
"reviewMaterial": [
{
"inputId": "<string>",
"fileId": "<string>",
"label": "<string>",
"name": "<string>"
}
]
},
"status": "queued"
}{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"idempotencyExpiresAt": "2023-11-07T05:31:56Z",
"request": {
"variants": [
{
"key": "<string>",
"label": "<string>",
"documents": [
{
"inputId": "<string>",
"fileId": "<string>",
"label": "<string>",
"name": "<string>"
}
],
"form": {
"scope": "<string>",
"editionId": "<string>",
"formId": "<string>",
"formNumber": "<string>",
"title": "<string>",
"edition": "<string>",
"documents": [
{
"inputId": "<string>",
"fileId": "<string>",
"label": "<string>",
"name": "<string>"
}
]
},
"context": {
"facts": "<string>",
"documents": [
{
"inputId": "<string>",
"fileId": "<string>",
"label": "<string>",
"name": "<string>"
}
]
}
}
],
"sharedContext": {
"facts": "<string>",
"documents": [
{
"inputId": "<string>",
"fileId": "<string>",
"label": "<string>",
"name": "<string>"
}
]
},
"focus": [
"<string>"
],
"scenarios": [
{
"id": "<string>",
"facts": "<string>",
"question": "<string>",
"expectations": [
{
"id": "<string>",
"assertion": "<string>",
"variant": "<string>"
}
]
}
],
"knowledge": [
{
"inputId": "<string>",
"fileId": "<string>",
"label": "<string>",
"name": "<string>"
}
],
"reviewMaterial": [
{
"inputId": "<string>",
"fileId": "<string>",
"label": "<string>",
"name": "<string>"
}
]
},
"status": "queued"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"accessUrl": "<string>"
}Request a form comparison
Compare two versions of insurance wording with citations. Inputs must be readable, downloadable files with extracted text; current versions are pinned. Optional knowledge files are validated automatically.
Poll the returned id or use form_comparison.completed / form_comparison.failed webhooks. Runs time out after 30 minutes and use session credits. Requires the form comparisons feature and a member with write access.
Use Idempotency-Key for safe retries (7 days); without it, each POST starts a run. Maximum: 20 inputs, 50 annotations, 64 KiB.
curl --request POST \
--url https://api.effectiveai.app/api/v2/insurance/form-comparisons \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"variants": [
{
"key": "verus",
"label": "<string>",
"documents": [
"01a150b0-b6a4-774f-a0e0-ad385dbc5028"
],
"context": {
"product": {
"id": "product_00001AB",
"state": "CA"
},
"documents": [
"01a150b0-b6a4-774f-a0e0-ad385dbc5028"
],
"facts": "<string>"
}
}
],
"sharedContext": {
"product": {
"id": "product_00001AB",
"state": "CA"
},
"documents": [
"01a150b0-b6a4-774f-a0e0-ad385dbc5028"
],
"facts": "<string>"
},
"knowledge": [
"01a150b0-b6a4-774f-a0e0-ad385dbc5028"
],
"focus": [
"<string>"
],
"scenarios": [
{
"id": "water-backup",
"facts": "<string>",
"question": "<string>",
"expectations": [
{
"id": "<string>",
"assertion": "<string>",
"variant": "<string>"
}
]
}
],
"reviewMaterial": [
"01a150b0-b6a4-774f-a0e0-ad385dbc5028"
]
}
'import requests
url = "https://api.effectiveai.app/api/v2/insurance/form-comparisons"
payload = {
"variants": [
{
"key": "verus",
"label": "<string>",
"documents": ["01a150b0-b6a4-774f-a0e0-ad385dbc5028"],
"context": {
"product": {
"id": "product_00001AB",
"state": "CA"
},
"documents": ["01a150b0-b6a4-774f-a0e0-ad385dbc5028"],
"facts": "<string>"
}
}
],
"sharedContext": {
"product": {
"id": "product_00001AB",
"state": "CA"
},
"documents": ["01a150b0-b6a4-774f-a0e0-ad385dbc5028"],
"facts": "<string>"
},
"knowledge": ["01a150b0-b6a4-774f-a0e0-ad385dbc5028"],
"focus": ["<string>"],
"scenarios": [
{
"id": "water-backup",
"facts": "<string>",
"question": "<string>",
"expectations": [
{
"id": "<string>",
"assertion": "<string>",
"variant": "<string>"
}
]
}
],
"reviewMaterial": ["01a150b0-b6a4-774f-a0e0-ad385dbc5028"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
variants: [
{
key: 'verus',
label: '<string>',
documents: ['01a150b0-b6a4-774f-a0e0-ad385dbc5028'],
context: {
product: {id: 'product_00001AB', state: 'CA'},
documents: ['01a150b0-b6a4-774f-a0e0-ad385dbc5028'],
facts: '<string>'
}
}
],
sharedContext: {
product: {id: 'product_00001AB', state: 'CA'},
documents: ['01a150b0-b6a4-774f-a0e0-ad385dbc5028'],
facts: '<string>'
},
knowledge: ['01a150b0-b6a4-774f-a0e0-ad385dbc5028'],
focus: ['<string>'],
scenarios: [
{
id: 'water-backup',
facts: '<string>',
question: '<string>',
expectations: [{id: '<string>', assertion: '<string>', variant: '<string>'}]
}
],
reviewMaterial: ['01a150b0-b6a4-774f-a0e0-ad385dbc5028']
})
};
fetch('https://api.effectiveai.app/api/v2/insurance/form-comparisons', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.effectiveai.app/api/v2/insurance/form-comparisons",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'variants' => [
[
'key' => 'verus',
'label' => '<string>',
'documents' => [
'01a150b0-b6a4-774f-a0e0-ad385dbc5028'
],
'context' => [
'product' => [
'id' => 'product_00001AB',
'state' => 'CA'
],
'documents' => [
'01a150b0-b6a4-774f-a0e0-ad385dbc5028'
],
'facts' => '<string>'
]
]
],
'sharedContext' => [
'product' => [
'id' => 'product_00001AB',
'state' => 'CA'
],
'documents' => [
'01a150b0-b6a4-774f-a0e0-ad385dbc5028'
],
'facts' => '<string>'
],
'knowledge' => [
'01a150b0-b6a4-774f-a0e0-ad385dbc5028'
],
'focus' => [
'<string>'
],
'scenarios' => [
[
'id' => 'water-backup',
'facts' => '<string>',
'question' => '<string>',
'expectations' => [
[
'id' => '<string>',
'assertion' => '<string>',
'variant' => '<string>'
]
]
]
],
'reviewMaterial' => [
'01a150b0-b6a4-774f-a0e0-ad385dbc5028'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.effectiveai.app/api/v2/insurance/form-comparisons"
payload := strings.NewReader("{\n \"variants\": [\n {\n \"key\": \"verus\",\n \"label\": \"<string>\",\n \"documents\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ],\n \"context\": {\n \"product\": {\n \"id\": \"product_00001AB\",\n \"state\": \"CA\"\n },\n \"documents\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ],\n \"facts\": \"<string>\"\n }\n }\n ],\n \"sharedContext\": {\n \"product\": {\n \"id\": \"product_00001AB\",\n \"state\": \"CA\"\n },\n \"documents\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ],\n \"facts\": \"<string>\"\n },\n \"knowledge\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ],\n \"focus\": [\n \"<string>\"\n ],\n \"scenarios\": [\n {\n \"id\": \"water-backup\",\n \"facts\": \"<string>\",\n \"question\": \"<string>\",\n \"expectations\": [\n {\n \"id\": \"<string>\",\n \"assertion\": \"<string>\",\n \"variant\": \"<string>\"\n }\n ]\n }\n ],\n \"reviewMaterial\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.effectiveai.app/api/v2/insurance/form-comparisons")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"variants\": [\n {\n \"key\": \"verus\",\n \"label\": \"<string>\",\n \"documents\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ],\n \"context\": {\n \"product\": {\n \"id\": \"product_00001AB\",\n \"state\": \"CA\"\n },\n \"documents\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ],\n \"facts\": \"<string>\"\n }\n }\n ],\n \"sharedContext\": {\n \"product\": {\n \"id\": \"product_00001AB\",\n \"state\": \"CA\"\n },\n \"documents\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ],\n \"facts\": \"<string>\"\n },\n \"knowledge\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ],\n \"focus\": [\n \"<string>\"\n ],\n \"scenarios\": [\n {\n \"id\": \"water-backup\",\n \"facts\": \"<string>\",\n \"question\": \"<string>\",\n \"expectations\": [\n {\n \"id\": \"<string>\",\n \"assertion\": \"<string>\",\n \"variant\": \"<string>\"\n }\n ]\n }\n ],\n \"reviewMaterial\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.effectiveai.app/api/v2/insurance/form-comparisons")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"variants\": [\n {\n \"key\": \"verus\",\n \"label\": \"<string>\",\n \"documents\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ],\n \"context\": {\n \"product\": {\n \"id\": \"product_00001AB\",\n \"state\": \"CA\"\n },\n \"documents\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ],\n \"facts\": \"<string>\"\n }\n }\n ],\n \"sharedContext\": {\n \"product\": {\n \"id\": \"product_00001AB\",\n \"state\": \"CA\"\n },\n \"documents\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ],\n \"facts\": \"<string>\"\n },\n \"knowledge\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ],\n \"focus\": [\n \"<string>\"\n ],\n \"scenarios\": [\n {\n \"id\": \"water-backup\",\n \"facts\": \"<string>\",\n \"question\": \"<string>\",\n \"expectations\": [\n {\n \"id\": \"<string>\",\n \"assertion\": \"<string>\",\n \"variant\": \"<string>\"\n }\n ]\n }\n ],\n \"reviewMaterial\": [\n \"01a150b0-b6a4-774f-a0e0-ad385dbc5028\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"idempotencyExpiresAt": "2023-11-07T05:31:56Z",
"request": {
"variants": [
{
"key": "<string>",
"label": "<string>",
"documents": [
{
"inputId": "<string>",
"fileId": "<string>",
"label": "<string>",
"name": "<string>"
}
],
"form": {
"scope": "<string>",
"editionId": "<string>",
"formId": "<string>",
"formNumber": "<string>",
"title": "<string>",
"edition": "<string>",
"documents": [
{
"inputId": "<string>",
"fileId": "<string>",
"label": "<string>",
"name": "<string>"
}
]
},
"context": {
"facts": "<string>",
"documents": [
{
"inputId": "<string>",
"fileId": "<string>",
"label": "<string>",
"name": "<string>"
}
]
}
}
],
"sharedContext": {
"facts": "<string>",
"documents": [
{
"inputId": "<string>",
"fileId": "<string>",
"label": "<string>",
"name": "<string>"
}
]
},
"focus": [
"<string>"
],
"scenarios": [
{
"id": "<string>",
"facts": "<string>",
"question": "<string>",
"expectations": [
{
"id": "<string>",
"assertion": "<string>",
"variant": "<string>"
}
]
}
],
"knowledge": [
{
"inputId": "<string>",
"fileId": "<string>",
"label": "<string>",
"name": "<string>"
}
],
"reviewMaterial": [
{
"inputId": "<string>",
"fileId": "<string>",
"label": "<string>",
"name": "<string>"
}
]
},
"status": "queued"
}{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"idempotencyExpiresAt": "2023-11-07T05:31:56Z",
"request": {
"variants": [
{
"key": "<string>",
"label": "<string>",
"documents": [
{
"inputId": "<string>",
"fileId": "<string>",
"label": "<string>",
"name": "<string>"
}
],
"form": {
"scope": "<string>",
"editionId": "<string>",
"formId": "<string>",
"formNumber": "<string>",
"title": "<string>",
"edition": "<string>",
"documents": [
{
"inputId": "<string>",
"fileId": "<string>",
"label": "<string>",
"name": "<string>"
}
]
},
"context": {
"facts": "<string>",
"documents": [
{
"inputId": "<string>",
"fileId": "<string>",
"label": "<string>",
"name": "<string>"
}
]
}
}
],
"sharedContext": {
"facts": "<string>",
"documents": [
{
"inputId": "<string>",
"fileId": "<string>",
"label": "<string>",
"name": "<string>"
}
]
},
"focus": [
"<string>"
],
"scenarios": [
{
"id": "<string>",
"facts": "<string>",
"question": "<string>",
"expectations": [
{
"id": "<string>",
"assertion": "<string>",
"variant": "<string>"
}
]
}
],
"knowledge": [
{
"inputId": "<string>",
"fileId": "<string>",
"label": "<string>",
"name": "<string>"
}
],
"reviewMaterial": [
{
"inputId": "<string>",
"fileId": "<string>",
"label": "<string>",
"name": "<string>"
}
]
},
"status": "queued"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"accessUrl": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic",
"businessCode": "<string>",
"violations": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"value": "<unknown>",
"constraint": "<string>",
"cite": "<string>"
}
],
"violationsTruncated": true,
"accessUrl": "<string>"
}Authorizations
Effective API key. Send Authorization: Bearer sk-eai-...
Headers
Client-chosen key for safe retries: 1-128 letters, digits, -, _, . or :. Use a new random UUID for each intended operation and the same key when retrying it. Do not put customer data or credentials in the key.
1 - 128^[A-Za-z0-9\-_.:]+$Body
Two versions to compare, in display order.
2 elementsShow child attributes
Show child attributes
Context for all variants. Conflicts are reported as gaps.
Show child attributes
Show child attributes
Knowledge files: reasoning context, not policy evidence. Must pass validateFormKnowledge.
10File UUID or an object with an ID and optional label/annotations. Bare UUIDs receive input- IDs in request order.
"01a150b0-b6a4-774f-a0e0-ad385dbc5028"
Questions to focus on. Omit for material similarities and differences.
101 - 1000Hypothetical scenarios to assess for each variant.
10Show child attributes
Show child attributes
Earlier results or reviewer notes to reconcile; not policy evidence.
10File UUID or an object with an ID and optional label/annotations. Bare UUIDs receive input- IDs in request order.
"01a150b0-b6a4-774f-a0e0-ad385dbc5028"
Response
Completed comparison returned by an idempotent retry.
- Option 1
- Option 2
- Option 3
- Option 4
Form comparison UUID.
When the comparison was accepted.
Key expiry (7 days); null without a key.
Submitted request. Pinned versions appear in inputsUsed.
Show child attributes
Show child attributes
Waiting to start.
queued