---
title: "Process a file into chunks ready for vector database storage."
method: POST
path: "/v1alpha/file-processors/process"
tags: ["File Processors"]
---

# Process a file into chunks ready for vector database storage.

`POST /v1alpha/file-processors/process`

Process a file into chunks ready for vector database storage. Supports direct upload via multipart form or processing files already uploaded to file storage via file_id. Exactly one of file or file_id must be provided.

## Response `200`

The processed file chunks.

- ProcessFileResponse — Response model for file processing operation. Returns a list of chunks ready for storage in vector databases. Each chunk contains the content and metadata.
  - `chunks` Chunk[], required — Processed chunks from the file. Always returns at least one chunk.
    - `content` union, required
      - string
      - ImageContentItemOutput — A image content item
        - `type` 'image'
        - `image` URLOrData, required — A URL or a base64 encoded string
          - `url` URL — A URL reference to external content.
            - `uri` string, required
          - `data` string, byte, nullable
      - TextContentItem — A text content item
        - `type` 'text'
        - `text` string, required
      - union[]
        - union
          - ImageContentItemOutput — A image content item
            - `type` 'image'
            - `image` URLOrData, required — A URL or a base64 encoded string
              - …
          - TextContentItem — A text content item
            - `type` 'text'
            - `text` string, required
    - `chunk_id` string, required
    - `metadata` object
    - `chunk_metadata` ChunkMetadata, required — `ChunkMetadata` is backend metadata for a `Chunk` that is used to store additional information about the chunk that will not be used in the context during inference, but is required for backend functionality. The `ChunkMetadata` is set during chunk creation in `FileSearchToolRuntimeImpl().insert()`and is not expected to change after. Use `Chunk.metadata` for metadata that will be used in the context during inference.
      - `chunk_id` string, nullable
      - `document_id` string, nullable
      - `source` string, nullable
      - `created_timestamp` integer, nullable
      - `updated_timestamp` integer, nullable
      - `chunk_window` string, nullable
      - `chunk_tokenizer` string, nullable
      - `content_token_count` integer, nullable
      - `metadata_token_count` integer, nullable
  - `metadata` object, required — Processing-run metadata such as processor name/version, processing_time_ms, page_count, extraction_method (e.g. docling/pypdf/ocr), confidence scores, plus provider-specific fields.

## Other responses

- `400` — The request was invalid or malformed
- `429` — The client has sent too many requests in a given amount of time
- `500` — The server encountered an unexpected error
- `default` — An error occurred

---

[API](https://skmtc.net/ogx-ai/apis/ogx-specification-stable-experimental-apis.md) · [All operations](https://skmtc.net/ogx-ai/apis/ogx-specification-stable-experimental-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ogx-ai/ogx-specification-stable-experimental-apis/versions/f3f783962256/schema)
