Context window

Context window

Ask questions about a kept document, a knowledge space, or up to 10 files sent together.

Context window

Ask across several documents

Endpoint

POSThttps://claix.dev/multi-document

Send up to 10 files in one call, together with the same typed questions used by Query space. Each file is converted to Markdown and the answers are built by crossing those texts. There is no schema_id and the files do not need to be stored beforehand.

The accepted formats are the same as Extraction → Markdown: PDF, Excel/CSV, Word and text, HTML/XML, images and audio.

Public URL: POST https://claix.dev/multi-document. Never expose the direct Supabase URL.

1. Authentication

Same API key check as Query document and Query space. The key must exist and be active, and the account must be active.

x-api-key: <TU_API_KEY>

Or:

Authorization: Bearer <TU_API_KEY>

2. Parameters

Method: POST · Content-Type: multipart/form-data

FieldRequiredDescription
fileYesRepeat the field from 1 to 10 times. files and documents are also accepted. Same formats and size limits as Extraction → Markdown.
questionsYesJSON array of { question, format }. Maximum 5 questions, 400 characters each. format: string | int | boolean | timestamp | array.
window_contextNotrue keeps each converted document. Omit it or send false to only answer the questions.
window_timeRequired if window_context is trueMinutes: 5, 10, 15, 30, 45, 60, 90, 120, 180, 240, 360, 480, 720, 1440, or infinity. infinity requires Persistent Mode on the account.
space_idNoKnowledge space owned by the API key. Only when window_context is true. The kept documents are attached to that space.

3. Response

Same shape as Query space, plus documents_processed. Answers stay aligned with the questions and use the requested format, or null when the data is not in the files. If source verification is enabled for knowledge-space queries, each answer is { value, source }.

{
  "user_ask": [
    { "question": "¿Qué proveedor factura más en total?", "format": "string" }
  ],
  "ia_response": ["Suministros Omega S.A."],
  "documents_processed": 2,
  "log_id": "LOG_UUID"
}

log_id identifies the call in the logs panel.

4. Status codes

CodeWhen
200Questions answered.
400Missing questions or files, more than 10 files, unsupported format, invalid window_time, space_id without window_context, or infinity without Persistent Mode.
401API key missing, invalid, inactive, or account not active.
404space_id does not exist for this account.
405Method other than POST.
413A file is over the limit of its format.
422A file could not be turned into readable Markdown.
502The model call failed.

Request examples

curl -X POST "https://claix.dev/multi-document" \
  -H "x-api-key: <TU_API_KEY>" \
  -F "file=@factura.pdf" \
  -F "file=@contrato.docx" \
  -F 'questions=[{"question":"¿Qué proveedor factura más en total?","format":"string"},{"question":"¿El importe del contrato coincide con la factura?","format":"boolean"}]'