**Version: 202601**

# Create AI card

**POST** `/openapi/2026-01/themes/edit-sessions/:oseid/gen-blocks`

Create an AI card from liquid code (must contain a `{% schema %}` tag) within an edit session. The response `settings` is the card's full default config and can be used directly to place the card on a page.

## Request

**Path Parameters**

- `oseid` string (required)

  Edit session ID

**application/json**

**Body | Example**

**Body (required)**

- `content` string (required)

  Card liquid source; must contain a schema tag. `schema.name` inside is the merchant-visible display name (no uniqueness requirement)

```json
{
  "content": "string"
}
```

## Responses

**200**

OK

**application/json**

**Schema | Example**

**Schema**

- `code` string

  error code
- `message` string

  error message
- `data` object

  - `revert_id` string

    Token to revert this creation (see gen-blocks/revert)
  - `settings` object

    The card's full default config — the schema's whole content, with `type` set to the `card_type` used for page arrangement

```json
{
  "code": "string",
  "message": "string",
  "data": {
    "revert_id": "string",
    "settings": {}
  }
}
```
