EntryQuestionnaire Filler
Questionnaire Filling
View DocsAPI Reference
Authorization
ApiKeyAuth access-key<token>
Your unique access-key generated from the platform UI
In: header
Request Body
application/json
source_doc_process_ids*array<string>
Array of source document IDs containing answers to fill the questionnaire (obtained from Upload or List Documents APIs). Only documents with status 'processed' can be used.
model_data*
unfilled_questionnaire_data*
Questionnaire structure from Questionnaire Generation API response
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.k-v.ai/api/agent/questionnaire/fill" \ -H "Content-Type: application/json" \ -d '{ "source_doc_process_ids": [ "your_doc_id" ], "model_data": { "model_name": "gpt-5.1", "api_key": "" }, "unfilled_questionnaire_data": [ { "question": "What is the name of the agreement entered into between ABC Software Corporation and Widget Corporation?", "type": "factual", "options": null, "example": "Settlement Agreement and Release", "user_value": { "source": null, "possible_value": null } }, { "question": "Does the Plaintiff\'s release in this Agreement cover past, present, or future claims related to the faxed advertisement?", "type": "mcq", "options": [ "Only past claims", "Only present claims", "Only future claims", "Past, present, and future claims" ], "example": "Past, present, and future claims", "user_value": { "source": null, "possible_value": null } } ] }'{
"value": {
"data": [
{
"question": "What is the name of the agreement entered into between ABC Software Corporation and Widget Corporation?",
"type": "factual",
"options": null,
"example": "Settlement Agreement and Release",
"user_value": {
"source": "Settlement Agreement Tweaked.pdf",
"possible_value": "SETTLEMENT AGREEMENT AND RELEASE",
"page_numbers": [
"1-3"
],
"doc_hash": [
"3b5337f9edb4a828ed580b75f9cc1952"
]
},
"possible_answers": [
{
"source": "Settlement Agreement Tweaked.pdf",
"possible_value": "SETTLEMENT AGREEMENT AND RELEASE",
"page_numbers": [
"1-3"
],
"doc_hash": [
"3b5337f9edb4a828ed580b75f9cc1952"
]
}
]
},
{
"question": "Does the Plaintiff's release in this Agreement cover past, present, or future claims related to the faxed advertisement?",
"type": "mcq",
"options": [
"Only past claims",
"Only present claims",
"Only future claims",
"Past, present, and future claims"
],
"example": "Past, present, and future claims",
"user_value": {
"source": "Settlement Agreement Tweaked.pdf",
"possible_value": "Past, present, and future claims",
"page_numbers": [
"1-3"
],
"doc_hash": [
"3b5337f9edb4a828ed580b75f9cc1952"
]
},
"possible_answers": [
{
"source": "Settlement Agreement Tweaked.pdf",
"possible_value": "Past, present, and future claims",
"page_numbers": [
"1-3"
],
"doc_hash": [
"3b5337f9edb4a828ed580b75f9cc1952"
]
}
]
}
],
"message": "Questionnaire filled successfully"
}
}{
"value": {
"data": {},
"message": "Invalid docs selected"
}
}{
"value": {
"data": {},
"message": "Invalid or missing access key"
}
}{
"detail": [
{
"type": "literal_error",
"loc": [
"string"
],
"msg": "string",
"input": "string",
"ctx": {
"expected": "string"
}
}
]
}{
"data": {},
"message": "litellm.AuthenticationError: AuthenticationError: OpenAIException - Incorrect API key provided: tyrdfuih**uhf7. You can find your API key at https://platform.openai.com/account/api-keys."
}