generate_dataset_file_summaries

DatasetsApi.generate_dataset_file_summaries(id, role_id, generate_summary_input_body, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Trigger AI summarization for dataset files

Starts asynchronous AI summarization for one or more successfully loaded text/pdf files in an s3-target dataset. Caller must have editor or owner access. Datasets AI service must be enabled (else AI-1004). Sets SummaryGenerationStatus to summarizing and starts the AI operations step function. Success Message is “Successfully triggered AI operation: ‘summarize’ on the dataset.” Not idempotent while files are already summarizing/summarized (IPV-1020).

Parameters:
  • id (str) – Dataset ID. Must be active s3-target dataset (structured/DWH targets return DS-1040). (required)

  • role_id (str) – Amorphic role ID the request is authorized against. Must grant editor or owner access on the dataset. (required)

  • generate_summary_input_body (GenerateSummaryInputBody) – (required)

  • _request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

  • _content_type (str, Optional) – force content-type for the request.

  • _headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.

  • _host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.

Return type:

GenerateDatasetFileSummariesResponse

Returns:

Returns the result object.

Request and Response Examples

HTTP: POST /datasets/{id}/files/summarize

Parameter examples

Name

In

Example

id

path

"b1e6c2a0-9f4d-4c7a-8f2e-1a2b3c4d5e6f"

Request

Request / response example

{
  "Files": [
    "sales/monthly_orders/upload_date=2026-08-01/notes.txt",
    "sales/monthly_orders/upload_date=2026-08-01/report.pdf"
  ]
}

Success (HTTP 200)

Summarization triggered. Message is “Successfully triggered AI operation: ‘summarize’ on the dataset.”

Request / response example

{
  "Message": "Successfully triggered AI operation: 'summarize' on the dataset."
}

Errors

Documented error codes: AI-1004, DS-1040, IPV-1020.

HTTP 400

Validation or authorization failure. Body is {“Message”: “<CODE> - <text>”}. Codes: AI-1004 (Datasets AI disabled), DS-1040 (non-s3), IPV-1020 (bad/empty/already summarized Files), AUTH-* (not editor+).

Datasets AI not enabled

{
  "Message": "AI-1004 - AI service Datasets is not enabled"
}

Files list invalid or already summarized

{
  "Message": "IPV-1020 - Input parameter 'Files' should not be empty."
}

HTTP 500

Something went wrong at backend. Input, permission and file-state errors - such as an unsupported file type, a file that is already processed, or a dataset you cannot access - are also reported here.

Summarization already completed for the file

{
  "Message": "IPV-1020 - Input file sales/monthly_orders/upload_date=1785146328/jdoe_b1e6c2a0-9f4d-4c7a-8f2e-1a2b3c4d5e6f_1785146328_quarterly_report.pdf is already summarized."
}

File is not a successfully loaded dataset file

{
  "Message": "IPV-1020 - Input file sales/monthly_orders/upload_date=1785146328/jdoe_b1e6c2a0-9f4d-4c7a-8f2e-1a2b3c4d5e6f_1785146328_quarterly_report.pdf not found in the list of successfully loaded files in the Dataset."
}

Dataset is not an S3 target

{
  "Message": "DS-1040 - Data labelling is not supported yet for structured Datasets."
}