Skip to main content
 print this page

Artificial Intelligence

APIs related to AI components such as models, agents, knowldegebases, guardrails, chats, notes etc.

📄️ List, download, or preview files

Omit action (or any value other than download/preview) to list files. List with chat_id returns that chat's files plus global files (chat_id is used as-is; pass project-files-{project_id} to list a project's files). List without chat_id returns accessible chat, project, and global files. Default offset 1, limit 5000 (max 5000), sortby UploadTime, sortorder desc. action=download or preview requires file_name; chat_id defaults to the user's global files (use global). project_id (not N/A) targets project files. Preview of csv/tsv/txt/json/sql returns {data}; otherwise {PresignedURL}. No request body.

📄️ Start a knowledge base sync job

Starts an asynchronous sync and returns JobRunId. Requires editor access. Unstructured: omit SourceIds to sync all attached sources (ExecutionScope KnowledgeBase). If SourceIds is present, those Bedrock source IDs are synced (ExecutionScope Datasource) and must already be attached. Structured: the body is ignored and the whole knowledge base is synced. Fails if a JobRun is already RUNNING, if no sources are attached, or if an unstructured embedding model is not assigned.

📄️ Query an unstructured knowledge base

Vector-retrieves relevant chunks and generates an answer. Unstructured knowledge bases only. Structured knowledge bases are not queried on this path (they have no embedding model and this handler does not call the structured retrieve-and-generate flow). Requires at least read-only access. modelId must be a TEXT model assigned to knowledge bases. Optional SourceId (Bedrock data source ID) and FileName (source URI) scope retrieval. Citations are not returned on this REST path. Fails if no sources are attached or the embedding model is not assigned.