Template filler
Generates a filled template with the relevant information extracted from a raw text. The template is a string with placeholders that the model will fill with the extracted information. The placeholders are represented by square brackets [].
Below we will describe the entire process that allows the successful completion of template filling.
Request description
Endpoint: /api/v1/template-filler
Method: POST
Header
{
"Content-Type": "application/json",
"Authorization": "Bearer <accessToken>"
}
Authorization: We'll pass the token obtained during the authentication process. You can reuse the generated tokens, as they have a 2-hour lifespan. Review this page: Credentials
To set the API version on a specific request, you can add a specific header named X-Invox-Medical-Api-Version with the value of the version you are targeting:
X-Invox-Medical-Api-Version: 2026-03-01
Payload structure
type IMedicalTemplateFillerRequest = {
text: string; // Raw text from which to extract the relevant information to fill the template
template: string; // Template with placeholders represented by square brackets `[]` to be filled with the extracted information
preserve_defaults?: boolean; // Whether to preserve default values in the template if no relevant information is found. Default is true.
};
Responses
Correct response
Successful request
Describe the characteristics of a satisfactory response
200
Input example:
{
"text": "The patient is a 42-year-old male with high blood pressure.",
"template": "Age: []\nGender: []\nPrimary diagnosis: []\nSecondary diagnosis: [Not specified]",
"preserve_defaults": true
}
{
"filled_template": "Age: 42\nGender: male\nPrimary diagnosis: high blood pressure\nSecondary diagnosis: Not specified",
"request_id": "e9151151-9f32-485b-a7cc-6be3f587af07"
}
interface IMedicalTemplateFillerResponse {
filled_template: string; // The template with the placeholders filled with the relevant information extracted from the input text
request_id: string; // Unique identifier for the request, useful for tracking and debugging purposes
}
Wrong responses
Unauthorized request
Describes the response when the request is not authorized
401
Response body
type GenericTemplateFillerResponseType = {
message: string;
};
Forbidden request
Describes the response when the API Key is not allowed to consume this service
403
Response body
type GenericTemplateFillerResponseType = {
message: string;
};
TEMPLATE-FILLERValidation error
Describe the features of a validation error
422
Response body
type TemplateFillerResponseType = {
statusCode: number;
message: string;
error: string;
details: {
errorCode: string;
message: string;
requestId: string;
timestamp: string;
};
};