---
updatedAt: 2026-04-21T03:46:21.000Z
agentTools:
  projectIndex: https://help.rainforestqa.com/llms.txt
---

# Create a new generator

Create a new generator

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Rainforest API Documentation",
    "description": "Nearly all interactions done on in Rainforest can be done in via the API.<br/><br/>Find your API Token (for the CLIENT_TOKEN header field) on the <a href=\"https://app.rainforestqa.com/settings/integrations\">integration settings</a> page.",
    "version": "1"
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "tags": [
    {
      "name": "generators",
      "description": "Operations about generators"
    }
  ],
  "paths": {
    "/1/generators": {
      "post": {
        "summary": "Create a new generator",
        "description": "Create a new generator",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/post-generators"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Generator created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Generator"
                }
              }
            }
          },
          "400": {
            "description": "Generator could not be created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "generators"
        ],
        "operationId": "post-generators",
        "x-rdme-order": 2
      }
    }
  },
  "servers": [
    {
      "url": "//app.rainforestqa.com/api"
    }
  ],
  "components": {
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "name": "CLIENT_TOKEN",
        "in": "header"
      }
    },
    "schemas": {
      "Generator": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "name": {
            "type": "string",
            "description": "Name of generator"
          },
          "description": {
            "type": "string",
            "description": "Description of generator"
          },
          "generator_type": {
            "type": "string",
            "enum": [
              "builtin",
              "custom",
              "tabular"
            ]
          },
          "single_use": {
            "type": "boolean",
            "description": "Whether this generator's rows are deleted after a single use or not"
          },
          "reusable": {
            "type": "boolean",
            "description": "Whether this generator is reusable within a run or not"
          },
          "columns": {
            "$ref": "#/components/schemas/GeneratorColumn"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Array of JSON objects representing rows of data: keys represent column names, values represent the generator values"
          },
          "row_count": {
            "type": "integer",
            "format": "int32"
          },
          "related_tests_count": {
            "type": "integer",
            "format": "int32"
          },
          "related_archived_tests_count": {
            "type": "integer",
            "format": "int32"
          },
          "related_snippets_count": {
            "type": "integer",
            "format": "int32"
          },
          "related_archived_snippets_count": {
            "type": "integer",
            "format": "int32"
          }
        },
        "description": "Generator model"
      },
      "GeneratorColumn": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "An error message describing what went wrong"
          }
        },
        "required": [
          "error"
        ],
        "description": "Error model"
      },
      "post-generators": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of generator"
          },
          "description": {
            "type": "string",
            "description": "Description of generator"
          },
          "generator_type": {
            "type": "string",
            "description": "Generator type",
            "enum": [
              "custom",
              "tabular"
            ],
            "default": "tabular"
          },
          "data": {
            "type": "array",
            "description": "Array of generator row data objects",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "columns": {
            "type": "array",
            "description": "Array of column names",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Column name"
                }
              },
              "required": [
                "name"
              ]
            }
          },
          "reusable": {
            "type": "boolean",
            "description": "Whether this generator is to be reusable across tests within a run (only applies for tabular generators)",
            "default": false
          },
          "single_use": {
            "type": "boolean",
            "description": "Whether this generator's rows will be removed after a single use (only applies for tabular generators)",
            "default": false
          },
          "slim": {
            "type": "boolean",
            "description": "If true, returns less data in order to reduce latency and response size",
            "default": false
          }
        },
        "required": [
          "name",
          "description"
        ],
        "description": "Create a new generator"
      }
    }
  }
}
```