AI API
POST/api/v1/ai/document-assist
Product availabilityAlgaPSA

AI document assistance (streaming, EE)

Streams AI-generated document edits using the tenant's configured LLM provider. Enterprise Edition feature gated by the AI add-on tier and a feature flag; authenticated with the AI_DOCUMENT_API_KEY via the x-api-key header. Returns a streamed text response (501 on Community Edition).

Request body

Content type: application/json · schema AiDocumentAssistBody

instructionstringRequired
What the assistant should do.
documentContextstringRequired
Current document text/context.
documentIdstring <uuid>
tenantIdstring <uuid>Required
connectedUserNamesarray of string
itemsstring

Response body

Success response 200 · schema PublicV1Success

dataanyOfRequired
anyOf (option 1)object
anyOf (option 2)array of object
itemsobject
metaobject

Response codes

200
Streamed AI edit suggestions (text/event-stream).
401
AI_DOCUMENT_API_KEY missing/invalid.
403
AI add-on/feature flag not enabled.
500
Unexpected error.
501
Not available on Community Edition.