docAnalyzer.ai API
v2025-01-16The docAnalyzer.ai REST API. See the quick start and guide.
For AI agents: llms.txt · llms-full.txt · mcp.json · mcp-server.mjs
/modelsList all models
Header Parameters
Authorization string required Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>
Responses
An array of models Object
data oneof Show child attributes Hide child attributes
Option 1 Model[] Show child attributes Hide child attributes
items Model array itemsShow child attributes Hide child attributes
id string required docAnalyzer.ai unique id to select this model
label string required The human-readable display name for the model.
Error response.
error Error required Show child attributes Hide child attributes
message string required A human-readable message providing more details about the error.
/models/{options}List models filtered by options
Path Parameters
options string required Comma-separated options (e.g., byok) that get an optional models list. If byok, the server returns the byok models.
Header Parameters
Authorization string required Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>
Responses
An array of models Object
data oneof Show child attributes Hide child attributes
Option 1 Model[] Show child attributes Hide child attributes
items Model array itemsShow child attributes Hide child attributes
id string required docAnalyzer.ai unique id to select this model
label string required The human-readable display name for the model.
Error response.
error Error required Show child attributes Hide child attributes
message string required A human-readable message providing more details about the error.
/creditsList credits usage for the API key
Query Parameters
start string <date-time> ISO start timestamp (inclusive). Defaults to the first day of the current month when omitted.
end string <date-time> ISO end timestamp (exclusive). Defaults to the end of the month for the start date when omitted; max 31 days.
reason string Filter by reason group. If omitted or invalid, returns all reasons.
workspace integer <int32> Filter by workspace id.
limit integer <int32> Maximum number of ledger entries to return.
cursor string <date-time> Cursor for pagination. Use nextCursor from the previous response.
Header Parameters
Authorization string required Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>
Responses
Credits usage summary and ledger.
data oneof Show child attributes Hide child attributes
Option 1 CreditsReport Show child attributes Hide child attributes
summary CreditsSummary required Show child attributes Hide child attributes
start string <date-time> required Start of the requested time range (inclusive).
end string <date-time> required End of the requested time range (exclusive).
count integer <int32> required Number of ledger entries matched by the range and filters.
monthly_delta number required Sum of monthly credits deltas over the range (usage is negative; reset/purchase is positive).
bundle_delta number required Sum of bundle credits deltas over the range (usage is negative; reset/purchase is positive).
ledger CreditsLedger required Show child attributes Hide child attributes
items CreditsLedgerItem[] required Show child attributes Hide child attributes
items CreditsLedgerItem array itemsShow child attributes Hide child attributes
event_ts string <date-time> required Timestamp of the ledger event.
reason string required Reason code for the credits event.
workspace integer <int32> | null Workspace id associated with the event, if any.
delta_monthly number required Monthly credits delta for the event (usage is negative; reset/purchase is positive).
delta_bundle number required Bundle credits delta for the event (usage is negative; reset/purchase is positive).
request_id string | null Idempotency key tied to the event, if available.
nextCursor string <date-time> | null required Cursor for the next page of results.
Unauthorized
error Error required Show child attributes Hide child attributes
message string required A human-readable message providing more details about the error.
Error response.
error Error required Show child attributes Hide child attributes
message string required A human-readable message providing more details about the error.
/docList all documents in a given workspace
Query Parameters
offset integer <int32> limit integer <int32> Header Parameters
da-workspace integer The workspace to use
Authorization string required Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>
Responses
A paged array of documents
data oneof Show child attributes Hide child attributes
Option 1 Doc[] Show child attributes Hide child attributes
items Doc array itemsShow child attributes Hide child attributes
docid string required A safe, unique identifier for the document. The identifier starts with 'd' followed by 15 characters, ensuring a total length of 16 characters.
workspace integer <int32> required A smallint value representing the workspace. It designates the workspace in which the document exists.
name string required The human-readable name or title of the document for display purposes.
metadata Metadata | null You can use this field to attach key-value data to a label/document. Up to 20 keys; keys up to 40 characters; values up to 200 characters; keys and values must be strings; keys may contain only letters and numbers.
Show child attributes Hide child attributes
* string additional propertiesready boolean required Indicates whether the document has been successfully analyzed and is fully processed. When set to true, the document is ready for actions such as initiating an interactive chat session.
Error response.
error Error required Show child attributes Hide child attributes
message string required A human-readable message providing more details about the error.
/docCreate a document from a URL
Header Parameters
da-workspace integer The workspace to use
Authorization string required Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>
Request Body required application/json
url string <uri> required Publicly accessible URL to fetch the file from
name string Display name to use for the created document. If omitted, the URL will be used.
Responses
Document created successfully
data string[] Array with the created document id(s)
Show child attributes Hide child attributes
items string array itemsDocument id
Invalid request or failed to fetch URL
error Error required Show child attributes Hide child attributes
message string required A human-readable message providing more details about the error.
Error response.
error Error required Show child attributes Hide child attributes
message string required A human-readable message providing more details about the error.
/doc/upload/{options}Upload document(s)
Path Parameters
options string[] required Comma-separated options (e.g.,sync) that modify upload behavior. If sync, the server wait document(s) analysis is ready to return.
Header Parameters
da-workspace integer The workspace to use
Authorization string required Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>
Request Body multipart/form-data
file string[] Show child attributes Hide child attributes
items string array itemsResponses
Null response
data Doc[] Show child attributes Hide child attributes
items Doc array itemsShow child attributes Hide child attributes
docid string required A safe, unique identifier for the document. The identifier starts with 'd' followed by 15 characters, ensuring a total length of 16 characters.
workspace integer <int32> required A smallint value representing the workspace. It designates the workspace in which the document exists.
name string required The human-readable name or title of the document for display purposes.
metadata Metadata | null You can use this field to attach key-value data to a label/document. Up to 20 keys; keys up to 40 characters; values up to 200 characters; keys and values must be strings; keys may contain only letters and numbers.
Show child attributes Hide child attributes
* string additional propertiesready boolean required Indicates whether the document has been successfully analyzed and is fully processed. When set to true, the document is ready for actions such as initiating an interactive chat session.
Error response.
error Error required Show child attributes Hide child attributes
message string required A human-readable message providing more details about the error.
/doc/{docid}Get document information
Path Parameters
docid string required The unique identifier of the document to retrieve
Header Parameters
Authorization string required Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>
Responses
Expected response to a valid request
docid string required A safe, unique identifier for the document. The identifier starts with 'd' followed by 15 characters, ensuring a total length of 16 characters.
workspace integer <int32> required A smallint value representing the workspace. It designates the workspace in which the document exists.
name string required The human-readable name or title of the document for display purposes.
metadata Metadata | null You can use this field to attach key-value data to a label/document. Up to 20 keys; keys up to 40 characters; values up to 200 characters; keys and values must be strings; keys may contain only letters and numbers.
Show child attributes Hide child attributes
* string additional propertiesready boolean required Indicates whether the document has been successfully analyzed and is fully processed. When set to true, the document is ready for actions such as initiating an interactive chat session.
Error response.
error Error required Show child attributes Hide child attributes
message string required A human-readable message providing more details about the error.
/doc/{docid}Update document
Path Parameters
docid string required The unique identifier of the document to update
Header Parameters
Authorization string required Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>
Request Body required application/json
name string The new display name for the document
metadata Metadata | null You can use this field to attach key-value data to a label/document. Up to 20 keys; keys up to 40 characters; values up to 200 characters; keys and values must be strings; keys may contain only letters and numbers.
Show child attributes Hide child attributes
* string additional propertiesResponses
Expected response to a valid request
docid string required A safe, unique identifier for the document. The identifier starts with 'd' followed by 15 characters, ensuring a total length of 16 characters.
workspace integer <int32> required A smallint value representing the workspace. It designates the workspace in which the document exists.
name string required The human-readable name or title of the document for display purposes.
metadata Metadata | null You can use this field to attach key-value data to a label/document. Up to 20 keys; keys up to 40 characters; values up to 200 characters; keys and values must be strings; keys may contain only letters and numbers.
Show child attributes Hide child attributes
* string additional propertiesready boolean required Indicates whether the document has been successfully analyzed and is fully processed. When set to true, the document is ready for actions such as initiating an interactive chat session.
Error response.
error Error required Show child attributes Hide child attributes
message string required A human-readable message providing more details about the error.
/doc/{docid}Delete document
Path Parameters
docid string required The unique identifier of the document to delete
Header Parameters
Authorization string required Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>
Responses
Expected response to a valid request
docid string required A safe, unique identifier for the document. The identifier starts with 'd' followed by 15 characters, ensuring a total length of 16 characters.
workspace integer <int32> required A smallint value representing the workspace. It designates the workspace in which the document exists.
name string required The human-readable name or title of the document for display purposes.
metadata Metadata | null You can use this field to attach key-value data to a label/document. Up to 20 keys; keys up to 40 characters; values up to 200 characters; keys and values must be strings; keys may contain only letters and numbers.
Show child attributes Hide child attributes
* string additional propertiesready boolean required Indicates whether the document has been successfully analyzed and is fully processed. When set to true, the document is ready for actions such as initiating an interactive chat session.
Error response.
error Error required Show child attributes Hide child attributes
message string required A human-readable message providing more details about the error.
/doc/{docid}/linkGet a document link
Path Parameters
docid string required The unique identifier of the document to retrieve
Header Parameters
Authorization string required Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>
Responses
Expected response to a valid request
data object Show child attributes Hide child attributes
link string required A link to get the document.
Error response.
error Error required Show child attributes Hide child attributes
message string required A human-readable message providing more details about the error.
/doc/{docid}/chatChat with a document
Each call starts a new conversation thread by default; concurrent calls do not interfere with each other. To continue an earlier conversation, capture the tid returned in the response and pass it back as tid in the next request. Only one chat may be in flight per tid at a time — a concurrent call on the same tid returns HTTP 423.
Path Parameters
docid string required The unique identifier of the document to chat with.
Header Parameters
Authorization string required Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>
Request Body required application/json
prompt string required The question for the AI.
tid string Optional. Continue a previous conversation by passing the tid returned by an earlier call to this endpoint. Must belong to the same document. Omit to start a fresh thread (recommended for stateless / event-driven integrations).
dryrun boolean If true, estimates the maximum credits the request might consume without processing it.
model string Specifies the AI model for generating the response. Default: 'gpt-4.1-mini'. Retrieve available model IDs via GET /models. Supports various providers and Bring Your Own Key (BYOK) models configured in your account.
budget number Maximum number of context tokens (from the prompt and document) to use for the prompt. Defaults and maximums vary by model (see GET /models).
pcap number Maximum fraction of the context budget that the prompt (input) tokens are allowed to consume. From 5% to 60%.
thinking string Specifies the reasoning process for compatible models. Refer to GET /models for valid values specific to each model.
page boolean Indicates whether page number references from the source document should be included in the answer.
ocap number Sets the maximum number of tokens for the generated answer (output capacity). Defaults and maximums vary by model (see GET /models).
adherence string Controls how strictly the AI's response must adhere to the provided document's content.
lang string Specifies the desired language for the AI's answer.
byok boolean Set to true to use a Bring Your Own Key (BYOK) model configured in your account.
Responses
Successful response containing the AI's answer.
promptid string required Unique identifier for this specific chat interaction (prompt and response).
tid string required Identifier of the conversation thread this call ran on. Pass it back as tid in a future request to continue the conversation.
answer string required The AI-generated answer based on the prompt and document context.
Unauthorized
error Error required Show child attributes Hide child attributes
message string required A human-readable message providing more details about the error.
A chat is already in progress on this thread (tid). Wait for the previous response, or omit tid to start a new thread.
error Error required Show child attributes Hide child attributes
message string required A human-readable message providing more details about the error.
An unexpected error occurred.
error Error required Show child attributes Hide child attributes
message string required A human-readable message providing more details about the error.
/doc/{docid}/ocrPerform OCR (Optical Character Recognition).
Path Parameters
docid string required The unique identifier of the document to perform ocr on
Header Parameters
Authorization string required Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>
Responses
Expected response to a valid request
queue string[] workflow id
Show child attributes Hide child attributes
items string array itemsUnauthorized
error Error required Show child attributes Hide child attributes
message string required A human-readable message providing more details about the error.
Error response.
error Error required Show child attributes Hide child attributes
message string required A human-readable message providing more details about the error.
/labelList all labels in a given workspace
Query Parameters
offset integer <int32> limit integer <int32> Header Parameters
da-workspace integer The workspace to use
Authorization string required Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>
Responses
A paged array of labels
data oneof Show child attributes Hide child attributes
Option 1 Label[] Show child attributes Hide child attributes
items Label array itemsShow child attributes Hide child attributes
lid string required Legacy UUID identifier for the label.
labelid string Preferred label identifier. Starts with 'l' and is 15-20 characters long.
workspace integer <int32> required A smallint value representing the workspace. It designates the workspace in which the document exists.
name string required The human-readable name of the label for display purposes.
metadata Metadata | null You can use this field to attach key-value data to a label/document. Up to 20 keys; keys up to 40 characters; values up to 200 characters; keys and values must be strings; keys may contain only letters and numbers.
Show child attributes Hide child attributes
* string additional propertiesdocids string[] required Unique identifiers of documents associated with the label
Show child attributes Hide child attributes
items string array itemscolor string required The hex color code of the label
Error response.
error Error required Show child attributes Hide child attributes
message string required A human-readable message providing more details about the error.
/labelCreate a label
Header Parameters
da-workspace integer The workspace to use
Authorization string required Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>
Request Body required application/json
name string required Display name for the label
metadata Metadata | null You can use this field to attach key-value data to a label/document. Up to 20 keys; keys up to 40 characters; values up to 200 characters; keys and values must be strings; keys may contain only letters and numbers.
Show child attributes Hide child attributes
* string additional propertiesdocids string[] Unique identifiers of documents associated with the label
Show child attributes Hide child attributes
items string array itemscolor string required The hex color code of the label
Responses
A paged array of labels
data oneof Show child attributes Hide child attributes
Option 1 Label[] Show child attributes Hide child attributes
items Label array itemsShow child attributes Hide child attributes
lid string required Legacy UUID identifier for the label.
labelid string Preferred label identifier. Starts with 'l' and is 15-20 characters long.
workspace integer <int32> required A smallint value representing the workspace. It designates the workspace in which the document exists.
name string required The human-readable name of the label for display purposes.
metadata Metadata | null You can use this field to attach key-value data to a label/document. Up to 20 keys; keys up to 40 characters; values up to 200 characters; keys and values must be strings; keys may contain only letters and numbers.
Show child attributes Hide child attributes
* string additional propertiesdocids string[] required Unique identifiers of documents associated with the label
Show child attributes Hide child attributes
items string array itemscolor string required The hex color code of the label
Error response.
error Error required Show child attributes Hide child attributes
message string required A human-readable message providing more details about the error.
/label/{labelid}/upload/{options}Upload documents associated with label(s)
Path Parameters
labelid string[] required Label identifier(s) to associate documents with (labelid preferred; legacy UUID lid supported).
options string[] required Comma-separated options (e.g.,sync) that modify upload behavior. If sync, the server wait document(s) analysis is ready to return.
Header Parameters
da-workspace integer The workspace to use
Authorization string required Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>
Request Body multipart/form-data
file string[] Show child attributes Hide child attributes
items string array itemsResponses
Null response
data Label[] Show child attributes Hide child attributes
items Label array itemsShow child attributes Hide child attributes
lid string required Legacy UUID identifier for the label.
labelid string Preferred label identifier. Starts with 'l' and is 15-20 characters long.
workspace integer <int32> required A smallint value representing the workspace. It designates the workspace in which the document exists.
name string required The human-readable name of the label for display purposes.
metadata Metadata | null You can use this field to attach key-value data to a label/document. Up to 20 keys; keys up to 40 characters; values up to 200 characters; keys and values must be strings; keys may contain only letters and numbers.
Show child attributes Hide child attributes
* string additional propertiesdocids string[] required Unique identifiers of documents associated with the label
Show child attributes Hide child attributes
items string array itemscolor string required The hex color code of the label
Error response.
error Error required Show child attributes Hide child attributes
message string required A human-readable message providing more details about the error.
/label/{labelid}Get label information
Path Parameters
labelid string required The label identifier to retrieve (labelid preferred; legacy UUID lid supported).
Header Parameters
Authorization string required Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>
Responses
Expected response to a valid request
lid string required Legacy UUID identifier for the label.
labelid string Preferred label identifier. Starts with 'l' and is 15-20 characters long.
workspace integer <int32> required A smallint value representing the workspace. It designates the workspace in which the document exists.
name string required The human-readable name of the label for display purposes.
metadata Metadata | null You can use this field to attach key-value data to a label/document. Up to 20 keys; keys up to 40 characters; values up to 200 characters; keys and values must be strings; keys may contain only letters and numbers.
Show child attributes Hide child attributes
* string additional propertiesdocids string[] required Unique identifiers of documents associated with the label
Show child attributes Hide child attributes
items string array itemscolor string required The hex color code of the label
Error response.
error Error required Show child attributes Hide child attributes
message string required A human-readable message providing more details about the error.
/label/{labelid}Update label
Path Parameters
labelid string required The label identifier to update (labelid preferred; legacy UUID lid supported).
Header Parameters
Authorization string required Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>
Request Body required application/json
name string The new display name for the label
metadata Metadata | null You can use this field to attach key-value data to a label/document. Up to 20 keys; keys up to 40 characters; values up to 200 characters; keys and values must be strings; keys may contain only letters and numbers.
Show child attributes Hide child attributes
* string additional propertiescolor string The new hex color code for the label
docids object Show child attributes Hide child attributes
tag string[] Tag the document(s) with this label
Show child attributes Hide child attributes
items string array itemsuntag string[] Untag the document(s) with this label
Show child attributes Hide child attributes
items string array itemsResponses
Expected response to a valid request
lid string required Legacy UUID identifier for the label.
labelid string Preferred label identifier. Starts with 'l' and is 15-20 characters long.
workspace integer <int32> required A smallint value representing the workspace. It designates the workspace in which the document exists.
name string required The human-readable name of the label for display purposes.
metadata Metadata | null You can use this field to attach key-value data to a label/document. Up to 20 keys; keys up to 40 characters; values up to 200 characters; keys and values must be strings; keys may contain only letters and numbers.
Show child attributes Hide child attributes
* string additional propertiesdocids string[] required Unique identifiers of documents associated with the label
Show child attributes Hide child attributes
items string array itemscolor string required The hex color code of the label
Error response.
error Error required Show child attributes Hide child attributes
message string required A human-readable message providing more details about the error.
/label/{labelid}Delete label
Path Parameters
labelid string required The label identifier to delete (labelid preferred; legacy UUID lid supported).
Header Parameters
Authorization string required Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>
Responses
Expected response to a valid request
lid string required Legacy UUID identifier for the label.
labelid string Preferred label identifier. Starts with 'l' and is 15-20 characters long.
workspace integer <int32> required A smallint value representing the workspace. It designates the workspace in which the document exists.
name string required The human-readable name of the label for display purposes.
metadata Metadata | null You can use this field to attach key-value data to a label/document. Up to 20 keys; keys up to 40 characters; values up to 200 characters; keys and values must be strings; keys may contain only letters and numbers.
Show child attributes Hide child attributes
* string additional propertiesdocids string[] required Unique identifiers of documents associated with the label
Show child attributes Hide child attributes
items string array itemscolor string required The hex color code of the label
Error response.
error Error required Show child attributes Hide child attributes
message string required A human-readable message providing more details about the error.
/label/{labelid}/chatChat with all documents associated with a label
Each call starts a new conversation thread by default; concurrent calls (e.g. one per logged event) run independently. To continue an earlier conversation, capture the tid returned in the response and pass it back as tid in the next request. Only one chat may be in flight per tid at a time — a concurrent call on the same tid returns HTTP 423.
Path Parameters
labelid string required The label identifier to chat with (labelid preferred; legacy UUID lid supported).
Header Parameters
Authorization string required Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>
Request Body required application/json
prompt string required The question for the AI.
tid string Optional. Continue a previous conversation by passing the tid returned by an earlier call to this endpoint. Must belong to the same label. Omit to start a fresh thread (recommended for stateless / event-driven integrations).
dryrun boolean If true, estimates the maximum credits the request might consume without processing it.
model string Specifies the AI model for generating the response. Default: 'gpt-4.1-mini'. Retrieve available model IDs via GET /models. Supports various providers and Bring Your Own Key (BYOK) models configured in your account.
budget number Maximum number of context tokens (from the prompt and documents) to use for the prompt. Defaults and maximums vary by model (see GET /models).
pcap number Maximum fraction of the context budget that the prompt (input) tokens are allowed to consume. From 5% to 60%.
thinking string Specifies the reasoning process for compatible models. Refer to GET /models for valid values specific to each model.
page boolean Indicates whether page number references from the source documents should be included in the answer.
ocap number Sets the maximum number of tokens for the generated answer (output capacity). Defaults and maximums vary by model (see GET /models).
adherence string Controls how strictly the AI's response must adhere to the provided documents' content.
lang string Specifies the desired language for the AI's answer.
byok boolean Set to true to use a Bring Your Own Key (BYOK) model configured in your account.
Responses
Successful response containing the AI's answer.
promptid string required Unique identifier for this specific chat interaction (prompt and response).
tid string required Identifier of the conversation thread this call ran on. Pass it back as tid in a future request to continue the conversation.
answer string required The AI-generated answer based on the prompt and document context.
Unauthorized
error Error required Show child attributes Hide child attributes
message string required A human-readable message providing more details about the error.
A chat is already in progress on this thread (tid). Wait for the previous response, or omit tid to start a new thread.
error Error required Show child attributes Hide child attributes
message string required A human-readable message providing more details about the error.
Error response.
error Error required Show child attributes Hide child attributes
message string required A human-readable message providing more details about the error.