Ask questions about one or more documents.

This API endpoint uses a language model to answer questions about documents. Provided with a natural language question and a list of files, the API returns a multi-part answer with references to the locations in the documents that were used to build the answer.

Limitations

  • Currently, we only support PDF files.
  • The PDF files can be a maximum of 400 pages long.
  • You can only pass 100 files in a single request.
Securityoidc-token or oauth2-client-credentials or oauth2-open-industrial-data or oauth2-auth-code
Request
header Parameters
content-type
required
string (Content-Type)
Request Body schema: application/json
required
additionalContext
string (Additionalcontext) [ 10 .. 2048 ] characters

Optional additional context that the model can use to improve its answer

required
Array of DocumentInternalId (object) or DocumentExternalId (object) or DocumentInstanceId (object) (Fileids) [ 1 .. 100 ] items

A list of file IDs, external IDs, or instance IDs pointing to PDF documents

ignoreUnknownIds
boolean (Ignoreunknownids)
Default: false

If true, the API will not fail if any documents are missing or not fully processed, but generate an answer based on available documents.

language
string (DocumentsLanguage)
Default: "English"

The language in which the answer should be provided.

Enum: "Chinese" "Dutch" "English" "French" "German" "Italian" "Japanese" "Korean" "Latvian" "Norwegian" "Portuguese" "Spanish" "Swedish"
question
required
string (Question) [ 1 .. 2048 ] characters

The question to ask about the documents.

Responses
200

Successful Response

400

The response for a failed request.

post/ai/tools/documents/ask
Request samples
application/json
{
  • "additionalContext": "stringstri",
  • "fileIds": [
    • {
      }
    ],
  • "ignoreUnknownIds": false,
  • "language": "Chinese",
  • "question": "string"
}
Response samples
application/json
{
  • "content": [
    • {
      }
    ]
}