docAnalyzer.ai API

v2025-01-16

The docAnalyzer.ai REST API. See the quick start and guide.

Base URL
https://api.docanalyzer.ai/api/v1
Authentication
bearerAuth — http/bearer, sent as Authorization header

For AI agents: llms.txt · llms-full.txt · mcp.json · mcp-server.mjs

GET /models

List all models

Header Parameters

Authorization string required

Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>

Responses

200

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 items
Show 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.

default

Error response.

error Error required
Show child attributes Hide child attributes
message string required

A human-readable message providing more details about the error.

length: 0…500
GET /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

200

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 items
Show 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.

default

Error response.

error Error required
Show child attributes Hide child attributes
message string required

A human-readable message providing more details about the error.

length: 0…500
GET /credits

List 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.

enum: "chat", "chatbot", "api", "other"
workspace integer <int32>

Filter by workspace id.

range: 0…32767
limit integer <int32>

Maximum number of ledger entries to return.

default: 100
range: 1…200
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

200

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.

range: 0…∞
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 items
Show 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.

range: 0…32767
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.

401

Unauthorized

error Error required
Show child attributes Hide child attributes
message string required

A human-readable message providing more details about the error.

length: 0…500
default

Error response.

error Error required
Show child attributes Hide child attributes
message string required

A human-readable message providing more details about the error.

length: 0…500
GET /doc

List all documents in a given workspace

Query Parameters

offset integer <int32>
default: 0
limit integer <int32>
default: 100

Header Parameters

da-workspace integer

The workspace to use

default: 0
range: 0…32767
Authorization string required

Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>

Responses

200

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 items
Show 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.

pattern: ^d[0-9a-z]{15}$
workspace integer <int32> required

A smallint value representing the workspace. It designates the workspace in which the document exists.

range: 0…32767
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 properties
length: 0…200
ready 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.

default

Error response.

error Error required
Show child attributes Hide child attributes
message string required

A human-readable message providing more details about the error.

length: 0…500
POST /doc

Create a document from a URL

Header Parameters

da-workspace integer

The workspace to use

default: 0
range: 0…32767
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

200

Document created successfully

data string[]

Array with the created document id(s)

Show child attributes Hide child attributes
items string array items

Document id

pattern: ^d[0-9a-z]{15}$
400

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.

length: 0…500
default

Error response.

error Error required
Show child attributes Hide child attributes
message string required

A human-readable message providing more details about the error.

length: 0…500
POST /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

default: 0
range: 0…32767
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 items

Responses

200

Null response

data Doc[]
Show child attributes Hide child attributes
items Doc array items
Show 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.

pattern: ^d[0-9a-z]{15}$
workspace integer <int32> required

A smallint value representing the workspace. It designates the workspace in which the document exists.

range: 0…32767
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 properties
length: 0…200
ready 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.

default

Error response.

error Error required
Show child attributes Hide child attributes
message string required

A human-readable message providing more details about the error.

length: 0…500
GET /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

200

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.

pattern: ^d[0-9a-z]{15}$
workspace integer <int32> required

A smallint value representing the workspace. It designates the workspace in which the document exists.

range: 0…32767
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 properties
length: 0…200
ready 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.

default

Error response.

error Error required
Show child attributes Hide child attributes
message string required

A human-readable message providing more details about the error.

length: 0…500
PUT /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 properties
length: 0…200

Responses

200

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.

pattern: ^d[0-9a-z]{15}$
workspace integer <int32> required

A smallint value representing the workspace. It designates the workspace in which the document exists.

range: 0…32767
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 properties
length: 0…200
ready 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.

default

Error response.

error Error required
Show child attributes Hide child attributes
message string required

A human-readable message providing more details about the error.

length: 0…500
DELETE /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

200

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.

pattern: ^d[0-9a-z]{15}$
workspace integer <int32> required

A smallint value representing the workspace. It designates the workspace in which the document exists.

range: 0…32767
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 properties
length: 0…200
ready 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.

default

Error response.

error Error required
Show child attributes Hide child attributes
message string required

A human-readable message providing more details about the error.

length: 0…500
POST /doc/{docid}/chat

Chat 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.

default: false
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.

default: "gpt-4.1-mini"
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%.

default: 0.1
range: 0.05…0.6
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.

default: true
ocap number

Sets the maximum number of tokens for the generated answer (output capacity). Defaults and maximums vary by model (see GET /models).

default: 1024
adherence string

Controls how strictly the AI's response must adhere to the provided document's content.

enum: "strict", "high", "balanced", "low", "free"
default: "balanced"
lang string

Specifies the desired language for the AI's answer.

enum: "English", "Arabic", "Chinese (Simplified)", "Dutch", "French", "German", "Hindi", "Italian", "Japanese", "Korean", "Portuguese", "Russian", "Spanish", "Swedish", "Turkish"
byok boolean

Set to true to use a Bring Your Own Key (BYOK) model configured in your account.

default: false

Responses

200

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.

401

Unauthorized

error Error required
Show child attributes Hide child attributes
message string required

A human-readable message providing more details about the error.

length: 0…500
423

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.

length: 0…500
default

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.

length: 0…500
POST /doc/{docid}/ocr

Perform 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

200

Expected response to a valid request

queue string[]

workflow id

Show child attributes Hide child attributes
items string array items
401

Unauthorized

error Error required
Show child attributes Hide child attributes
message string required

A human-readable message providing more details about the error.

length: 0…500
default

Error response.

error Error required
Show child attributes Hide child attributes
message string required

A human-readable message providing more details about the error.

length: 0…500
GET /label

List all labels in a given workspace

Query Parameters

offset integer <int32>
default: 0
limit integer <int32>
default: 100

Header Parameters

da-workspace integer

The workspace to use

default: 0
range: 0…32767
Authorization string required

Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>

Responses

200

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 items
Show 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.

range: 0…32767
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 properties
length: 0…200
docids string[] required

Unique identifiers of documents associated with the label

Show child attributes Hide child attributes
items string array items
color string required

The hex color code of the label

default

Error response.

error Error required
Show child attributes Hide child attributes
message string required

A human-readable message providing more details about the error.

length: 0…500
POST /label

Create a label

Header Parameters

da-workspace integer

The workspace to use

default: 0
range: 0…32767
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 properties
length: 0…200
docids string[]

Unique identifiers of documents associated with the label

Show child attributes Hide child attributes
items string array items
color string required

The hex color code of the label

Responses

200

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 items
Show 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.

range: 0…32767
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 properties
length: 0…200
docids string[] required

Unique identifiers of documents associated with the label

Show child attributes Hide child attributes
items string array items
color string required

The hex color code of the label

default

Error response.

error Error required
Show child attributes Hide child attributes
message string required

A human-readable message providing more details about the error.

length: 0…500
POST /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

default: 0
range: 0…32767
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 items

Responses

200

Null response

data Label[]
Show child attributes Hide child attributes
items Label array items
Show 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.

range: 0…32767
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 properties
length: 0…200
docids string[] required

Unique identifiers of documents associated with the label

Show child attributes Hide child attributes
items string array items
color string required

The hex color code of the label

default

Error response.

error Error required
Show child attributes Hide child attributes
message string required

A human-readable message providing more details about the error.

length: 0…500
GET /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

200

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.

range: 0…32767
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 properties
length: 0…200
docids string[] required

Unique identifiers of documents associated with the label

Show child attributes Hide child attributes
items string array items
color string required

The hex color code of the label

default

Error response.

error Error required
Show child attributes Hide child attributes
message string required

A human-readable message providing more details about the error.

length: 0…500
PUT /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 properties
length: 0…200
color 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 items
untag string[]

Untag the document(s) with this label

Show child attributes Hide child attributes
items string array items

Responses

200

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.

range: 0…32767
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 properties
length: 0…200
docids string[] required

Unique identifiers of documents associated with the label

Show child attributes Hide child attributes
items string array items
color string required

The hex color code of the label

default

Error response.

error Error required
Show child attributes Hide child attributes
message string required

A human-readable message providing more details about the error.

length: 0…500
DELETE /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

200

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.

range: 0…32767
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 properties
length: 0…200
docids string[] required

Unique identifiers of documents associated with the label

Show child attributes Hide child attributes
items string array items
color string required

The hex color code of the label

default

Error response.

error Error required
Show child attributes Hide child attributes
message string required

A human-readable message providing more details about the error.

length: 0…500
POST /label/{labelid}/chat

Chat 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.

default: false
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.

default: "gpt-4.1-mini"
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%.

default: 0.1
range: 0.05…0.6
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.

default: true
ocap number

Sets the maximum number of tokens for the generated answer (output capacity). Defaults and maximums vary by model (see GET /models).

default: 1024
adherence string

Controls how strictly the AI's response must adhere to the provided documents' content.

enum: "strict", "high", "balanced", "low", "free"
default: "balanced"
lang string

Specifies the desired language for the AI's answer.

enum: "English", "Arabic", "Chinese (Simplified)", "Dutch", "French", "German", "Hindi", "Italian", "Japanese", "Korean", "Portuguese", "Russian", "Spanish", "Swedish", "Turkish"
byok boolean

Set to true to use a Bring Your Own Key (BYOK) model configured in your account.

default: false

Responses

200

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.

401

Unauthorized

error Error required
Show child attributes Hide child attributes
message string required

A human-readable message providing more details about the error.

length: 0…500
423

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.

length: 0…500
default

Error response.

error Error required
Show child attributes Hide child attributes
message string required

A human-readable message providing more details about the error.

length: 0…500