---
title: "Save Generated File"
method: POST
path: "/api/batch/save-generated-file"
tags: ["Batch Processing"]
---

# Save Generated File

`POST /api/batch/save-generated-file`

Save an AI-generated file to the library or send it to the parsing pipeline.

Actions:
- save_to_library: Saves as an Excel template (for excel/csv) or stores the document
- send_to_parsing: Creates a batch and triggers OCR processing

## Request body

- SaveGeneratedFileRequest
  - `s3_key` string, required
  - `filename` string, required
  - `action` string, required
  - `file_type` string

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/qomplement/apis/fastapi.md) · [All operations](https://skmtc.net/qomplement/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/qomplement/fastapi/versions/718de1c0d866/schema)
