API
依頼文からテンプレートをデザインする
デザイナーが書いた内容から新しいブロックテンプレートを作る。
POST/templates/design
実際の呼び出しをワークスペースに対して実行します。
POST /templates/design
デザイナーが書いた内容から新しいブロックテンプレートを作る。
例
templates:write が必要。brief にはデザインが伝えるべき内容と見た目をすべて書く。starter はスターターデザインをもとにし、imageFileIds は最大 10 枚の画像を配置し、publish はすぐに公開する。テンプレートと design を付けて 201 を返す。
curl -X POST "$OE/templates/design" -H "$AUTH" -H "Content-Type: application/json" \ -d '{ "name": "Spring launch", "brief": "A launch email for our spring collection: a hero image, three product cards and a button to the shop. Green and cream, friendly tone." }'{ "object": "template", "id": "tpl_8f3a1c2e9b7d4a60", "name": "Spring launch", "slug": "spring-launch", "status": "draft", "publishedVersion": null, "latestVersion": 1, "design": { "subject": "Spring is here", "notes": [], "imageProblems": [] }}AI アクションを 1 回消費し、最大 1 分ほどかかる。有効にできないデザインは 422 invalid_template、AI アクションを使い切ったワークスペースは 429 ai_quota_exceeded になる。
一部のアドレスに限定されたキーが届かない画像は使われず、design.imageProblems に挙げられる。