---
title: "Setup Custom Pre-Processor"
method: POST
path: "/v1/preprocess"
tags: ["Preprocessor"]
---

# Setup Custom Pre-Processor

`POST /v1/preprocess`

Initializes a custom pre-processor that can be applied to your content and search queries.

## Request body

- PreprocessorSetupRequest
  - `description` string — A human readable description for your pre-processor
  - `name` string — A human readable name for your pre-processor
  - `script` string[] — An array of GroundedScript commands

## Response `200`

Pre-processor successfully setup

- PreprocessorSetupResponse
  - `preprocess` object
    - `preprocessors` object[]
      - `id` string — preprocessor ID

## Other responses

- `400` — Invalid script
- `401` — Permission denied

## Changes

- **2023-10-04** `7d474e21a108` — 2 info
  - api operation id `setupCustomPreprocessor` removed and replaced with `Preprocessor_setup`
  - api tag `Preprocessor` added
- **2023-10-04** `79c42de78d2f` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/groundxai/apis/groundx-apis/changes/v1/preprocess/post.md)

---

[API](https://skmtc.dev/groundxai/apis/groundx-apis.md) · [All operations](https://skmtc.dev/groundxai/apis/groundx-apis/llms.txt) · [OpenAPI document](https://skmtc.dev/groundxai/apis/groundx-apis/revisions/9509f106916e?raw)
