POST
/
v1
/
transforms
/
create
curl --request POST \
  --url https://api.runtrellis.com/v1/transforms/create \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "proj_id": "<string>",
  "actions": {
    "run_on_extract": false
  },
  "transform_name": "<string>",
  "transform_params": {
    "table_preferences": {
      "included_table_names": [
        "<string>"
      ],
      "advanced_reasoning": false
    },
    "model": "<string>",
    "mode": "document",
    "operations": [
      {
        "column_name": "<string>",
        "column_type": "text",
        "transform_type": "extraction",
        "task_description": "Derive the invoice amount from {{Invoices}}, and add it to the rent from {{Rent Amount}}.",
        "output_values": {},
        "has_default": true,
        "default_value": {},
        "api_request": {
          "method": "GET",
          "url": "<string>",
          "header": {},
          "body": {}
        },
        "run_function_code": "<string>",
        "prompt_type": "text",
        "operations": [
          {}
        ]
      }
    ]
  }
}'
{
  "message": "<string>",
  "data": {
    "transform_id": "<string>",
    "operations": {}
  }
}

Authorizations

Authorization
string
header
required

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).

Body

application/json
proj_id
string
required

The id of the project.

transform_params
object
required
actions
object

Enable actions specific to this transformation.

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.

Response

200
application/json
Successful Response
message
string
required
data
object
required