---
title: "Create Transform"
method: POST
path: "/v1/transforms/create"
tags: ["transforms", "public"]
---

# Create Transform

`POST /v1/transforms/create`

Run the transformation defined in transformation params for all the assets in the project

Args:
    transform_id (str): The ID of the transformation to run.

Returns:
    {"message": "Transformation initiated", "transform_id": transform_id}

## Headers

- `API-Version` string — Pass in an API version to guarantee a consistent response format. The latest version should be used for all new API calls. Existing API calls should be updated to the latest version when possible. **Valid versions:** - Latest API version (recommended): `2025-03` - Previous API version (maintenance mode): `2025-02` If no API version header is included, the response format is considered unstable and could change without notice (not recommended).

## Request body

- TransformationRequest
  - `proj_id` string, required — The id of the project.
  - `actions` TransformationRequestActions
    - `run_on_extract` boolean — Enable immediate transformation runs on asset uploaded and extracted
  - `transform_name` string — The transform_name parameter is an optional parameter that provides a human-readable name or description for the transformation, which can be useful for identifying and referencing transformations. If provided, the transform_name parameter should be a string. If not provided, the value of transform_name will be None.
  - `transform_params` TransformParams, required
    - `table_preferences` TablePreferences
      - `included_table_names` string[] — Parameter that specifies the table names to be included for table transforms.
      - `advanced_reasoning` boolean — Using advanced reasoning when extracting rows from the tables. Transformation becomes slower and more computationally intensive
    - `model` string, required — The model to be used for the transformation. Must be one of 'trellis-scale', 'trellis-premium', or 'trellis-vertix'
    - `mode` string — The mode to be used for the transformation. Must be one of 'document' or 'table'
    - `operations` BaseTransformOperation[] — A list of columns used to extract, classify and generate data from your assets. At least one column of `transform_type = 'parse'` and `column_type = 'assets'` is required. If your account was created before March 1st, we will automatically create an `assets`-type column on transform creation.
      - `column_name` string, required — Name of the column to be transformed. Any alphanumeric characters are allowed. Must be unique.
      - `column_type` 'text' | 'integer' | 'numeric' | 'boolean' | 'list' | 'object' | 'string' | 'number' | 'time' | 'date' | 'text[]' | 'jsonb' | 'assets' | 'short_text' | 'single_select' | 'multi_select' | 'row_relation', required — An enumeration.
      - `transform_type` 'extraction' | 'classification' | 'generation' | 'manual' | 'api_request' | 'parse' | 'run_function', required — An enumeration.
      - `task_description` string, required — Description of the task to be performed. If `transform_type` is not one of [`parse`, `manual`], the task description must contain a reference to another column. Otherwise, the task description may be left blank.
      - `output_values` object — NOTE: only valid with classification tasks. Output values of the transformation operation.
      - `has_default` boolean — If true, use the default value specified in default_value. If false, return null if no value found.
      - `default_value` object — The default value to use if has_default is true and no value is found in the document. The value you should return is stored under the 'value' key.
      - `api_request` ApiRequestParam
        - `method` 'GET' | 'POST', required — An enumeration.
        - `url` string, required — URL endpoint for the API request.
        - `headers` object — Headers to include with the API request.
        - `body` object — JSON body to send with the API request (for POST).
      - `run_function_code` string — For transform_type='run_function', the javascript code to run on AWS lambda
      - `prompt_type` 'text' | 'multimodal' — An enumeration.
      - `options` SelectOption[] — Options for select fields.
        - `name` string, required
        - `visual_index` integer, required
        - `color` 'red' | 'blue' | 'orange' | 'yellow' | 'green' | 'gray', required
        - `linked_entity_id` string — The ID of the entity this option belongs to. This is used for entity field options.
      - `key_names_order` string[] — For object column types, the order of keys to maintain.
      - `operations` BaseTransformOperation[] — Required when column_type is `object` or `list`. Defines the structure of object or list operations. If column_type is `list`, then operations should only be of length 1 since `list` can only be of one type. If column_type is `object`, then operations can be longer of length one (and optionally be nested.)

## Response `200`

Successful Response

- CreateTransformResponse
  - `message` string, required
  - `data` CreateTransformBaseResponse, required
    - `transform_id` string, required
    - `operations` object

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `408` — Request Timeout
- `422` — Unprocessable Entity
- `429` — Too Many Requests
- `500` — Internal Server Error

---

[API](https://skmtc.dev/runtrellis/apis/trellis.md) · [All operations](https://skmtc.dev/runtrellis/apis/trellis/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/runtrellis/trellis/revisions/b7d8570ff3cc/schema)
