Skip to main content
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 stringrequired

    Edit session ID

Bodyrequired

    contentstringrequired

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

Responses

OK

Schema
    codestring

    error code

    messagestring

    error message

    data object
    revert_idstring

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

    settingsobject

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