> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markifact.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Structure

> Use AI to convert unstructured text or documents into structured JSON data using custom schemas fields you provide

Use AI to convert unstructured text or documents into structured JSON data using custom schemas fields you provide.

|                     |                |
| ------------------- | -------------- |
| **App**             | AI             |
| **Operation ID**    | `ai_structure` |
| **Type**            | Action         |
| **Connection**      | None           |
| **Credits per run** | 2              |

## Inputs

| Field           | Type                       | Required | Default | Description                                                                                                                                                                                                                                                                                                                                                                                                                    |
| --------------- | -------------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `prompt`        | string                     | Yes      | -       | Instructions for how to structure the data. This is a multi-line text area where you can: - Describe what data to extract or analyze - Reference dynamic data from other nodes using \{\{nodeId\_\_data}} syntax - Specify formatting requirements - Use line breaks to structure complex instructions  Example: "Structure this customer data: \{\{customerNodeId\_\_data}} Extract key information and organize it properly" |
| `model`         | string or SelectableOption | Yes      | -       | The AI model to use for data structuring. Some available options: 'gpt-5.2' - Latest openai model with advanced capabilities 'gemini-3.1-pro-preview' - Google's most powerful model 'gemini-3.5-flash' - Fast, efficient Gemini 3 variant Note: Some models require Advanced tier subscription.                                                                                                                               |
| `schema_type`   | string or SelectableOption | No       | -       | The type of structured output format. Available options: 'object' - Return one structured object 'array' - Return multiple structured objects  Choose based on whether you expect one result or multiple results.                                                                                                                                                                                                              |
| `schema_fields` | array of SchemaField       | Yes      | -       | Define the structure for the output data. Each field specifies: - name: The variable name for this field - type: The data type (text, number, boolean, etc.) - description: What this field should contain This ensures the AI returns data in the exact format you need for downstream processing.                                                                                                                            |

### SchemaField

| Field         | Type   | Required | Default | Description                                                                   |
| ------------- | ------ | -------- | ------- | ----------------------------------------------------------------------------- |
| `name`        | string | Yes      | -       | The name of the field.                                                        |
| `type`        | string | Yes      | -       | Data type of the field, available types: text, number, boolean, object, list. |
| `description` | string | Yes      | -       | Description of the field.                                                     |

### SelectableOption

| Field   | Type   | Required | Default | Description |
| ------- | ------ | -------- | ------- | ----------- |
| `value` | string | Yes      | -       |             |
| `label` | string | Yes      | -       |             |

## Output

**Type**: `List[Dict] | Dict`

Returns structured data matching the provided schema\_fields. Output is either a list or single object based on 'schema\_type' set by user.

**Fields**: dynamic (depend on the inputs)

**Example**:

```json theme={"dark"}
[
  {
    "name": "John",
    "email": "john@example.com",
    "score": 85
  }
]
```
