Logo
EntryForm Filler

Form Generation

View Docs

API Reference

POST
/api/agent/form/generate

Authorization

ApiKeyAuth
access-key<token>

Your unique access-key generated from the platform UI

In: header

Request Body

application/json

doc_process_id*string

Form document ID to extract structure from (obtained from Upload or List Documents APIs)

model_data*

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.k-v.ai/api/agent/form/generate" \  -H "Content-Type: application/json" \  -d '{    "doc_process_id": "your_doc_id",    "model_data": {      "model_name": "gpt-5.1",      "api_key": ""    }  }'
{
  "value": {
    "data": {
      "document_id": "Sample_Form.pdf",
      "form_template": [
        {
          "label": "Given Name",
          "type": "text",
          "example": null,
          "options": null,
          "user_value": {
            "source": null,
            "possible_value": null
          }
        }
      ]
    },
    "message": "Form created 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": "string"
}