{ "openapi": "3.1.0", "info": { "title": "AutoContent Platform API", "version": "1.0.0", "description": "First-class content Assets with prepaid USD billing. Generic document and video routes do not exist." }, "servers": [ { "url": "https://api.autocontentapi.com/v1" } ], "paths": { "/projects": { "post": { "operationId": "createProject", "summary": "Create a Project from one website URL", "tags": [ "projects" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.write" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": true, "parameters": [ { "name": "Idempotency-Key", "in": "header", "required": true, "description": "1–255 visible ASCII bytes; UUID recommended.", "schema": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[!-~]+$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "website_url": { "type": "string", "minLength": 1, "maxLength": 2048, "format": "uri", "x-max-utf8-bytes": 2048 } }, "required": [ "website_url" ], "additionalProperties": false } } } }, "responses": { "202": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectCreateAccepted" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } }, "get": { "operationId": "listProjects", "summary": "List Projects", "tags": [ "projects" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.read" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string", "minLength": 1, "maxLength": 4096 } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(?:[1-9]|[1-9][0-9]|100)$" } }, { "name": "status", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "analyzing", "needs_review", "ready", "failed", "archived" ] } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data", "next_cursor" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Project" } }, "next_cursor": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] } } } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/projects/{id}": { "get": { "operationId": "getProject", "summary": "Get a Project and analysis status", "tags": [ "projects" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.read" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Project" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } }, "patch": { "operationId": "updateProject", "summary": "Edit and confirm a Project profile", "tags": [ "projects" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.write" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": true, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" } }, { "name": "Idempotency-Key", "in": "header", "required": true, "description": "1–255 visible ASCII bytes; UUID recommended.", "schema": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[!-~]+$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 200, "x-max-utf8-bytes": 200 }, "description": { "type": "string", "minLength": 0, "maxLength": 4000, "x-max-utf8-bytes": 4000 }, "category": { "type": "string", "minLength": 0, "maxLength": 500, "x-max-utf8-bytes": 500 }, "audience": { "type": "string", "minLength": 0, "maxLength": 2000, "x-max-utf8-bytes": 2000 }, "relevant_keywords": { "maxItems": 50, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 200, "x-max-utf8-bytes": 200 } }, "competitor_keywords": { "maxItems": 50, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 200, "x-max-utf8-bytes": 200 } }, "excluded_keywords": { "maxItems": 50, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 200, "x-max-utf8-bytes": 200 } }, "allow_competitor_mentions": { "type": "boolean" }, "research_locale": { "type": "string", "minLength": 2, "maxLength": 255, "format": "bcp47" }, "crawl_scope": { "type": "object", "properties": { "root_url": { "type": "string", "minLength": 1, "maxLength": 2048, "format": "uri", "x-max-utf8-bytes": 2048 } }, "required": [ "root_url" ], "additionalProperties": false }, "brand": { "type": "object", "properties": { "colors": { "maxItems": 8, "type": "array", "items": { "type": "string", "pattern": "^#[0-9A-F]{6}$" } }, "instructions": { "type": "string", "minLength": 0, "maxLength": 2000, "x-max-utf8-bytes": 2000 }, "default_voice_id": { "anyOf": [ { "type": "string", "pattern": "^voice_[A-Za-z0-9_-]+$" }, { "type": "null" } ] }, "default_avatar_id": { "anyOf": [ { "type": "string", "pattern": "^avatar_[A-Za-z0-9_-]+$" }, { "type": "null" } ] } }, "additionalProperties": false }, "confirmed": { "type": "boolean", "const": true } }, "additionalProperties": false } } } }, "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Project" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } }, "delete": { "operationId": "archiveProject", "summary": "Archive a Project and its Loops", "tags": [ "projects" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.write" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Project" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/projects/{id}/logo": { "put": { "operationId": "replaceProjectLogo", "summary": "Replace the primary Project logo revision", "tags": [ "projects" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.write" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": true, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" } }, { "name": "Idempotency-Key", "in": "header", "required": true, "description": "1–255 visible ASCII bytes; UUID recommended.", "schema": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[!-~]+$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "source_url": { "type": "string", "minLength": 1, "maxLength": 2048, "format": "uri", "x-max-utf8-bytes": 2048 } }, "required": [ "source_url" ], "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "additionalProperties": false, "required": [ "file" ], "properties": { "file": { "type": "string", "format": "binary" } } } } } }, "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Project" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } }, "delete": { "operationId": "removeProjectLogo", "summary": "Clear the primary Project logo for future work", "tags": [ "projects" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.write" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Project" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/projects/{id}/refresh": { "post": { "operationId": "refreshProject", "summary": "Refresh Project website analysis", "tags": [ "projects" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.write" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": true, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" } }, { "name": "Idempotency-Key", "in": "header", "required": true, "description": "1–255 visible ASCII bytes; UUID recommended.", "schema": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[!-~]+$" } } ], "responses": { "202": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Project" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/projects/{id}/collections": { "post": { "operationId": "createCollection", "summary": "Create a Source collection", "tags": [ "projects" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.write" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": true, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" } }, { "name": "Idempotency-Key", "in": "header", "required": true, "description": "1–255 visible ASCII bytes; UUID recommended.", "schema": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[!-~]+$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 200, "x-max-utf8-bytes": 200 } }, "required": [ "name" ], "additionalProperties": false } } } }, "responses": { "201": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Collection" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } }, "get": { "operationId": "listCollections", "summary": "List Source collections", "tags": [ "projects" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.read" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string", "minLength": 1, "maxLength": 4096 } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(?:[1-9]|[1-9][0-9]|100)$" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data", "next_cursor" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Collection" } }, "next_cursor": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] } } } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/collections/{id}": { "patch": { "operationId": "updateCollection", "summary": "Rename a Source collection", "tags": [ "collections" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.write" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 200, "x-max-utf8-bytes": 200 } }, "required": [ "name" ], "additionalProperties": false } } } }, "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Collection" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } }, "delete": { "operationId": "deleteCollection", "summary": "Delete an empty Source collection", "tags": [ "collections" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.write" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" } } ], "responses": { "204": { "description": "Deleted successfully; no response body." }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/projects/{id}/sources": { "post": { "operationId": "createSource", "summary": "Add a Project Source", "tags": [ "projects" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.write" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": true, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" } }, { "name": "Idempotency-Key", "in": "header", "required": true, "description": "1–255 visible ASCII bytes; UUID recommended.", "schema": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[!-~]+$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "const": "url" }, "url": { "type": "string", "minLength": 1, "maxLength": 2048, "format": "uri", "x-max-utf8-bytes": 2048 }, "title": {}, "collection_id": { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" } }, "required": [ "type", "url" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "youtube" }, "url": { "type": "string", "minLength": 1, "maxLength": 2048, "format": "uri", "x-max-utf8-bytes": 2048 }, "title": {}, "collection_id": { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" } }, "required": [ "type", "url" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "text" }, "text": {}, "title": {}, "collection_id": { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" } }, "required": [ "type", "text", "title" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "product_visual" }, "url": { "type": "string", "minLength": 1, "maxLength": 2048, "format": "uri", "x-max-utf8-bytes": 2048 }, "title": {}, "collection_id": { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" } }, "required": [ "type", "url" ], "additionalProperties": false } ] } }, "multipart/form-data": { "schema": { "type": "object", "additionalProperties": false, "required": [ "file" ], "properties": { "file": { "type": "string", "format": "binary" }, "collection_id": { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" }, "title": { "type": "string", "minLength": 1, "maxLength": 500, "x-max-utf8-bytes": 500 }, "keep_as_project_asset": { "type": "boolean", "default": true, "description": "Set false to keep the upload request-only; it expires after 24 hours unless claimed by a Generation." } } } } } }, "responses": { "202": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Source" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } }, "get": { "operationId": "listSources", "summary": "List Project Sources", "tags": [ "projects" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.read" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string", "minLength": 1, "maxLength": 4096 } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(?:[1-9]|[1-9][0-9]|100)$" } }, { "name": "collection_id", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" } }, { "name": "query", "in": "query", "required": false, "schema": { "type": "string", "minLength": 1, "maxLength": 200, "x-max-utf8-bytes": 200 } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data", "next_cursor" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Source" } }, "next_cursor": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] } } } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/sources/{id}": { "get": { "operationId": "getSource", "summary": "Get Source ingestion status and revision", "tags": [ "sources" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.read" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Source" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } }, "delete": { "operationId": "removeSource", "summary": "Remove a Source from future Generations", "tags": [ "sources" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.write" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Source" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/sources/{id}/refresh": { "post": { "operationId": "refreshSource", "summary": "Refresh a remote Source", "tags": [ "sources" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.write" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": true, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" } }, { "name": "Idempotency-Key", "in": "header", "required": true, "description": "1–255 visible ASCII bytes; UUID recommended.", "schema": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[!-~]+$" } } ], "responses": { "202": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Source" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/asset-types": { "get": { "operationId": "listAssetTypes", "summary": "List first-class Asset contracts", "tags": [ "asset-types" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.read" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string", "minLength": 1, "maxLength": 4096 } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(?:[1-9]|[1-9][0-9]|100)$" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "catalog_version", "data", "next_cursor" ], "properties": { "catalog_version": { "type": "string", "minLength": 1 }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/AssetTypeDefinition" } }, "next_cursor": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] } } } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/models": { "get": { "operationId": "listModels", "summary": "List pinnable models for an Asset type", "tags": [ "models" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.read" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string", "minLength": 1, "maxLength": 4096 } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(?:[1-9]|[1-9][0-9]|100)$" } }, { "name": "asset_type", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "article", "lead_magnet", "ebook", "slides", "infographic", "quiz", "podcast_episode", "short_video", "explainer_video", "launch_video", "product_demo_video", "ad_video" ] } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "catalog_version", "data", "next_cursor" ], "properties": { "catalog_version": { "type": "string", "minLength": 1 }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/Model" } }, "next_cursor": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] } } } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/voices": { "get": { "operationId": "listVoices", "summary": "List compatible stock and Project Voices", "tags": [ "voices" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.read" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string", "minLength": 1, "maxLength": 4096 } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(?:[1-9]|[1-9][0-9]|100)$" } }, { "name": "project_id", "in": "query", "required": true, "schema": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" } }, { "name": "asset_type", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "article", "lead_magnet", "ebook", "slides", "infographic", "quiz", "podcast_episode", "short_video", "explainer_video", "launch_video", "product_demo_video", "ad_video" ] } }, { "name": "model", "in": "query", "required": false, "schema": { "type": "string", "minLength": 1, "maxLength": 200 } }, { "name": "language", "in": "query", "required": false, "schema": { "type": "string", "minLength": 2, "maxLength": 255, "format": "bcp47" } }, { "name": "kind", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "stock", "custom" ] } }, { "name": "status", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "processing", "ready", "failed", "revoked" ] } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data", "next_cursor" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Voice" } }, "next_cursor": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] } } } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/projects/{id}/voices": { "post": { "operationId": "createVoice", "summary": "Create a consented custom Project Voice", "tags": [ "projects" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.generate" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": true, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" } }, { "name": "Idempotency-Key", "in": "header", "required": true, "description": "1–255 visible ASCII bytes; UUID recommended.", "schema": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[!-~]+$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "source_url": { "type": "string", "minLength": 1, "maxLength": 2048, "format": "uri", "x-max-utf8-bytes": 2048 }, "display_name": { "type": "string", "minLength": 1, "maxLength": 80, "x-max-utf8-bytes": 80 }, "consent_attested": { "type": "boolean", "const": true }, "ownership_attested": { "type": "boolean", "const": true } }, "required": [ "source_url", "display_name", "consent_attested", "ownership_attested" ], "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "additionalProperties": false, "required": [ "file", "display_name", "consent_attested", "ownership_attested" ], "properties": { "file": { "type": "string", "format": "binary" }, "display_name": { "type": "string", "minLength": 1, "maxLength": 80, "x-max-utf8-bytes": 80 }, "consent_attested": { "type": "boolean", "const": true }, "ownership_attested": { "type": "boolean", "const": true } } } } } }, "responses": { "202": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Voice" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/voices/{id}": { "get": { "operationId": "getVoice", "summary": "Get a visible Voice and readiness state", "tags": [ "voices" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.read" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^voice_[A-Za-z0-9_-]+$" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Voice" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } }, "delete": { "operationId": "revokeVoice", "summary": "Revoke a custom Project Voice", "tags": [ "voices" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.generate" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^voice_[A-Za-z0-9_-]+$" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Voice" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/avatars": { "get": { "operationId": "listAvatars", "summary": "List compatible stock and Project Avatars", "tags": [ "avatars" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.read" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string", "minLength": 1, "maxLength": 4096 } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(?:[1-9]|[1-9][0-9]|100)$" } }, { "name": "project_id", "in": "query", "required": true, "schema": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" } }, { "name": "asset_type", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "short_video", "explainer_video", "launch_video", "product_demo_video", "ad_video" ] } }, { "name": "model", "in": "query", "required": false, "schema": { "type": "string", "minLength": 1, "maxLength": 200 } }, { "name": "language", "in": "query", "required": false, "schema": { "type": "string", "minLength": 2, "maxLength": 255, "format": "bcp47" } }, { "name": "kind", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "stock", "custom" ] } }, { "name": "status", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "processing", "ready", "failed", "revoked" ] } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data", "next_cursor" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Avatar" } }, "next_cursor": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] } } } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/projects/{id}/avatars": { "post": { "operationId": "createAvatar", "summary": "Create a consented custom Project Avatar", "tags": [ "projects" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.generate" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": true, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" } }, { "name": "Idempotency-Key", "in": "header", "required": true, "description": "1–255 visible ASCII bytes; UUID recommended.", "schema": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[!-~]+$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "source_url": { "type": "string", "minLength": 1, "maxLength": 2048, "format": "uri", "x-max-utf8-bytes": 2048 }, "display_name": { "type": "string", "minLength": 1, "maxLength": 80, "x-max-utf8-bytes": 80 }, "consent_attested": { "type": "boolean", "const": true }, "ownership_attested": { "type": "boolean", "const": true } }, "required": [ "source_url", "display_name", "consent_attested", "ownership_attested" ], "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "additionalProperties": false, "required": [ "file", "display_name", "consent_attested", "ownership_attested" ], "properties": { "file": { "type": "string", "format": "binary" }, "display_name": { "type": "string", "minLength": 1, "maxLength": 80, "x-max-utf8-bytes": 80 }, "consent_attested": { "type": "boolean", "const": true }, "ownership_attested": { "type": "boolean", "const": true } } } } } }, "responses": { "202": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Avatar" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/avatars/{id}": { "get": { "operationId": "getAvatar", "summary": "Get a visible Avatar and readiness state", "tags": [ "avatars" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.read" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^avatar_[A-Za-z0-9_-]+$" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Avatar" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } }, "delete": { "operationId": "revokeAvatar", "summary": "Revoke a custom Project Avatar", "tags": [ "avatars" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.generate" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^avatar_[A-Za-z0-9_-]+$" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Avatar" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/generations/preview": { "post": { "operationId": "previewGeneration", "summary": "Validate, normalize, and quote a Generation", "tags": [ "generations" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.generate" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "project_id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "input": { "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "const": "trend" }, "lookback_days": { "type": "integer", "minimum": 1, "maximum": 30 }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "topic" }, "topic": { "type": "string", "minLength": 1, "maxLength": 2000, "x-max-utf8-bytes": 2000 }, "evidence_scope": { "type": "string", "enum": [ "project", "project_and_web" ] }, "lookback_days": { "type": "integer", "minimum": 1, "maximum": 30 }, "source_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "collection_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type", "topic" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "knowledge" }, "source_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "collection_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type" ], "additionalProperties": false } ] }, "attachment_source_ids": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 }, "language": { "type": "string", "minLength": 2, "maxLength": 255, "format": "bcp47" }, "assets": { "minItems": 1, "maxItems": 10, "type": "array", "items": { "type": "object", "properties": { "asset_type": { "type": "string", "enum": [ "article", "lead_magnet", "ebook", "slides", "infographic", "quiz", "podcast_episode", "short_video", "explainer_video", "launch_video", "product_demo_video", "ad_video" ] }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 }, "language": { "type": "string", "minLength": 2, "maxLength": 255, "format": "bcp47" }, "options": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "voice_id": { "type": "string", "pattern": "^voice_[A-Za-z0-9_-]+$" }, "avatar_id": { "type": "string", "pattern": "^avatar_[A-Za-z0-9_-]+$" }, "model": { "type": "string", "minLength": 1, "maxLength": 200 }, "model_options": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} } }, "required": [ "asset_type" ], "additionalProperties": false, "dependentRequired": { "model_options": [ "model" ] } }, "x-unique-by": "asset_type" }, "metadata": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {}, "x-max-json-bytes": 4096 } }, "required": [ "project_id", "input", "assets" ], "additionalProperties": false }, "examples": { "five_first_class_video_outcomes": { "value": { "project_id": "prj_7f3", "input": { "type": "trend", "lookback_days": 7 }, "language": "en-US", "assets": [ { "asset_type": "short_video", "options": { "duration_seconds": 30, "aspect_ratio": "9:16", "resolution": "1080p", "captions": true, "presentation_mode": "faceless" } }, { "asset_type": "explainer_video", "voice_id": "voice_acme_narrator", "options": { "duration_seconds": 90, "aspect_ratio": "16:9", "resolution": "1080p", "captions": true, "presentation_mode": "faceless" } }, { "asset_type": "launch_video", "voice_id": "voice_acme_narrator", "avatar_id": "avatar_acme_presenter", "options": { "duration_seconds": 60, "aspect_ratio": "16:9", "resolution": "1080p", "captions": true, "presentation_mode": "avatar" } }, { "asset_type": "product_demo_video", "options": { "duration_seconds": 120, "aspect_ratio": "16:9", "resolution": "1080p", "captions": true, "presentation_mode": "faceless", "product_visual_source_ids": [ "src_dashboard" ] } }, { "asset_type": "ad_video", "avatar_id": "avatar_acme_presenter", "options": { "duration_seconds": 30, "aspect_ratio": "9:16", "resolution": "1080p", "captions": true, "presentation_mode": "avatar" } } ] } } } } } }, "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenerationPreview" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/generations": { "post": { "operationId": "createGeneration", "summary": "Reserve USD and create a Generation", "tags": [ "generations" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.generate" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": true, "parameters": [ { "name": "Idempotency-Key", "in": "header", "required": true, "description": "1–255 visible ASCII bytes; UUID recommended.", "schema": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[!-~]+$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "project_id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "input": { "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "const": "trend" }, "lookback_days": { "type": "integer", "minimum": 1, "maximum": 30 }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "topic" }, "topic": { "type": "string", "minLength": 1, "maxLength": 2000, "x-max-utf8-bytes": 2000 }, "evidence_scope": { "type": "string", "enum": [ "project", "project_and_web" ] }, "lookback_days": { "type": "integer", "minimum": 1, "maximum": 30 }, "source_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "collection_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type", "topic" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "knowledge" }, "source_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "collection_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type" ], "additionalProperties": false } ] }, "attachment_source_ids": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 }, "language": { "type": "string", "minLength": 2, "maxLength": 255, "format": "bcp47" }, "assets": { "minItems": 1, "maxItems": 10, "type": "array", "items": { "type": "object", "properties": { "asset_type": { "type": "string", "enum": [ "article", "lead_magnet", "ebook", "slides", "infographic", "quiz", "podcast_episode", "short_video", "explainer_video", "launch_video", "product_demo_video", "ad_video" ] }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 }, "language": { "type": "string", "minLength": 2, "maxLength": 255, "format": "bcp47" }, "options": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "voice_id": { "type": "string", "pattern": "^voice_[A-Za-z0-9_-]+$" }, "avatar_id": { "type": "string", "pattern": "^avatar_[A-Za-z0-9_-]+$" }, "model": { "type": "string", "minLength": 1, "maxLength": 200 }, "model_options": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} } }, "required": [ "asset_type" ], "additionalProperties": false, "dependentRequired": { "model_options": [ "model" ] } }, "x-unique-by": "asset_type" }, "metadata": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {}, "x-max-json-bytes": 4096 }, "max_cost_usd": { "type": "string", "pattern": "^(0|[1-9][0-9]{0,5})\\.[0-9]{2}$" } }, "required": [ "project_id", "input", "assets", "max_cost_usd" ], "additionalProperties": false }, "examples": { "first_class_lead_magnet_from_knowledge": { "value": { "project_id": "prj_7f3", "input": { "type": "knowledge", "source_ids": [ "src_clinic_guide" ] }, "language": "es-ES", "assets": [ { "asset_type": "lead_magnet", "options": { "page_count": 10, "format": "auto" }, "model": "gpt-image-2-2026-04-21" } ], "max_cost_usd": "55.00" } }, "first_class_lead_magnet_from_topic": { "value": { "project_id": "prj_7f3", "input": { "type": "topic", "topic": "How independent clinics can improve patient enquiry follow-up", "evidence_scope": "project" }, "assets": [ { "asset_type": "lead_magnet", "options": { "page_count": 4, "format": "checklist" } } ], "max_cost_usd": "37.00" } } } } } }, "responses": { "202": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Generation" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } }, "get": { "operationId": "listGenerations", "summary": "List Generations", "tags": [ "generations" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.read" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string", "minLength": 1, "maxLength": 4096 } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(?:[1-9]|[1-9][0-9]|100)$" } }, { "name": "project_id", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" } }, { "name": "edited_from_generation_id", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^gen_[A-Za-z0-9_-]+$" } }, { "name": "status", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "queued", "researching", "generating", "succeeded", "partially_succeeded", "failed", "cancelled" ] } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data", "next_cursor" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Generation" } }, "next_cursor": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] } } } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/generations/{id}": { "get": { "operationId": "getGeneration", "summary": "Get a Generation and its Assets", "tags": [ "generations" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.read" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^gen_[A-Za-z0-9_-]+$" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Generation" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/generations/{id}/edit/preview": { "post": { "operationId": "previewGenerationEdit", "summary": "Validate and quote a full Asset edit from frozen Generation context", "tags": [ "generations" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.generate" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^gen_[A-Za-z0-9_-]+$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "assets": { "minItems": 1, "maxItems": 10, "type": "array", "items": { "type": "object", "properties": { "asset_id": { "type": "string", "pattern": "^ast_[A-Za-z0-9_-]+$" }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 }, "language": { "type": "string", "minLength": 2, "maxLength": 255, "format": "bcp47" }, "options": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "voice_id": { "type": "string", "pattern": "^voice_[A-Za-z0-9_-]+$" }, "avatar_id": { "type": "string", "pattern": "^avatar_[A-Za-z0-9_-]+$" }, "model": { "type": "string", "minLength": 1, "maxLength": 200 }, "model_options": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} } }, "required": [ "asset_id" ], "additionalProperties": false }, "x-unique-by": "asset_id" } }, "required": [ "assets" ], "additionalProperties": false }, "examples": { "rerender_selected_asset": { "value": { "assets": [ { "asset_id": "ast_01HZX7E2Y4D9K3Q1M8N6P0R5ST", "instructions": "Shorten the introduction and add a migration checklist.", "options": { "page_count": 10, "format": "auto" } } ] } } } } } }, "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenerationEditPreview" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/generations/{id}/edit": { "post": { "operationId": "createGenerationEdit", "summary": "Reserve USD and fully rerender selected Assets from frozen Generation context", "tags": [ "generations" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.generate" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": true, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^gen_[A-Za-z0-9_-]+$" } }, { "name": "Idempotency-Key", "in": "header", "required": true, "description": "1–255 visible ASCII bytes; UUID recommended.", "schema": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[!-~]+$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "assets": { "minItems": 1, "maxItems": 10, "type": "array", "items": { "type": "object", "properties": { "asset_id": { "type": "string", "pattern": "^ast_[A-Za-z0-9_-]+$" }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 }, "language": { "type": "string", "minLength": 2, "maxLength": 255, "format": "bcp47" }, "options": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "voice_id": { "type": "string", "pattern": "^voice_[A-Za-z0-9_-]+$" }, "avatar_id": { "type": "string", "pattern": "^avatar_[A-Za-z0-9_-]+$" }, "model": { "type": "string", "minLength": 1, "maxLength": 200 }, "model_options": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} } }, "required": [ "asset_id" ], "additionalProperties": false }, "x-unique-by": "asset_id" }, "max_cost_usd": { "type": "string", "pattern": "^(0|[1-9][0-9]{0,5})\\.[0-9]{2}$" } }, "required": [ "assets", "max_cost_usd" ], "additionalProperties": false }, "examples": { "rerender_selected_asset": { "value": { "assets": [ { "asset_id": "ast_01HZX7E2Y4D9K3Q1M8N6P0R5ST", "instructions": "Shorten the introduction and add a migration checklist.", "options": { "page_count": 10, "format": "auto" } } ], "max_cost_usd": "1.40" } } } } } }, "responses": { "202": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Generation" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/generations/{id}/cancel": { "post": { "operationId": "cancelGeneration", "summary": "Cancel undispatched Generation work", "tags": [ "generations" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.generate" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^gen_[A-Za-z0-9_-]+$" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Generation" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/assets": { "get": { "operationId": "listAssets", "summary": "List the Project Asset library", "tags": [ "assets" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.read" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string", "minLength": 1, "maxLength": 4096 } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(?:[1-9]|[1-9][0-9]|100)$" } }, { "name": "project_id", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" } }, { "name": "asset_type", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "article", "lead_magnet", "ebook", "slides", "infographic", "quiz", "podcast_episode", "short_video", "explainer_video", "launch_video", "product_demo_video", "ad_video" ] } }, { "name": "origin", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "one_off", "content_loop" ] } }, { "name": "status", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "queued", "generating", "succeeded", "failed", "cancelled" ] } }, { "name": "created_at_from", "in": "query", "required": false, "schema": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" } }, { "name": "created_at_before", "in": "query", "required": false, "schema": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" } }, { "name": "input_type", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "trend", "topic", "knowledge" ] } }, { "name": "subject_query", "in": "query", "required": false, "schema": { "type": "string", "minLength": 1, "maxLength": 200, "x-max-utf8-bytes": 200 } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data", "next_cursor" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Asset" } }, "next_cursor": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] } } } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/assets/{id}": { "get": { "operationId": "getAsset", "summary": "Get Asset detail and Artifacts", "tags": [ "assets" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.read" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^ast_[A-Za-z0-9_-]+$" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Asset" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/assets/{id}/feedback": { "post": { "operationId": "recordAssetFeedback", "summary": "Record Asset usefulness feedback", "tags": [ "assets" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.write" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^ast_[A-Za-z0-9_-]+$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "rating": { "type": "string", "enum": [ "useful", "not_useful" ] }, "reason": { "type": "string", "minLength": 1, "maxLength": 1000, "x-max-utf8-bytes": 1000 } }, "required": [ "rating" ], "additionalProperties": false } } } }, "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetFeedback" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/content-loops": { "post": { "operationId": "createContentLoop", "summary": "Create and schedule a Content Loop", "tags": [ "content-loops" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.write", "platform.generate" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": true, "parameters": [ { "name": "Idempotency-Key", "in": "header", "required": true, "description": "1–255 visible ASCII bytes; UUID recommended.", "schema": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[!-~]+$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "project_id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "input": { "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "const": "trend" }, "lookback_days": { "type": "integer", "minimum": 1, "maximum": 30 }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "topic" }, "topic": { "type": "string", "minLength": 1, "maxLength": 2000, "x-max-utf8-bytes": 2000 }, "evidence_scope": { "type": "string", "enum": [ "project", "project_and_web" ] }, "lookback_days": { "type": "integer", "minimum": 1, "maximum": 30 }, "source_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "collection_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type", "topic" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "knowledge" }, "source_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "collection_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type" ], "additionalProperties": false } ] }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 }, "schedule": { "oneOf": [ { "type": "object", "properties": { "frequency": { "type": "string", "const": "daily" }, "local_time": { "type": "string", "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$" }, "timezone": { "type": "string", "minLength": 1, "maxLength": 100, "format": "iana-time-zone" } }, "required": [ "frequency", "local_time", "timezone" ], "additionalProperties": false }, { "type": "object", "properties": { "frequency": { "type": "string", "const": "weekly" }, "day_of_week": { "type": "string", "enum": [ "monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday" ] }, "local_time": { "type": "string", "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$" }, "timezone": { "type": "string", "minLength": 1, "maxLength": 100, "format": "iana-time-zone" } }, "required": [ "frequency", "day_of_week", "local_time", "timezone" ], "additionalProperties": false }, { "type": "object", "properties": { "frequency": { "type": "string", "const": "monthly" }, "day_of_month": { "type": "integer", "minimum": 1, "maximum": 31 }, "local_time": { "type": "string", "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$" }, "timezone": { "type": "string", "minLength": 1, "maxLength": 100, "format": "iana-time-zone" } }, "required": [ "frequency", "day_of_month", "local_time", "timezone" ], "additionalProperties": false } ] }, "assets": { "minItems": 1, "maxItems": 10, "type": "array", "items": { "type": "object", "properties": { "asset_type": { "type": "string", "enum": [ "article", "lead_magnet", "ebook", "slides", "infographic", "quiz", "podcast_episode", "short_video", "explainer_video", "launch_video", "product_demo_video", "ad_video" ] }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 }, "language": { "type": "string", "minLength": 2, "maxLength": 255, "format": "bcp47" }, "options": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "voice_id": { "type": "string", "pattern": "^voice_[A-Za-z0-9_-]+$" }, "avatar_id": { "type": "string", "pattern": "^avatar_[A-Za-z0-9_-]+$" }, "model": { "type": "string", "minLength": 1, "maxLength": 200 }, "model_options": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} } }, "required": [ "asset_type" ], "additionalProperties": false, "dependentRequired": { "model_options": [ "model" ] } }, "x-unique-by": "asset_type" }, "language": { "type": "string", "minLength": 2, "maxLength": 255, "format": "bcp47" }, "max_cost_per_run_usd": { "type": "string", "pattern": "^(0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "max_cost_per_month_usd": { "type": "string", "pattern": "^(0|[1-9][0-9]{0,5})\\.[0-9]{2}$" } }, "required": [ "project_id", "input", "schedule", "assets", "max_cost_per_run_usd", "max_cost_per_month_usd" ], "additionalProperties": false } } } }, "responses": { "201": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentLoop" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } }, "get": { "operationId": "listContentLoops", "summary": "List Content Loops", "tags": [ "content-loops" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.read" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string", "minLength": 1, "maxLength": 4096 } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(?:[1-9]|[1-9][0-9]|100)$" } }, { "name": "project_id", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" } }, { "name": "status", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "active", "paused", "archived" ] } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data", "next_cursor" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/ContentLoop" } }, "next_cursor": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] } } } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/content-loops/{id}": { "get": { "operationId": "getContentLoop", "summary": "Get a Content Loop", "tags": [ "content-loops" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.read" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^loop_[A-Za-z0-9_-]+$" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentLoop" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } }, "patch": { "operationId": "updateContentLoop", "summary": "Update a Content Loop configuration", "tags": [ "content-loops" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.write", "platform.generate" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": true, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^loop_[A-Za-z0-9_-]+$" } }, { "name": "Idempotency-Key", "in": "header", "required": true, "description": "1–255 visible ASCII bytes; UUID recommended.", "schema": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[!-~]+$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "input": { "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "const": "trend" }, "lookback_days": { "type": "integer", "minimum": 1, "maximum": 30 }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "topic" }, "topic": { "type": "string", "minLength": 1, "maxLength": 2000, "x-max-utf8-bytes": 2000 }, "evidence_scope": { "type": "string", "enum": [ "project", "project_and_web" ] }, "lookback_days": { "type": "integer", "minimum": 1, "maximum": 30 }, "source_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "collection_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type", "topic" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "knowledge" }, "source_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "collection_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type" ], "additionalProperties": false } ] }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 }, "schedule": { "oneOf": [ { "type": "object", "properties": { "frequency": { "type": "string", "const": "daily" }, "local_time": { "type": "string", "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$" }, "timezone": { "type": "string", "minLength": 1, "maxLength": 100, "format": "iana-time-zone" } }, "required": [ "frequency", "local_time", "timezone" ], "additionalProperties": false }, { "type": "object", "properties": { "frequency": { "type": "string", "const": "weekly" }, "day_of_week": { "type": "string", "enum": [ "monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday" ] }, "local_time": { "type": "string", "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$" }, "timezone": { "type": "string", "minLength": 1, "maxLength": 100, "format": "iana-time-zone" } }, "required": [ "frequency", "day_of_week", "local_time", "timezone" ], "additionalProperties": false }, { "type": "object", "properties": { "frequency": { "type": "string", "const": "monthly" }, "day_of_month": { "type": "integer", "minimum": 1, "maximum": 31 }, "local_time": { "type": "string", "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$" }, "timezone": { "type": "string", "minLength": 1, "maxLength": 100, "format": "iana-time-zone" } }, "required": [ "frequency", "day_of_month", "local_time", "timezone" ], "additionalProperties": false } ] }, "assets": { "minItems": 1, "maxItems": 10, "type": "array", "items": { "type": "object", "properties": { "asset_type": { "type": "string", "enum": [ "article", "lead_magnet", "ebook", "slides", "infographic", "quiz", "podcast_episode", "short_video", "explainer_video", "launch_video", "product_demo_video", "ad_video" ] }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 }, "language": { "type": "string", "minLength": 2, "maxLength": 255, "format": "bcp47" }, "options": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "voice_id": { "type": "string", "pattern": "^voice_[A-Za-z0-9_-]+$" }, "avatar_id": { "type": "string", "pattern": "^avatar_[A-Za-z0-9_-]+$" }, "model": { "type": "string", "minLength": 1, "maxLength": 200 }, "model_options": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} } }, "required": [ "asset_type" ], "additionalProperties": false, "dependentRequired": { "model_options": [ "model" ] } }, "x-unique-by": "asset_type" }, "language": { "type": "string", "minLength": 2, "maxLength": 255, "format": "bcp47" }, "max_cost_per_run_usd": { "type": "string", "pattern": "^(0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "max_cost_per_month_usd": { "type": "string", "pattern": "^(0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "status": { "type": "string", "enum": [ "active", "paused" ] } }, "additionalProperties": false } } } }, "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentLoop" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } }, "delete": { "operationId": "archiveContentLoop", "summary": "Archive a Content Loop", "tags": [ "content-loops" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.write", "platform.generate" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": true, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^loop_[A-Za-z0-9_-]+$" } }, { "name": "Idempotency-Key", "in": "header", "required": true, "description": "1–255 visible ASCII bytes; UUID recommended.", "schema": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[!-~]+$" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentLoop" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/content-loops/{id}/run": { "post": { "operationId": "runContentLoop", "summary": "Start one immediate Content Loop Run", "tags": [ "content-loops" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.generate" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": true, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^loop_[A-Za-z0-9_-]+$" } }, { "name": "Idempotency-Key", "in": "header", "required": true, "description": "1–255 visible ASCII bytes; UUID recommended.", "schema": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[!-~]+$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "max_cost_usd": { "type": "string", "pattern": "^(0|[1-9][0-9]{0,5})\\.[0-9]{2}$" } }, "required": [ "max_cost_usd" ], "additionalProperties": false } } } }, "responses": { "202": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentLoopRun" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/content-loops/{id}/runs": { "get": { "operationId": "listContentLoopRuns", "summary": "List Content Loop Run history", "tags": [ "content-loops" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.read" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^loop_[A-Za-z0-9_-]+$" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string", "minLength": 1, "maxLength": 4096 } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(?:[1-9]|[1-9][0-9]|100)$" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data", "next_cursor" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/ContentLoopRun" } }, "next_cursor": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] } } } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/content-loop-runs/{id}": { "get": { "operationId": "getContentLoopRun", "summary": "Get a Content Loop Run", "tags": [ "content-loop-runs" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.read" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^run_[A-Za-z0-9_-]+$" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentLoopRun" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/content-loop-runs/{id}/feedback": { "post": { "operationId": "recordContentLoopRunFeedback", "summary": "Record Content Loop Run topic feedback", "tags": [ "content-loop-runs" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.write" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^run_[A-Za-z0-9_-]+$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "rating": { "type": "string", "enum": [ "good_topic", "bad_topic" ] } }, "required": [ "rating" ], "additionalProperties": false } } } }, "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentLoopRunFeedback" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/account": { "get": { "operationId": "getAccount", "summary": "Get the current Platform account", "tags": [ "account" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.read" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Account" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/api-keys": { "post": { "operationId": "createApiKey", "summary": "Create a scoped Platform API key", "tags": [ "api-keys" ], "security": [ { "platformOAuth": [] } ], "x-required-scopes": [ "platform.keys.write" ], "x-principal": "oauth", "x-idempotency-required": true, "parameters": [ { "name": "Idempotency-Key", "in": "header", "required": true, "description": "1–255 visible ASCII bytes; UUID recommended.", "schema": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[!-~]+$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 80, "x-max-utf8-bytes": 80 }, "scopes": { "minItems": 1, "maxItems": 4, "type": "array", "items": { "type": "string", "enum": [ "platform.read", "platform.write", "platform.generate", "platform.billing.read" ] } } }, "required": [ "name", "scopes" ], "additionalProperties": false } } } }, "responses": { "201": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiKey" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } }, "get": { "operationId": "listApiKeys", "summary": "List Platform API key metadata", "tags": [ "api-keys" ], "security": [ { "platformOAuth": [] } ], "x-required-scopes": [ "platform.keys.write" ], "x-principal": "oauth", "x-idempotency-required": false, "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string", "minLength": 1, "maxLength": 4096 } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(?:[1-9]|[1-9][0-9]|100)$" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data", "next_cursor" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/ApiKey" } }, "next_cursor": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] } } } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/api-keys/{id}": { "delete": { "operationId": "revokeApiKey", "summary": "Revoke a Platform API key", "tags": [ "api-keys" ], "security": [ { "platformOAuth": [] } ], "x-required-scopes": [ "platform.keys.write" ], "x-principal": "oauth", "x-idempotency-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^key_[A-Za-z0-9_-]+$" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiKeyRevocation" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/billing/usage": { "get": { "operationId": "getBillingUsage", "summary": "Get prepaid usage and resource counters", "tags": [ "billing" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.billing.read" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingUsage" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/billing/prepayment-session": { "post": { "operationId": "createPrepaymentSession", "summary": "Create a prepaid Stripe Checkout session", "tags": [ "billing" ], "security": [ { "platformOAuth": [] } ], "x-required-scopes": [ "platform.billing.write" ], "x-principal": "oauth", "x-idempotency-required": true, "parameters": [ { "name": "Idempotency-Key", "in": "header", "required": true, "description": "1–255 visible ASCII bytes; UUID recommended.", "schema": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[!-~]+$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "amount_usd": { "type": "string", "pattern": "^(0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "return_to": { "type": "string", "minLength": 1, "maxLength": 2048, "format": "uri", "x-max-utf8-bytes": 2048 } }, "required": [ "amount_usd", "return_to" ], "additionalProperties": false } } } }, "responses": { "201": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PrepaymentSession" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/webhooks": { "post": { "operationId": "createWebhook", "summary": "Register a signed HTTPS webhook destination", "tags": [ "webhooks" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.write" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": true, "parameters": [ { "name": "Idempotency-Key", "in": "header", "required": true, "description": "1–255 visible ASCII bytes; UUID recommended.", "schema": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[!-~]+$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "url": { "type": "string", "minLength": 1, "maxLength": 2048, "format": "uri", "x-max-utf8-bytes": 2048 } }, "required": [ "url" ], "additionalProperties": false } } } }, "responses": { "201": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Webhook" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } }, "get": { "operationId": "listWebhooks", "summary": "List active webhook destinations", "tags": [ "webhooks" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.write" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string", "minLength": 1, "maxLength": 4096 } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(?:[1-9]|[1-9][0-9]|100)$" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data", "next_cursor" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Webhook" } }, "next_cursor": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] } } } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } }, "/webhooks/{id}": { "delete": { "operationId": "deleteWebhook", "summary": "Revoke a webhook destination", "tags": [ "webhooks" ], "security": [ { "platformOAuth": [] }, { "platformApiKey": [] } ], "x-required-scopes": [ "platform.write" ], "x-principal": "oauth_or_api_key", "x-idempotency-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^wh_[A-Za-z0-9_-]+$" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Webhook" } } } }, "default": { "$ref": "#/components/responses/AutoContentError" } } } } }, "components": { "securitySchemes": { "platformOAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "Platform OAuth JWT" }, "platformApiKey": { "type": "http", "scheme": "bearer", "bearerFormat": "acp_ Platform API key" } }, "schemas": { "ProjectCreateAccepted": { "type": "object", "additionalProperties": false, "required": [ "id", "status", "website_url", "poll_after_seconds", "created_at" ], "properties": { "id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "status": { "const": "analyzing" }, "website_url": { "type": "string", "format": "uri" }, "poll_after_seconds": { "type": "integer", "minimum": 1, "maximum": 15 }, "created_at": { "type": "string", "format": "date-time" } } }, "Project": { "type": "object", "additionalProperties": false, "required": [ "id", "status", "website_url", "name", "description", "category", "audience", "relevant_keywords", "competitor_keywords", "excluded_keywords", "allow_competitor_mentions", "research_locale", "crawl_scope", "brand", "profile_revision", "refresh_error", "poll_after_seconds", "created_at", "updated_at" ], "properties": { "id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "status": { "type": "string", "enum": [ "analyzing", "needs_review", "ready", "failed", "archived" ] }, "website_url": { "type": "string", "format": "uri" }, "name": { "type": "string", "minLength": 1, "maxLength": 200 }, "description": { "type": "string", "maxLength": 4000 }, "category": { "type": "string", "maxLength": 500 }, "audience": { "type": "string", "maxLength": 2000 }, "relevant_keywords": { "type": "array", "maxItems": 50, "uniqueItems": true, "items": { "type": "string", "maxLength": 200 } }, "competitor_keywords": { "type": "array", "maxItems": 50, "uniqueItems": true, "items": { "type": "string", "maxLength": 200 } }, "excluded_keywords": { "type": "array", "maxItems": 50, "uniqueItems": true, "items": { "type": "string", "maxLength": 200 } }, "allow_competitor_mentions": { "type": "boolean" }, "research_locale": { "type": "string", "minLength": 2, "maxLength": 255, "format": "bcp47" }, "crawl_scope": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "root_url", "included_page_count" ], "properties": { "root_url": { "type": "string", "format": "uri" }, "included_page_count": { "type": "integer", "minimum": 0, "maximum": 25 } } }, { "type": "null" } ] }, "brand": { "type": "object", "additionalProperties": false, "required": [ "colors", "instructions", "logo", "default_voice_id", "default_avatar_id" ], "properties": { "colors": { "type": "array", "maxItems": 8, "uniqueItems": true, "items": { "type": "string", "pattern": "^#[0-9A-F]{6}$" } }, "instructions": { "type": "string", "maxLength": 2000 }, "logo": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "id", "revision", "mime_type", "width", "height", "url" ], "properties": { "id": { "type": "string", "minLength": 1 }, "revision": { "type": "integer", "minimum": 1 }, "mime_type": { "type": "string", "enum": [ "image/png", "image/jpeg", "image/webp" ] }, "width": { "type": "integer", "minimum": 1 }, "height": { "type": "integer", "minimum": 1 }, "url": { "type": "string", "format": "uri" } } }, { "type": "null" } ] }, "default_voice_id": { "oneOf": [ { "type": "string", "pattern": "^voice_[A-Za-z0-9_-]+$" }, { "type": "null" } ] }, "default_avatar_id": { "oneOf": [ { "type": "string", "pattern": "^avatar_[A-Za-z0-9_-]+$" }, { "type": "null" } ] } } }, "profile_revision": { "type": "integer", "minimum": 0 }, "refresh_error": { "oneOf": [ { "type": "object", "additionalProperties": true }, { "type": "null" } ] }, "poll_after_seconds": { "oneOf": [ { "type": "integer", "minimum": 1, "maximum": 15 }, { "type": "null" } ] }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } }, "Collection": { "type": "object", "additionalProperties": false, "required": [ "id", "project_id", "name", "created_at", "updated_at" ], "properties": { "id": { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" }, "project_id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "name": { "type": "string", "minLength": 1, "maxLength": 200 }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } }, "Source": { "type": "object", "additionalProperties": false, "required": [ "id", "project_id", "collection_id", "kind", "title", "external_url", "status", "refreshing", "refresh_operation_id", "refresh_error", "error", "visual_count", "current_revision", "retention_scope", "expires_at", "claimed_generation_id", "removed_at", "created_at", "updated_at" ], "properties": { "id": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" }, "project_id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "collection_id": { "oneOf": [ { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" }, { "type": "null" } ] }, "kind": { "type": "string", "enum": [ "website_page", "url", "youtube", "pdf", "document", "text", "product_visual" ] }, "title": { "type": "string", "minLength": 1, "maxLength": 500 }, "external_url": { "oneOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "status": { "type": "string", "enum": [ "processing", "ready", "failed", "removed" ] }, "refreshing": { "type": "boolean" }, "refresh_operation_id": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] }, "refresh_error": { "oneOf": [ { "type": "object", "additionalProperties": true }, { "type": "null" } ] }, "error": { "oneOf": [ { "type": "object", "additionalProperties": true }, { "type": "null" } ] }, "visual_count": { "type": "integer", "minimum": 0, "maximum": 16 }, "current_revision": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "id", "revision", "mime_type", "byte_size", "normalized_text_bytes", "width", "height", "created_at" ], "properties": { "id": { "type": "string", "minLength": 1 }, "revision": { "type": "integer", "minimum": 1 }, "mime_type": { "type": "string", "minLength": 1 }, "byte_size": { "oneOf": [ { "type": "integer", "minimum": 0 }, { "type": "null" } ] }, "normalized_text_bytes": { "oneOf": [ { "type": "integer", "minimum": 0 }, { "type": "null" } ] }, "width": { "oneOf": [ { "type": "integer", "minimum": 1 }, { "type": "null" } ] }, "height": { "oneOf": [ { "type": "integer", "minimum": 1 }, { "type": "null" } ] }, "created_at": { "oneOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "retention_scope": { "type": "string", "enum": [ "project", "request" ] }, "expires_at": { "oneOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "claimed_generation_id": { "oneOf": [ { "type": "string", "pattern": "^gen_[A-Za-z0-9_-]+$" }, { "type": "null" } ] }, "removed_at": { "oneOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } }, "AssetTypeDefinition": { "type": "object", "additionalProperties": false, "required": [ "id", "display_name", "description", "status", "contract_version", "options_schema", "artifact_kinds", "supports_model_pin", "supports_voice", "supports_avatar", "typical_completion_seconds", "pricing" ], "properties": { "id": { "$ref": "#/components/schemas/AssetType" }, "display_name": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 }, "status": { "type": "string", "enum": [ "active", "deprecated" ] }, "contract_version": { "type": "integer", "minimum": 1 }, "options_schema": { "type": "object", "additionalProperties": true }, "artifact_kinds": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": [ "kind", "mime_type", "primary" ], "properties": { "kind": { "type": "string" }, "mime_type": { "type": "string" }, "primary": { "type": "boolean" } } } }, "supports_model_pin": { "type": "boolean" }, "supports_voice": { "type": "boolean" }, "supports_avatar": { "type": "boolean" }, "typical_completion_seconds": { "type": "integer", "minimum": 1 }, "pricing": { "type": "object", "additionalProperties": false, "required": [ "basis", "exact_price_via_preview" ], "properties": { "basis": { "type": "string", "minLength": 1 }, "exact_price_via_preview": { "const": true } } } } }, "Model": { "type": "object", "additionalProperties": false, "required": [ "id", "asset_types", "status", "retires_at", "replacement_model", "capabilities", "asset_options_constraints_schema_version", "asset_options_constraints_schema", "model_options_schema_version", "model_options_schema", "pricing" ], "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 128 }, "asset_types": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/components/schemas/AssetType" } }, "status": { "type": "string", "enum": [ "active", "deprecated", "retired" ] }, "retires_at": { "oneOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "replacement_model": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] }, "capabilities": { "type": "object", "additionalProperties": false, "required": [ "presentation_modes" ], "properties": { "presentation_modes": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "enum": [ "faceless", "avatar" ] } }, "aspect_ratios": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "enum": [ "16:9", "9:16", "1:1" ] } }, "minimum_duration_seconds": { "type": "integer", "minimum": 1, "maximum": 14400 }, "maximum_duration_seconds": { "type": "integer", "minimum": 1, "maximum": 14400 } } }, "asset_options_constraints_schema_version": { "type": "integer", "minimum": 1 }, "asset_options_constraints_schema": { "type": "object", "additionalProperties": true }, "model_options_schema_version": { "type": "integer", "minimum": 1 }, "model_options_schema": { "type": "object", "additionalProperties": true }, "pricing": { "type": "object", "additionalProperties": false, "required": [ "basis", "exact_price_via_preview", "rate_card_version" ], "properties": { "basis": { "type": "string", "enum": [ "output_page", "output_second" ] }, "exact_price_via_preview": { "const": true }, "rate_card_version": { "type": "integer", "minimum": 1 } } } } }, "GenerationPreview": { "type": "object", "additionalProperties": false, "required": [ "currency", "total_cost_usd", "funding_sufficient", "price_version", "input_contract_version", "project_id", "input", "assets" ], "properties": { "currency": { "const": "usd" }, "total_cost_usd": { "type": "string", "pattern": "^(?:0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "funding_sufficient": { "type": "boolean" }, "price_version": { "type": "string", "minLength": 1 }, "input_contract_version": { "type": "integer", "minimum": 1 }, "project_id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "input": { "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "const": "trend" }, "lookback_days": { "type": "integer", "minimum": 1, "maximum": 30 }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "topic" }, "topic": { "type": "string", "minLength": 1, "maxLength": 2000, "x-max-utf8-bytes": 2000 }, "evidence_scope": { "type": "string", "enum": [ "project", "project_and_web" ] }, "lookback_days": { "type": "integer", "minimum": 1, "maximum": 30 }, "source_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "collection_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type", "topic" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "knowledge" }, "source_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "collection_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type" ], "additionalProperties": false } ] }, "assets": { "type": "array", "minItems": 1, "maxItems": 10, "items": { "type": "object", "additionalProperties": false, "required": [ "asset_type", "normalized_options", "cost_usd", "basis", "contract_version", "requested_model", "model_used", "effective_voice_id", "effective_avatar_id", "logo", "product_visual_source_ids" ], "properties": { "asset_type": { "$ref": "#/components/schemas/AssetType" }, "normalized_options": { "description": "One normalized first-class Asset options contract. Exact schemas are also discoverable from GET /asset-types.", "anyOf": [ { "type": "object", "properties": { "target_words": { "default": 1200, "type": "integer", "minimum": 500, "maximum": 3000 } }, "required": [ "target_words" ], "additionalProperties": false }, { "type": "object", "properties": { "page_count": { "default": 10, "type": "integer", "minimum": 4, "maximum": 30 }, "format": { "default": "auto", "type": "string", "enum": [ "auto", "checklist", "cheat_sheet", "workbook", "planner", "tracker", "scorecard", "roadmap", "challenge", "swipe_file", "resource_guide", "comparison_guide", "meal_plan" ] } }, "required": [ "page_count", "format" ], "additionalProperties": false }, { "type": "object", "properties": { "chapter_count": { "default": 6, "type": "integer", "minimum": 3, "maximum": 12 }, "target_pages": { "default": 30, "type": "integer", "minimum": 15, "maximum": 60 } }, "required": [ "chapter_count", "target_pages" ], "additionalProperties": false }, { "type": "object", "properties": { "slide_count": { "default": 12, "type": "integer", "minimum": 5, "maximum": 30 }, "aspect_ratio": { "default": "16:9", "type": "string", "enum": [ "16:9", "4:3" ] } }, "required": [ "slide_count", "aspect_ratio" ], "additionalProperties": false }, { "type": "object", "properties": { "aspect_ratio": { "default": "4:5", "type": "string", "enum": [ "1:1", "4:5", "9:16", "16:9" ] }, "resolution": { "default": "standard", "type": "string", "enum": [ "standard", "high" ] } }, "required": [ "aspect_ratio", "resolution" ], "additionalProperties": false }, { "type": "object", "properties": { "question_count": { "default": 10, "type": "integer", "minimum": 5, "maximum": 30 }, "difficulty": { "default": "intermediate", "type": "string", "enum": [ "beginner", "intermediate", "advanced" ] } }, "required": [ "question_count", "difficulty" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 600, "type": "integer", "minimum": 120, "maximum": 14400 } }, "required": [ "duration_seconds" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 30, "type": "integer", "minimum": 5, "maximum": 180 }, "aspect_ratio": { "default": "9:16", "type": "string", "enum": [ "9:16", "1:1", "16:9" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 90, "type": "integer", "minimum": 30, "maximum": 600 }, "aspect_ratio": { "default": "16:9", "type": "string", "enum": [ "16:9", "9:16", "1:1" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 60, "type": "integer", "minimum": 15, "maximum": 180 }, "aspect_ratio": { "default": "16:9", "type": "string", "enum": [ "16:9", "9:16", "1:1" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 120, "type": "integer", "minimum": 30, "maximum": 600 }, "aspect_ratio": { "default": "16:9", "type": "string", "enum": [ "16:9", "9:16", "1:1" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] }, "product_visual_source_ids": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "^[A-Za-z0-9_-]+$" }, "uniqueItems": true } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 30, "type": "integer", "minimum": 5, "maximum": 120 }, "aspect_ratio": { "default": "9:16", "type": "string", "enum": [ "9:16", "1:1", "16:9" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false } ] }, "normalized_model_options": { "type": "object", "additionalProperties": true, "description": "Present only when the exact model has normalized native options." }, "cost_usd": { "type": "string", "pattern": "^(?:0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "basis": { "type": "string", "minLength": 1 }, "contract_version": { "type": "integer", "minimum": 1 }, "requested_model": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] }, "model_used": { "type": "string", "minLength": 1 }, "effective_voice_id": { "oneOf": [ { "type": "string", "pattern": "^voice_[A-Za-z0-9_-]+$" }, { "type": "null" } ] }, "effective_avatar_id": { "oneOf": [ { "type": "string", "pattern": "^avatar_[A-Za-z0-9_-]+$" }, { "type": "null" } ] }, "logo": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "id", "revision" ], "properties": { "id": { "type": "string", "minLength": 1 }, "revision": { "type": "integer", "minimum": 1 } } }, { "type": "null" } ] }, "product_visual_source_ids": { "type": "array", "maxItems": 20, "uniqueItems": true, "items": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" } }, "original_asset_id": { "type": "string", "pattern": "^ast_[A-Za-z0-9_-]+$" } } } } } }, "GenerationEditPreview": { "type": "object", "additionalProperties": false, "required": [ "currency", "total_cost_usd", "funding_sufficient", "price_version", "input_contract_version", "project_id", "input", "edited_from_generation_id", "assets" ], "properties": { "currency": { "const": "usd" }, "total_cost_usd": { "type": "string", "pattern": "^(?:0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "funding_sufficient": { "type": "boolean" }, "price_version": { "type": "string", "minLength": 1 }, "input_contract_version": { "type": "integer", "minimum": 1 }, "project_id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "input": { "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "const": "trend" }, "lookback_days": { "type": "integer", "minimum": 1, "maximum": 30 }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "topic" }, "topic": { "type": "string", "minLength": 1, "maxLength": 2000, "x-max-utf8-bytes": 2000 }, "evidence_scope": { "type": "string", "enum": [ "project", "project_and_web" ] }, "lookback_days": { "type": "integer", "minimum": 1, "maximum": 30 }, "source_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "collection_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type", "topic" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "knowledge" }, "source_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "collection_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type" ], "additionalProperties": false } ] }, "edited_from_generation_id": { "type": "string", "pattern": "^gen_[A-Za-z0-9_-]+$" }, "assets": { "type": "array", "minItems": 1, "maxItems": 10, "items": { "type": "object", "additionalProperties": false, "required": [ "asset_type", "normalized_options", "cost_usd", "basis", "contract_version", "requested_model", "model_used", "effective_voice_id", "effective_avatar_id", "logo", "product_visual_source_ids", "original_asset_id" ], "properties": { "asset_type": { "$ref": "#/components/schemas/AssetType" }, "normalized_options": { "description": "One normalized first-class Asset options contract. Exact schemas are also discoverable from GET /asset-types.", "anyOf": [ { "type": "object", "properties": { "target_words": { "default": 1200, "type": "integer", "minimum": 500, "maximum": 3000 } }, "required": [ "target_words" ], "additionalProperties": false }, { "type": "object", "properties": { "page_count": { "default": 10, "type": "integer", "minimum": 4, "maximum": 30 }, "format": { "default": "auto", "type": "string", "enum": [ "auto", "checklist", "cheat_sheet", "workbook", "planner", "tracker", "scorecard", "roadmap", "challenge", "swipe_file", "resource_guide", "comparison_guide", "meal_plan" ] } }, "required": [ "page_count", "format" ], "additionalProperties": false }, { "type": "object", "properties": { "chapter_count": { "default": 6, "type": "integer", "minimum": 3, "maximum": 12 }, "target_pages": { "default": 30, "type": "integer", "minimum": 15, "maximum": 60 } }, "required": [ "chapter_count", "target_pages" ], "additionalProperties": false }, { "type": "object", "properties": { "slide_count": { "default": 12, "type": "integer", "minimum": 5, "maximum": 30 }, "aspect_ratio": { "default": "16:9", "type": "string", "enum": [ "16:9", "4:3" ] } }, "required": [ "slide_count", "aspect_ratio" ], "additionalProperties": false }, { "type": "object", "properties": { "aspect_ratio": { "default": "4:5", "type": "string", "enum": [ "1:1", "4:5", "9:16", "16:9" ] }, "resolution": { "default": "standard", "type": "string", "enum": [ "standard", "high" ] } }, "required": [ "aspect_ratio", "resolution" ], "additionalProperties": false }, { "type": "object", "properties": { "question_count": { "default": 10, "type": "integer", "minimum": 5, "maximum": 30 }, "difficulty": { "default": "intermediate", "type": "string", "enum": [ "beginner", "intermediate", "advanced" ] } }, "required": [ "question_count", "difficulty" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 600, "type": "integer", "minimum": 120, "maximum": 14400 } }, "required": [ "duration_seconds" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 30, "type": "integer", "minimum": 5, "maximum": 180 }, "aspect_ratio": { "default": "9:16", "type": "string", "enum": [ "9:16", "1:1", "16:9" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 90, "type": "integer", "minimum": 30, "maximum": 600 }, "aspect_ratio": { "default": "16:9", "type": "string", "enum": [ "16:9", "9:16", "1:1" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 60, "type": "integer", "minimum": 15, "maximum": 180 }, "aspect_ratio": { "default": "16:9", "type": "string", "enum": [ "16:9", "9:16", "1:1" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 120, "type": "integer", "minimum": 30, "maximum": 600 }, "aspect_ratio": { "default": "16:9", "type": "string", "enum": [ "16:9", "9:16", "1:1" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] }, "product_visual_source_ids": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "^[A-Za-z0-9_-]+$" }, "uniqueItems": true } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 30, "type": "integer", "minimum": 5, "maximum": 120 }, "aspect_ratio": { "default": "9:16", "type": "string", "enum": [ "9:16", "1:1", "16:9" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false } ] }, "normalized_model_options": { "type": "object", "additionalProperties": true, "description": "Present only when the exact model has normalized native options." }, "cost_usd": { "type": "string", "pattern": "^(?:0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "basis": { "type": "string", "minLength": 1 }, "contract_version": { "type": "integer", "minimum": 1 }, "requested_model": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] }, "model_used": { "type": "string", "minLength": 1 }, "effective_voice_id": { "oneOf": [ { "type": "string", "pattern": "^voice_[A-Za-z0-9_-]+$" }, { "type": "null" } ] }, "effective_avatar_id": { "oneOf": [ { "type": "string", "pattern": "^avatar_[A-Za-z0-9_-]+$" }, { "type": "null" } ] }, "logo": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "id", "revision" ], "properties": { "id": { "type": "string", "minLength": 1 }, "revision": { "type": "integer", "minimum": 1 } } }, { "type": "null" } ] }, "product_visual_source_ids": { "type": "array", "maxItems": 20, "uniqueItems": true, "items": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" } }, "original_asset_id": { "type": "string", "pattern": "^ast_[A-Za-z0-9_-]+$" } } } } } }, "Generation": { "type": "object", "additionalProperties": false, "required": [ "id", "project_id", "edited_from_generation_id", "status", "currency", "created_at" ], "properties": { "id": { "type": "string", "pattern": "^gen_[A-Za-z0-9_-]+$" }, "project_id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "edited_from_generation_id": { "oneOf": [ { "type": "string", "pattern": "^gen_[A-Za-z0-9_-]+$" }, { "type": "null" } ] }, "content_loop_run_id": { "oneOf": [ { "type": "string", "pattern": "^run_[A-Za-z0-9_-]+$" }, { "type": "null" } ] }, "status": { "type": "string", "enum": [ "queued", "researching", "generating", "succeeded", "partially_succeeded", "failed", "cancelled" ] }, "input": { "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "const": "trend" }, "lookback_days": { "type": "integer", "minimum": 1, "maximum": 30 }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "topic" }, "topic": { "type": "string", "minLength": 1, "maxLength": 2000, "x-max-utf8-bytes": 2000 }, "evidence_scope": { "type": "string", "enum": [ "project", "project_and_web" ] }, "lookback_days": { "type": "integer", "minimum": 1, "maximum": 30 }, "source_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "collection_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type", "topic" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "knowledge" }, "source_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "collection_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type" ], "additionalProperties": false } ] }, "input_contract_version": { "type": "integer", "minimum": 1 }, "resolved_context": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "topic", "angle", "qualification_reason", "key_facts", "input_type", "evidence", "retrieved_chunk_ids" ], "properties": { "topic": { "type": "string", "minLength": 1, "maxLength": 160 }, "angle": { "type": "string", "minLength": 1, "maxLength": 320 }, "qualification_reason": { "type": "string", "minLength": 1, "maxLength": 240 }, "key_facts": { "type": "array", "minItems": 1, "maxItems": 12, "items": { "type": "string", "minLength": 1, "maxLength": 500 } }, "input_type": { "type": "string", "enum": [ "trend", "topic", "knowledge" ] }, "evidence": { "type": "array", "maxItems": 12, "items": { "type": "object", "additionalProperties": false, "required": [ "evidence_id", "title", "url", "published_at", "excerpt", "retrieved_at" ], "properties": { "evidence_id": { "type": "string", "pattern": "^web_[a-f0-9]{32}$" }, "title": { "type": "string", "minLength": 1, "maxLength": 500 }, "url": { "type": "string", "format": "uri" }, "published_at": { "type": "string", "format": "date-time" }, "excerpt": { "type": "string", "minLength": 1, "maxLength": 4000 }, "retrieved_at": { "type": "string", "format": "date-time" } } } }, "retrieved_chunk_ids": { "type": "array", "maxItems": 10000, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } } } }, { "type": "null" } ] }, "currency": { "const": "usd" }, "reserved_cost_usd": { "type": "string", "pattern": "^(?:0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "settled_cost_usd": { "type": "string", "pattern": "^(?:0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "released_cost_usd": { "type": "string", "pattern": "^(?:0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "max_cost_usd": { "type": "string", "pattern": "^(?:0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "error": { "oneOf": [ { "type": "object", "additionalProperties": true }, { "type": "null" } ] }, "poll_after_seconds": { "type": "integer", "minimum": 1, "maximum": 15 }, "created_at": { "type": "string", "format": "date-time" }, "completed_at": { "oneOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "assets": { "type": "array", "minItems": 1, "maxItems": 10, "items": { "oneOf": [ { "$ref": "#/components/schemas/GenerationAssetSummary" }, { "$ref": "#/components/schemas/Asset" } ] } } } }, "GenerationAssetSummary": { "type": "object", "additionalProperties": false, "required": [ "id", "asset_type", "status" ], "properties": { "id": { "type": "string", "pattern": "^ast_[A-Za-z0-9_-]+$" }, "asset_type": { "$ref": "#/components/schemas/AssetType" }, "status": { "type": "string", "enum": [ "queued", "generating", "succeeded", "failed", "cancelled" ] }, "title": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] }, "reserved_cost_usd": { "type": "string", "pattern": "^(?:0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "cost_usd": { "type": "string", "pattern": "^(?:0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "requested_model": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] }, "model_used": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] }, "voice_id": { "oneOf": [ { "type": "string", "pattern": "^voice_[A-Za-z0-9_-]+$" }, { "type": "null" } ] }, "avatar_id": { "oneOf": [ { "type": "string", "pattern": "^avatar_[A-Za-z0-9_-]+$" }, { "type": "null" } ] }, "logo_revision_id": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] } } }, "Asset": { "type": "object", "additionalProperties": false, "required": [ "id", "generation_id", "project_id", "asset_type", "status", "created_at" ], "properties": { "id": { "type": "string", "pattern": "^ast_[A-Za-z0-9_-]+$" }, "generation_id": { "type": "string", "pattern": "^gen_[A-Za-z0-9_-]+$" }, "project_id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "asset_type": { "$ref": "#/components/schemas/AssetType" }, "title": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] }, "status": { "type": "string", "enum": [ "queued", "generating", "succeeded", "failed", "cancelled" ] }, "origin": { "type": "string", "enum": [ "one_off", "content_loop" ] }, "language": { "type": "string", "minLength": 2, "maxLength": 255, "format": "bcp47" }, "instructions": { "oneOf": [ { "type": "string", "maxLength": 4000 }, { "type": "null" } ] }, "normalized_options": { "description": "One normalized first-class Asset options contract. Exact schemas are also discoverable from GET /asset-types.", "anyOf": [ { "type": "object", "properties": { "target_words": { "default": 1200, "type": "integer", "minimum": 500, "maximum": 3000 } }, "required": [ "target_words" ], "additionalProperties": false }, { "type": "object", "properties": { "page_count": { "default": 10, "type": "integer", "minimum": 4, "maximum": 30 }, "format": { "default": "auto", "type": "string", "enum": [ "auto", "checklist", "cheat_sheet", "workbook", "planner", "tracker", "scorecard", "roadmap", "challenge", "swipe_file", "resource_guide", "comparison_guide", "meal_plan" ] } }, "required": [ "page_count", "format" ], "additionalProperties": false }, { "type": "object", "properties": { "chapter_count": { "default": 6, "type": "integer", "minimum": 3, "maximum": 12 }, "target_pages": { "default": 30, "type": "integer", "minimum": 15, "maximum": 60 } }, "required": [ "chapter_count", "target_pages" ], "additionalProperties": false }, { "type": "object", "properties": { "slide_count": { "default": 12, "type": "integer", "minimum": 5, "maximum": 30 }, "aspect_ratio": { "default": "16:9", "type": "string", "enum": [ "16:9", "4:3" ] } }, "required": [ "slide_count", "aspect_ratio" ], "additionalProperties": false }, { "type": "object", "properties": { "aspect_ratio": { "default": "4:5", "type": "string", "enum": [ "1:1", "4:5", "9:16", "16:9" ] }, "resolution": { "default": "standard", "type": "string", "enum": [ "standard", "high" ] } }, "required": [ "aspect_ratio", "resolution" ], "additionalProperties": false }, { "type": "object", "properties": { "question_count": { "default": 10, "type": "integer", "minimum": 5, "maximum": 30 }, "difficulty": { "default": "intermediate", "type": "string", "enum": [ "beginner", "intermediate", "advanced" ] } }, "required": [ "question_count", "difficulty" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 600, "type": "integer", "minimum": 120, "maximum": 14400 } }, "required": [ "duration_seconds" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 30, "type": "integer", "minimum": 5, "maximum": 180 }, "aspect_ratio": { "default": "9:16", "type": "string", "enum": [ "9:16", "1:1", "16:9" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 90, "type": "integer", "minimum": 30, "maximum": 600 }, "aspect_ratio": { "default": "16:9", "type": "string", "enum": [ "16:9", "9:16", "1:1" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 60, "type": "integer", "minimum": 15, "maximum": 180 }, "aspect_ratio": { "default": "16:9", "type": "string", "enum": [ "16:9", "9:16", "1:1" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 120, "type": "integer", "minimum": 30, "maximum": 600 }, "aspect_ratio": { "default": "16:9", "type": "string", "enum": [ "16:9", "9:16", "1:1" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] }, "product_visual_source_ids": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "^[A-Za-z0-9_-]+$" }, "uniqueItems": true } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 30, "type": "integer", "minimum": 5, "maximum": 120 }, "aspect_ratio": { "default": "9:16", "type": "string", "enum": [ "9:16", "1:1", "16:9" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false } ] }, "contract_version": { "type": "integer", "minimum": 1 }, "requested_model": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] }, "model_used": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] }, "presentation_mode": { "oneOf": [ { "type": "string", "enum": [ "faceless", "avatar" ] }, { "type": "null" } ] }, "effective_voice_id": { "oneOf": [ { "type": "string", "pattern": "^voice_[A-Za-z0-9_-]+$" }, { "type": "null" } ] }, "effective_avatar_id": { "oneOf": [ { "type": "string", "pattern": "^avatar_[A-Za-z0-9_-]+$" }, { "type": "null" } ] }, "logo_revision_id": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] }, "product_visual_source_revision_ids": { "type": "array", "maxItems": 20, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } }, "resolved_subject": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] }, "currency": { "const": "usd" }, "reserved_cost_usd": { "type": "string", "pattern": "^(?:0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "cost_usd": { "type": "string", "pattern": "^(?:0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "released_cost_usd": { "type": "string", "pattern": "^(?:0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "created_at": { "type": "string", "format": "date-time" }, "completed_at": { "oneOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "artifacts": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "kind", "mime_type", "is_primary", "url", "size_bytes", "verification" ], "properties": { "id": { "type": "string", "pattern": "^art_[A-Za-z0-9_-]+$" }, "kind": { "type": "string", "minLength": 1 }, "mime_type": { "type": "string", "minLength": 1 }, "is_primary": { "type": "boolean" }, "url": { "type": "string", "format": "uri" }, "size_bytes": { "type": "integer", "minimum": 0 }, "verification": { "type": "object", "additionalProperties": false, "required": [ "passed", "issues" ], "properties": { "passed": { "const": true }, "issues": { "type": "array", "maxItems": 0, "items": false } } } } } }, "feedback": { "oneOf": [ { "$ref": "#/components/schemas/AssetFeedback" }, { "type": "null" } ] }, "error": { "oneOf": [ { "type": "object", "additionalProperties": true }, { "type": "null" } ] } } }, "AssetFeedback": { "type": "object", "additionalProperties": false, "required": [ "revision", "rating", "reason", "created_at" ], "properties": { "revision": { "type": "integer", "minimum": 1 }, "rating": { "type": "string", "enum": [ "useful", "not_useful" ] }, "reason": { "oneOf": [ { "type": "string", "maxLength": 1000 }, { "type": "null" } ] }, "created_at": { "type": "string", "format": "date-time" } } }, "ContentLoop": { "type": "object", "additionalProperties": false, "required": [ "id", "project_id", "name", "status", "revision", "created_at", "updated_at" ], "properties": { "id": { "type": "string", "pattern": "^loop_[A-Za-z0-9_-]+$" }, "project_id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "name": { "type": "string", "minLength": 1 }, "status": { "type": "string", "enum": [ "active", "paused", "archived" ] }, "revision": { "type": "integer", "minimum": 1 }, "input": { "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "const": "trend" }, "lookback_days": { "type": "integer", "minimum": 1, "maximum": 30 }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "topic" }, "topic": { "type": "string", "minLength": 1, "maxLength": 2000, "x-max-utf8-bytes": 2000 }, "evidence_scope": { "type": "string", "enum": [ "project", "project_and_web" ] }, "lookback_days": { "type": "integer", "minimum": 1, "maximum": 30 }, "source_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "collection_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type", "topic" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "knowledge" }, "source_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "collection_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type" ], "additionalProperties": false } ] }, "instructions": { "oneOf": [ { "type": "string", "maxLength": 4000 }, { "type": "null" } ] }, "schedule": { "oneOf": [ { "type": "object", "properties": { "frequency": { "type": "string", "const": "daily" }, "local_time": { "type": "string", "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$" }, "timezone": { "type": "string", "minLength": 1, "maxLength": 100, "format": "iana-time-zone" } }, "required": [ "frequency", "local_time", "timezone" ], "additionalProperties": false }, { "type": "object", "properties": { "frequency": { "type": "string", "const": "weekly" }, "day_of_week": { "type": "string", "enum": [ "monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday" ] }, "local_time": { "type": "string", "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$" }, "timezone": { "type": "string", "minLength": 1, "maxLength": 100, "format": "iana-time-zone" } }, "required": [ "frequency", "day_of_week", "local_time", "timezone" ], "additionalProperties": false }, { "type": "object", "properties": { "frequency": { "type": "string", "const": "monthly" }, "day_of_month": { "type": "integer", "minimum": 1, "maximum": 31 }, "local_time": { "type": "string", "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$" }, "timezone": { "type": "string", "minLength": 1, "maxLength": 100, "format": "iana-time-zone" } }, "required": [ "frequency", "day_of_month", "local_time", "timezone" ], "additionalProperties": false } ] }, "assets": { "type": "array", "minItems": 1, "maxItems": 10, "items": { "type": "object", "properties": { "asset_type": { "type": "string", "enum": [ "article", "lead_magnet", "ebook", "slides", "infographic", "quiz", "podcast_episode", "short_video", "explainer_video", "launch_video", "product_demo_video", "ad_video" ] }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 }, "language": { "type": "string", "minLength": 2, "maxLength": 255, "format": "bcp47" }, "options": { "description": "One normalized first-class Asset options contract. Exact schemas are also discoverable from GET /asset-types.", "anyOf": [ { "type": "object", "properties": { "target_words": { "default": 1200, "type": "integer", "minimum": 500, "maximum": 3000 } }, "required": [ "target_words" ], "additionalProperties": false }, { "type": "object", "properties": { "page_count": { "default": 10, "type": "integer", "minimum": 4, "maximum": 30 }, "format": { "default": "auto", "type": "string", "enum": [ "auto", "checklist", "cheat_sheet", "workbook", "planner", "tracker", "scorecard", "roadmap", "challenge", "swipe_file", "resource_guide", "comparison_guide", "meal_plan" ] } }, "required": [ "page_count", "format" ], "additionalProperties": false }, { "type": "object", "properties": { "chapter_count": { "default": 6, "type": "integer", "minimum": 3, "maximum": 12 }, "target_pages": { "default": 30, "type": "integer", "minimum": 15, "maximum": 60 } }, "required": [ "chapter_count", "target_pages" ], "additionalProperties": false }, { "type": "object", "properties": { "slide_count": { "default": 12, "type": "integer", "minimum": 5, "maximum": 30 }, "aspect_ratio": { "default": "16:9", "type": "string", "enum": [ "16:9", "4:3" ] } }, "required": [ "slide_count", "aspect_ratio" ], "additionalProperties": false }, { "type": "object", "properties": { "aspect_ratio": { "default": "4:5", "type": "string", "enum": [ "1:1", "4:5", "9:16", "16:9" ] }, "resolution": { "default": "standard", "type": "string", "enum": [ "standard", "high" ] } }, "required": [ "aspect_ratio", "resolution" ], "additionalProperties": false }, { "type": "object", "properties": { "question_count": { "default": 10, "type": "integer", "minimum": 5, "maximum": 30 }, "difficulty": { "default": "intermediate", "type": "string", "enum": [ "beginner", "intermediate", "advanced" ] } }, "required": [ "question_count", "difficulty" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 600, "type": "integer", "minimum": 120, "maximum": 14400 } }, "required": [ "duration_seconds" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 30, "type": "integer", "minimum": 5, "maximum": 180 }, "aspect_ratio": { "default": "9:16", "type": "string", "enum": [ "9:16", "1:1", "16:9" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 90, "type": "integer", "minimum": 30, "maximum": 600 }, "aspect_ratio": { "default": "16:9", "type": "string", "enum": [ "16:9", "9:16", "1:1" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 60, "type": "integer", "minimum": 15, "maximum": 180 }, "aspect_ratio": { "default": "16:9", "type": "string", "enum": [ "16:9", "9:16", "1:1" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 120, "type": "integer", "minimum": 30, "maximum": 600 }, "aspect_ratio": { "default": "16:9", "type": "string", "enum": [ "16:9", "9:16", "1:1" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] }, "product_visual_source_ids": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "^[A-Za-z0-9_-]+$" }, "uniqueItems": true } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 30, "type": "integer", "minimum": 5, "maximum": 120 }, "aspect_ratio": { "default": "9:16", "type": "string", "enum": [ "9:16", "1:1", "16:9" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false } ] }, "voice_id": { "type": "string", "pattern": "^voice_[A-Za-z0-9_-]+$" }, "avatar_id": { "type": "string", "pattern": "^avatar_[A-Za-z0-9_-]+$" }, "model": { "type": "string", "minLength": 1, "maxLength": 200 }, "model_options": { "type": "object", "description": "Validated by the exact versioned schema returned from GET /models for the pinned model.", "additionalProperties": true, "x-schema-source": "GET /models.model_options_schema" } }, "required": [ "asset_type" ], "additionalProperties": false, "dependentRequired": { "model_options": [ "model" ] } } }, "language": { "oneOf": [ { "type": "string", "minLength": 2, "maxLength": 255, "format": "bcp47" }, { "type": "null" } ] }, "max_cost_per_run_usd": { "type": "string", "pattern": "^(?:0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "max_cost_per_month_usd": { "type": "string", "pattern": "^(?:0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "next_run_at": { "oneOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "pause_reason": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] }, "consecutive_no_qualified_runs": { "type": "integer", "minimum": 0 }, "current_month_usage": { "type": "object", "additionalProperties": false, "required": [ "billing_period_id", "settled_usd", "reserved_usd" ], "properties": { "billing_period_id": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] }, "settled_usd": { "type": "string", "pattern": "^(?:0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "reserved_usd": { "type": "string", "pattern": "^(?:0|[1-9][0-9]{0,5})\\.[0-9]{2}$" } } }, "last_run": { "oneOf": [ { "$ref": "#/components/schemas/ContentLoopRun" }, { "type": "null" } ] }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } }, "ContentLoopRun": { "type": "object", "additionalProperties": false, "required": [ "id", "content_loop_id", "project_id", "generation_id", "trigger", "status", "currency", "created_at" ], "properties": { "id": { "type": "string", "pattern": "^run_[A-Za-z0-9_-]+$" }, "content_loop_id": { "type": "string", "pattern": "^loop_[A-Za-z0-9_-]+$" }, "project_id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "generation_id": { "oneOf": [ { "type": "string", "pattern": "^gen_[A-Za-z0-9_-]+$" }, { "type": "null" } ] }, "trigger": { "type": "string", "enum": [ "scheduled", "manual" ] }, "scheduled_for": { "oneOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "status": { "type": "string", "enum": [ "queued", "researching", "generating", "succeeded", "partially_succeeded", "failed", "budget_blocked", "configuration_blocked", "cancelled" ] }, "configuration_snapshot": { "type": "object", "additionalProperties": false, "required": [ "content_loop_id", "content_loop_revision", "generated_name", "configuration", "accepted_quote" ], "properties": { "content_loop_id": { "type": "string", "pattern": "^loop_[A-Za-z0-9_-]+$" }, "content_loop_revision": { "type": "integer", "minimum": 1 }, "generated_name": { "type": "string", "minLength": 1, "maxLength": 200 }, "configuration": { "type": "object", "properties": { "project_id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "input": { "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "const": "trend" }, "lookback_days": { "type": "integer", "minimum": 1, "maximum": 30 }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "topic" }, "topic": { "type": "string", "minLength": 1, "maxLength": 2000, "x-max-utf8-bytes": 2000 }, "evidence_scope": { "type": "string", "enum": [ "project", "project_and_web" ] }, "lookback_days": { "type": "integer", "minimum": 1, "maximum": 30 }, "source_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "collection_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type", "topic" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "knowledge" }, "source_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "collection_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type" ], "additionalProperties": false } ] }, "instructions": { "oneOf": [ { "type": "string", "minLength": 1, "maxLength": 4000 }, { "type": "null" } ] }, "schedule": { "oneOf": [ { "type": "object", "properties": { "frequency": { "type": "string", "const": "daily" }, "local_time": { "type": "string", "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$" }, "timezone": { "type": "string", "minLength": 1, "maxLength": 100, "format": "iana-time-zone" } }, "required": [ "frequency", "local_time", "timezone" ], "additionalProperties": false }, { "type": "object", "properties": { "frequency": { "type": "string", "const": "weekly" }, "day_of_week": { "type": "string", "enum": [ "monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday" ] }, "local_time": { "type": "string", "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$" }, "timezone": { "type": "string", "minLength": 1, "maxLength": 100, "format": "iana-time-zone" } }, "required": [ "frequency", "day_of_week", "local_time", "timezone" ], "additionalProperties": false }, { "type": "object", "properties": { "frequency": { "type": "string", "const": "monthly" }, "day_of_month": { "type": "integer", "minimum": 1, "maximum": 31 }, "local_time": { "type": "string", "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$" }, "timezone": { "type": "string", "minLength": 1, "maxLength": 100, "format": "iana-time-zone" } }, "required": [ "frequency", "day_of_month", "local_time", "timezone" ], "additionalProperties": false } ] }, "assets": { "type": "array", "minItems": 1, "maxItems": 10, "items": { "type": "object", "properties": { "asset_type": { "type": "string", "enum": [ "article", "lead_magnet", "ebook", "slides", "infographic", "quiz", "podcast_episode", "short_video", "explainer_video", "launch_video", "product_demo_video", "ad_video" ] }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 }, "language": { "type": "string", "minLength": 2, "maxLength": 255, "format": "bcp47" }, "options": { "description": "One normalized first-class Asset options contract. Exact schemas are also discoverable from GET /asset-types.", "anyOf": [ { "type": "object", "properties": { "target_words": { "default": 1200, "type": "integer", "minimum": 500, "maximum": 3000 } }, "required": [ "target_words" ], "additionalProperties": false }, { "type": "object", "properties": { "page_count": { "default": 10, "type": "integer", "minimum": 4, "maximum": 30 }, "format": { "default": "auto", "type": "string", "enum": [ "auto", "checklist", "cheat_sheet", "workbook", "planner", "tracker", "scorecard", "roadmap", "challenge", "swipe_file", "resource_guide", "comparison_guide", "meal_plan" ] } }, "required": [ "page_count", "format" ], "additionalProperties": false }, { "type": "object", "properties": { "chapter_count": { "default": 6, "type": "integer", "minimum": 3, "maximum": 12 }, "target_pages": { "default": 30, "type": "integer", "minimum": 15, "maximum": 60 } }, "required": [ "chapter_count", "target_pages" ], "additionalProperties": false }, { "type": "object", "properties": { "slide_count": { "default": 12, "type": "integer", "minimum": 5, "maximum": 30 }, "aspect_ratio": { "default": "16:9", "type": "string", "enum": [ "16:9", "4:3" ] } }, "required": [ "slide_count", "aspect_ratio" ], "additionalProperties": false }, { "type": "object", "properties": { "aspect_ratio": { "default": "4:5", "type": "string", "enum": [ "1:1", "4:5", "9:16", "16:9" ] }, "resolution": { "default": "standard", "type": "string", "enum": [ "standard", "high" ] } }, "required": [ "aspect_ratio", "resolution" ], "additionalProperties": false }, { "type": "object", "properties": { "question_count": { "default": 10, "type": "integer", "minimum": 5, "maximum": 30 }, "difficulty": { "default": "intermediate", "type": "string", "enum": [ "beginner", "intermediate", "advanced" ] } }, "required": [ "question_count", "difficulty" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 600, "type": "integer", "minimum": 120, "maximum": 14400 } }, "required": [ "duration_seconds" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 30, "type": "integer", "minimum": 5, "maximum": 180 }, "aspect_ratio": { "default": "9:16", "type": "string", "enum": [ "9:16", "1:1", "16:9" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 90, "type": "integer", "minimum": 30, "maximum": 600 }, "aspect_ratio": { "default": "16:9", "type": "string", "enum": [ "16:9", "9:16", "1:1" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 60, "type": "integer", "minimum": 15, "maximum": 180 }, "aspect_ratio": { "default": "16:9", "type": "string", "enum": [ "16:9", "9:16", "1:1" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 120, "type": "integer", "minimum": 30, "maximum": 600 }, "aspect_ratio": { "default": "16:9", "type": "string", "enum": [ "16:9", "9:16", "1:1" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] }, "product_visual_source_ids": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "^[A-Za-z0-9_-]+$" }, "uniqueItems": true } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 30, "type": "integer", "minimum": 5, "maximum": 120 }, "aspect_ratio": { "default": "9:16", "type": "string", "enum": [ "9:16", "1:1", "16:9" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false } ] }, "voice_id": { "type": "string", "pattern": "^voice_[A-Za-z0-9_-]+$" }, "avatar_id": { "type": "string", "pattern": "^avatar_[A-Za-z0-9_-]+$" }, "model": { "type": "string", "minLength": 1, "maxLength": 200 }, "model_options": { "type": "object", "description": "Validated by the exact versioned schema returned from GET /models for the pinned model.", "additionalProperties": true, "x-schema-source": "GET /models.model_options_schema" } }, "required": [ "asset_type" ], "additionalProperties": false, "dependentRequired": { "model_options": [ "model" ] } }, "x-unique-by": "asset_type" }, "language": { "oneOf": [ { "type": "string", "minLength": 2, "maxLength": 255, "format": "bcp47" }, { "type": "null" } ] }, "max_cost_per_run_usd": { "type": "string", "pattern": "^(0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "max_cost_per_month_usd": { "type": "string", "pattern": "^(0|[1-9][0-9]{0,5})\\.[0-9]{2}$" } }, "required": [ "project_id", "input", "instructions", "schedule", "assets", "language", "max_cost_per_run_usd", "max_cost_per_month_usd" ], "additionalProperties": false }, "accepted_quote": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "price_usd", "price_version", "normalized_request" ], "properties": { "price_usd": { "type": "string", "pattern": "^(?:0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "price_version": { "type": "string", "minLength": 1 }, "normalized_request": { "type": "object", "properties": { "project_id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "input": { "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "const": "trend" }, "lookback_days": { "type": "integer", "minimum": 1, "maximum": 30 }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "topic" }, "topic": { "type": "string", "minLength": 1, "maxLength": 2000, "x-max-utf8-bytes": 2000 }, "evidence_scope": { "type": "string", "enum": [ "project", "project_and_web" ] }, "lookback_days": { "type": "integer", "minimum": 1, "maximum": 30 }, "source_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "collection_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type", "topic" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "knowledge" }, "source_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "collection_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "pattern": "^col_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 } }, "required": [ "type" ], "additionalProperties": false } ] }, "attachment_source_ids": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" }, "uniqueItems": true }, "instructions": { "oneOf": [ { "type": "string", "minLength": 1, "maxLength": 4000 }, { "type": "null" } ] }, "language": { "oneOf": [ { "type": "string", "minLength": 2, "maxLength": 255, "format": "bcp47" }, { "type": "null" } ] }, "assets": { "type": "array", "minItems": 1, "maxItems": 10, "items": { "type": "object", "properties": { "asset_type": { "type": "string", "enum": [ "article", "lead_magnet", "ebook", "slides", "infographic", "quiz", "podcast_episode", "short_video", "explainer_video", "launch_video", "product_demo_video", "ad_video" ] }, "instructions": { "type": "string", "minLength": 1, "maxLength": 4000, "x-max-utf8-bytes": 4000 }, "language": { "type": "string", "minLength": 2, "maxLength": 255, "format": "bcp47" }, "options": { "description": "One normalized first-class Asset options contract. Exact schemas are also discoverable from GET /asset-types.", "anyOf": [ { "type": "object", "properties": { "target_words": { "default": 1200, "type": "integer", "minimum": 500, "maximum": 3000 } }, "required": [ "target_words" ], "additionalProperties": false }, { "type": "object", "properties": { "page_count": { "default": 10, "type": "integer", "minimum": 4, "maximum": 30 }, "format": { "default": "auto", "type": "string", "enum": [ "auto", "checklist", "cheat_sheet", "workbook", "planner", "tracker", "scorecard", "roadmap", "challenge", "swipe_file", "resource_guide", "comparison_guide", "meal_plan" ] } }, "required": [ "page_count", "format" ], "additionalProperties": false }, { "type": "object", "properties": { "chapter_count": { "default": 6, "type": "integer", "minimum": 3, "maximum": 12 }, "target_pages": { "default": 30, "type": "integer", "minimum": 15, "maximum": 60 } }, "required": [ "chapter_count", "target_pages" ], "additionalProperties": false }, { "type": "object", "properties": { "slide_count": { "default": 12, "type": "integer", "minimum": 5, "maximum": 30 }, "aspect_ratio": { "default": "16:9", "type": "string", "enum": [ "16:9", "4:3" ] } }, "required": [ "slide_count", "aspect_ratio" ], "additionalProperties": false }, { "type": "object", "properties": { "aspect_ratio": { "default": "4:5", "type": "string", "enum": [ "1:1", "4:5", "9:16", "16:9" ] }, "resolution": { "default": "standard", "type": "string", "enum": [ "standard", "high" ] } }, "required": [ "aspect_ratio", "resolution" ], "additionalProperties": false }, { "type": "object", "properties": { "question_count": { "default": 10, "type": "integer", "minimum": 5, "maximum": 30 }, "difficulty": { "default": "intermediate", "type": "string", "enum": [ "beginner", "intermediate", "advanced" ] } }, "required": [ "question_count", "difficulty" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 600, "type": "integer", "minimum": 120, "maximum": 14400 } }, "required": [ "duration_seconds" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 30, "type": "integer", "minimum": 5, "maximum": 180 }, "aspect_ratio": { "default": "9:16", "type": "string", "enum": [ "9:16", "1:1", "16:9" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 90, "type": "integer", "minimum": 30, "maximum": 600 }, "aspect_ratio": { "default": "16:9", "type": "string", "enum": [ "16:9", "9:16", "1:1" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 60, "type": "integer", "minimum": 15, "maximum": 180 }, "aspect_ratio": { "default": "16:9", "type": "string", "enum": [ "16:9", "9:16", "1:1" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 120, "type": "integer", "minimum": 30, "maximum": 600 }, "aspect_ratio": { "default": "16:9", "type": "string", "enum": [ "16:9", "9:16", "1:1" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] }, "product_visual_source_ids": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "^[A-Za-z0-9_-]+$" }, "uniqueItems": true } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false }, { "type": "object", "properties": { "duration_seconds": { "default": 30, "type": "integer", "minimum": 5, "maximum": 120 }, "aspect_ratio": { "default": "9:16", "type": "string", "enum": [ "9:16", "1:1", "16:9" ] }, "resolution": { "default": "1080p", "type": "string", "enum": [ "720p", "1080p" ] }, "captions": { "default": true, "type": "boolean" }, "presentation_mode": { "default": "faceless", "type": "string", "enum": [ "faceless", "avatar" ] } }, "required": [ "duration_seconds", "aspect_ratio", "resolution", "captions", "presentation_mode" ], "additionalProperties": false } ] }, "voice_id": { "type": "string", "pattern": "^voice_[A-Za-z0-9_-]+$" }, "avatar_id": { "type": "string", "pattern": "^avatar_[A-Za-z0-9_-]+$" }, "model": { "type": "string", "minLength": 1, "maxLength": 200 }, "model_options": { "type": "object", "description": "Validated by the exact versioned schema returned from GET /models for the pinned model.", "additionalProperties": true, "x-schema-source": "GET /models.model_options_schema" } }, "required": [ "asset_type" ], "additionalProperties": false, "dependentRequired": { "model_options": [ "model" ] } }, "x-unique-by": "asset_type" } }, "required": [ "project_id", "input", "instructions", "language", "assets" ], "additionalProperties": false } } }, { "type": "null" } ] } } }, "project_snapshot": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "profile_revision": { "type": "integer", "minimum": 0 }, "name": { "type": "string", "minLength": 1, "maxLength": 200 }, "website_url": { "type": "string", "format": "uri" }, "description": { "type": "string", "maxLength": 4000 }, "category": { "type": "string", "maxLength": 500 }, "audience": { "type": "string", "maxLength": 2000 }, "research_locale": { "type": "string", "minLength": 2, "maxLength": 255, "format": "bcp47" }, "relevant_keywords": { "type": "array", "maxItems": 50, "uniqueItems": true, "items": { "type": "string", "maxLength": 200 } }, "competitor_keywords": { "type": "array", "maxItems": 50, "uniqueItems": true, "items": { "type": "string", "maxLength": 200 } }, "excluded_keywords": { "type": "array", "maxItems": 50, "uniqueItems": true, "items": { "type": "string", "maxLength": 200 } }, "allow_competitor_mentions": { "type": "boolean" }, "status": { "type": "string", "enum": [ "analyzing", "needs_review", "ready", "failed", "archived" ] }, "logo_revision_id": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] }, "default_voice_id": { "oneOf": [ { "type": "string", "pattern": "^voice_[A-Za-z0-9_-]+$" }, { "type": "null" } ] }, "default_avatar_id": { "oneOf": [ { "type": "string", "pattern": "^avatar_[A-Za-z0-9_-]+$" }, { "type": "null" } ] }, "brand": { "type": "object", "additionalProperties": false, "properties": { "instructions": { "type": "string", "maxLength": 2000 }, "colors": { "type": "array", "maxItems": 8, "uniqueItems": true, "items": { "type": "string", "pattern": "^#[0-9A-F]{6}$" } }, "logo_revision_id": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] }, "default_voice_id": { "oneOf": [ { "type": "string", "pattern": "^voice_[A-Za-z0-9_-]+$" }, { "type": "null" } ] }, "default_avatar_id": { "oneOf": [ { "type": "string", "pattern": "^avatar_[A-Za-z0-9_-]+$" }, { "type": "null" } ] } } } } }, "resolved_context": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "topic", "angle", "qualification_reason", "evidence" ], "properties": { "topic": { "type": "string", "minLength": 1, "maxLength": 160 }, "angle": { "type": "string", "maxLength": 320 }, "qualification_reason": { "type": "string", "maxLength": 240 }, "evidence": { "type": "array", "maxItems": 12, "items": { "type": "object", "additionalProperties": false, "required": [ "evidence_id", "title", "url", "published_at", "excerpt", "retrieved_at" ], "properties": { "evidence_id": { "type": "string", "pattern": "^web_[a-f0-9]{32}$" }, "title": { "type": "string", "minLength": 1, "maxLength": 500 }, "url": { "type": "string", "format": "uri" }, "published_at": { "type": "string", "format": "date-time" }, "excerpt": { "type": "string", "minLength": 1, "maxLength": 4000 }, "retrieved_at": { "type": "string", "format": "date-time" } } } } } }, { "type": "null" } ] }, "currency": { "const": "usd" }, "reserved_cost_usd": { "type": "string", "pattern": "^(?:0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "settled_cost_usd": { "type": "string", "pattern": "^(?:0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "released_cost_usd": { "type": "string", "pattern": "^(?:0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "billing_period_id": { "type": "string", "minLength": 1 }, "period_starts_at": { "type": "string", "format": "date-time" }, "period_ends_at": { "type": "string", "format": "date-time" }, "topic_memory_revision_used": { "oneOf": [ { "type": "integer", "minimum": 1 }, { "type": "null" } ] }, "block_reason": { "oneOf": [ { "type": "string", "enum": [ "per_run_cap", "loop_period_cap", "promotion_exhausted", "prepaid_balance_insufficient", "project_not_ready", "billing_restricted", "invalid_configuration", "model_retired", "source_not_ready" ] }, { "type": "null" } ] }, "error": { "oneOf": [ { "type": "object", "additionalProperties": true }, { "type": "null" } ] }, "created_at": { "type": "string", "format": "date-time" }, "completed_at": { "oneOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] } } }, "ContentLoopRunFeedback": { "type": "object", "additionalProperties": false, "required": [ "content_loop_run_id", "rating", "topic_memory_revision", "created_at" ], "properties": { "content_loop_run_id": { "type": "string", "pattern": "^run_[A-Za-z0-9_-]+$" }, "rating": { "type": "string", "enum": [ "good_topic", "bad_topic" ] }, "topic_memory_revision": { "type": "integer", "minimum": 1 }, "created_at": { "type": "string", "format": "date-time" } } }, "Account": { "type": "object", "additionalProperties": false, "required": [ "id", "email", "display_name", "plan", "platform_oauth_audience", "scopes" ], "properties": { "id": { "type": "string", "pattern": "^acct_[A-Za-z0-9_-]+$" }, "email": { "type": "string", "format": "email" }, "display_name": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] }, "plan": { "type": "string", "enum": [ "sandbox", "payg" ] }, "platform_oauth_audience": { "type": "string", "minLength": 1 }, "scopes": { "type": "array", "uniqueItems": true, "items": { "type": "string" } } } }, "ApiKey": { "type": "object", "additionalProperties": false, "required": [ "id", "prefix", "name", "scopes", "created_at" ], "properties": { "id": { "type": "string", "pattern": "^key_[A-Za-z0-9_-]+$" }, "prefix": { "type": "string", "minLength": 1 }, "name": { "type": "string", "minLength": 1, "maxLength": 80 }, "scopes": { "type": "array", "uniqueItems": true, "items": { "type": "string" } }, "created_at": { "type": "string", "format": "date-time" }, "last_used_at": { "oneOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "secret": { "oneOf": [ { "type": "string", "pattern": "^acp_" }, { "type": "null" } ] }, "secret_unavailable": { "type": "boolean" }, "rotate_guidance": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] } } }, "ApiKeyRevocation": { "type": "object", "additionalProperties": false, "required": [ "id", "revoked_at" ], "properties": { "id": { "type": "string", "pattern": "^key_[A-Za-z0-9_-]+$" }, "revoked_at": { "type": "string", "format": "date-time" } } }, "BillingUsage": { "type": "object", "additionalProperties": false, "required": [ "plan", "funding_status", "currency", "promotion_status", "promotional_remaining_usd", "promotion_expires_at", "prepaid_available_usd", "prepaid_reserved_usd", "prepayment_minimum_usd", "prepayment_maximum_usd", "month_to_date", "concurrency", "resources", "period_starts_at", "period_ends_at" ], "properties": { "plan": { "type": "string", "enum": [ "sandbox", "payg" ] }, "funding_status": { "type": "string", "enum": [ "not_required", "available", "depleted", "restricted" ] }, "currency": { "const": "usd" }, "promotion_status": { "type": "string", "enum": [ "pending", "active", "expired", "not_applicable" ] }, "promotional_remaining_usd": { "type": "string", "pattern": "^(?:0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "promotion_expires_at": { "oneOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "prepaid_available_usd": { "type": "string", "pattern": "^(?:0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "prepaid_reserved_usd": { "type": "string", "pattern": "^(?:0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "prepayment_minimum_usd": { "type": "string", "pattern": "^(?:0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "prepayment_maximum_usd": { "type": "string", "pattern": "^(?:0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "month_to_date": { "type": "object", "additionalProperties": false, "required": [ "settled_usd", "reserved_usd" ], "properties": { "settled_usd": { "type": "string", "pattern": "^(?:0|[1-9][0-9]{0,5})\\.[0-9]{2}$" }, "reserved_usd": { "type": "string", "pattern": "^(?:0|[1-9][0-9]{0,5})\\.[0-9]{2}$" } } }, "concurrency": { "type": "object", "additionalProperties": false, "required": [ "in_use", "limit" ], "properties": { "in_use": { "type": "integer", "minimum": 0 }, "limit": { "type": "integer", "minimum": 1 } } }, "resources": { "type": "object", "additionalProperties": false, "required": [ "projects", "active_content_loops", "provider_operations" ], "properties": { "projects": { "$ref": "#/components/schemas/UsageCounter" }, "active_content_loops": { "$ref": "#/components/schemas/UsageCounter" }, "provider_operations": { "type": "object", "additionalProperties": false, "required": [ "project_analyses", "source_ingestions", "custom_voice_creations", "custom_avatar_creations" ], "properties": { "project_analyses": { "$ref": "#/components/schemas/OperationUsageCounter" }, "source_ingestions": { "$ref": "#/components/schemas/OperationUsageCounter" }, "custom_voice_creations": { "$ref": "#/components/schemas/OperationUsageCounter" }, "custom_avatar_creations": { "$ref": "#/components/schemas/OperationUsageCounter" } } } } }, "period_starts_at": { "type": "string", "format": "date-time" }, "period_ends_at": { "type": "string", "format": "date-time" } } }, "UsageCounter": { "type": "object", "additionalProperties": false, "required": [ "in_use", "limit" ], "properties": { "in_use": { "type": "integer", "minimum": 0 }, "limit": { "oneOf": [ { "type": "integer", "minimum": 1 }, { "type": "null" } ] } } }, "OperationUsageCounter": { "type": "object", "additionalProperties": false, "required": [ "used", "limit", "reset_at" ], "properties": { "used": { "type": "integer", "minimum": 0 }, "limit": { "type": "integer", "minimum": 1 }, "reset_at": { "oneOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] } } }, "PrepaymentSession": { "type": "object", "additionalProperties": false, "required": [ "prepaid_purchase_id", "checkout_session_id", "checkout_url", "expires_at" ], "properties": { "prepaid_purchase_id": { "type": "string", "minLength": 1 }, "checkout_session_id": { "type": "string", "minLength": 1 }, "checkout_url": { "type": "string", "format": "uri" }, "expires_at": { "type": "string", "format": "date-time" } } }, "Webhook": { "type": "object", "additionalProperties": false, "required": [ "id", "url", "status", "created_at" ], "properties": { "id": { "type": "string", "pattern": "^wh_[A-Za-z0-9_-]+$" }, "url": { "type": "string", "format": "uri" }, "status": { "type": "string", "enum": [ "active", "disabled" ] }, "created_at": { "type": "string", "format": "date-time" }, "secret": { "oneOf": [ { "type": "string", "pattern": "^whsec_" }, { "type": "null" } ] }, "secret_unavailable": { "type": "boolean" }, "recreate_guidance": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ] } } }, "ResourceError": { "type": "object", "additionalProperties": false, "required": [ "code", "message" ], "properties": { "code": { "type": "string", "minLength": 1 }, "message": { "type": "string", "minLength": 1 } } }, "AssetType": { "type": "string", "enum": [ "article", "lead_magnet", "ebook", "slides", "infographic", "quiz", "podcast_episode", "short_video", "explainer_video", "launch_video", "product_demo_video", "ad_video" ] }, "QuizV1": { "type": "object", "additionalProperties": false, "required": [ "schema_version", "title", "difficulty", "questions", "scoring" ], "properties": { "schema_version": { "type": "string", "const": "quiz.v1" }, "title": { "type": "string", "minLength": 1, "maxLength": 200 }, "difficulty": { "type": "string", "enum": [ "beginner", "intermediate", "advanced" ] }, "questions": { "type": "array", "minItems": 5, "maxItems": 30, "items": { "type": "object", "additionalProperties": false, "required": [ "id", "type", "prompt", "choices", "correct_choice_ids", "points", "explanation", "tags" ], "properties": { "id": { "type": "string", "pattern": "^[A-Za-z0-9_-]{1,64}$" }, "type": { "type": "string", "enum": [ "single_choice", "multiple_choice", "true_false" ] }, "prompt": { "type": "string", "minLength": 1, "maxLength": 2000 }, "choices": { "type": "array", "minItems": 2, "maxItems": 6, "items": { "type": "object", "additionalProperties": false, "required": [ "id", "text" ], "properties": { "id": { "type": "string", "pattern": "^[A-Za-z0-9_-]{1,64}$" }, "text": { "type": "string", "minLength": 1, "maxLength": 1000 } } } }, "correct_choice_ids": { "type": "array", "minItems": 1, "maxItems": 5, "uniqueItems": true, "items": { "type": "string", "pattern": "^[A-Za-z0-9_-]{1,64}$" } }, "points": { "type": "integer", "minimum": 1, "maximum": 100 }, "explanation": { "type": "string", "minLength": 1, "maxLength": 2000 }, "tags": { "type": "array", "maxItems": 10, "uniqueItems": true, "items": { "type": "string", "minLength": 1, "maxLength": 100 } } } } }, "scoring": { "type": "object", "additionalProperties": false, "required": [ "method", "maximum_points" ], "properties": { "method": { "type": "string", "const": "sum_points" }, "maximum_points": { "type": "integer", "minimum": 1, "maximum": 3000 } } } } }, "LeadMagnetProvenanceV1": { "type": "object", "properties": { "schema_version": { "type": "string", "const": "lead-magnet-provenance.v1" }, "title": { "type": "string", "minLength": 1, "maxLength": 200 }, "offer": { "type": "object", "properties": { "format": { "type": "string", "enum": [ "checklist", "cheat_sheet", "workbook", "planner", "tracker", "scorecard", "roadmap", "challenge", "swipe_file", "resource_guide", "comparison_guide", "meal_plan" ] }, "reader_problem": { "type": "string", "minLength": 1, "maxLength": 500 }, "promised_outcome": { "type": "string", "minLength": 1, "maxLength": 500 }, "completion_artifact": { "type": "string", "minLength": 1, "maxLength": 500 }, "time_to_value": { "type": "string", "minLength": 1, "maxLength": 120 }, "usage_mode": { "type": "string", "enum": [ "read", "print_and_write", "both" ] }, "usage_instructions": { "type": "string", "minLength": 60, "maxLength": 500 }, "format_rationale": { "type": "string", "minLength": 1, "maxLength": 500 } }, "required": [ "format", "reader_problem", "promised_outcome", "completion_artifact", "time_to_value", "usage_mode", "usage_instructions", "format_rationale" ], "additionalProperties": false }, "narrative": { "type": "object", "properties": { "opening_problem": { "type": "string", "minLength": 80, "maxLength": 500 }, "core_insight": { "type": "string", "minLength": 80, "maxLength": 500 }, "transformation_steps": { "minItems": 3, "maxItems": 6, "type": "array", "items": { "type": "string", "minLength": 60, "maxLength": 320 } }, "closing_outcome": { "type": "string", "minLength": 80, "maxLength": 500 } }, "required": [ "opening_problem", "core_insight", "transformation_steps", "closing_outcome" ], "additionalProperties": false }, "creative_concept": { "type": "object", "properties": { "concept_name": { "type": "string", "minLength": 1, "maxLength": 160 }, "editorial_character": { "type": "string", "minLength": 1, "maxLength": 800 }, "medium": { "type": "string", "minLength": 1, "maxLength": 500 }, "typography": { "type": "object", "properties": { "display_direction": { "type": "string", "minLength": 1, "maxLength": 500 }, "body_direction": { "type": "string", "minLength": 1, "maxLength": 500 }, "hierarchy_rules": { "type": "string", "minLength": 1, "maxLength": 700 } }, "required": [ "display_direction", "body_direction", "hierarchy_rules" ], "additionalProperties": false }, "palette": { "minItems": 3, "maxItems": 8, "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 80 }, "hex": { "type": "string", "pattern": "^#[0-9A-Fa-f]{6}$" }, "purpose": { "type": "string", "minLength": 1, "maxLength": 240 } }, "required": [ "name", "hex", "purpose" ], "additionalProperties": false } }, "grid": { "type": "object", "properties": { "columns": { "type": "integer", "minimum": 2, "maximum": 12 }, "margins": { "type": "string", "minLength": 1, "maxLength": 300 }, "gutters": { "type": "string", "minLength": 1, "maxLength": 300 }, "alignment_logic": { "type": "string", "minLength": 1, "maxLength": 500 } }, "required": [ "columns", "margins", "gutters", "alignment_logic" ], "additionalProperties": false }, "imagery_treatment": { "type": "string", "minLength": 1, "maxLength": 800 }, "recurring_motifs": { "minItems": 1, "maxItems": 6, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 300 } }, "layout_families": { "minItems": 2, "maxItems": 6, "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 100 }, "purpose": { "type": "string", "minLength": 1, "maxLength": 300 }, "composition_logic": { "type": "string", "minLength": 1, "maxLength": 500 } }, "required": [ "name", "purpose", "composition_logic" ], "additionalProperties": false } }, "document_rhythm": { "type": "object", "properties": { "density_arc": { "type": "string", "minLength": 1, "maxLength": 700 }, "recurring_anchors": { "minItems": 1, "maxItems": 6, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 300 } } }, "required": [ "density_arc", "recurring_anchors" ], "additionalProperties": false }, "avoid": { "minItems": 1, "maxItems": 12, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 300 } } }, "required": [ "concept_name", "editorial_character", "medium", "typography", "palette", "grid", "imagery_treatment", "recurring_motifs", "layout_families", "document_rhythm", "avoid" ], "additionalProperties": false }, "page_count": { "type": "integer", "minimum": 4, "maximum": 30 }, "logo_revision_id": { "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "^[A-Za-z0-9_-]+$" }, { "type": "null" } ] }, "evidence": { "maxItems": 500, "type": "array", "items": { "type": "object", "properties": { "revision_id": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "^[A-Za-z0-9_-]+$" }, "title": { "type": "string", "minLength": 1, "maxLength": 500 }, "url": { "type": "string", "maxLength": 2000, "format": "uri" } }, "required": [ "revision_id", "title" ], "additionalProperties": false } }, "pages": { "minItems": 4, "maxItems": 30, "type": "array", "items": { "type": "object", "properties": { "page_number": { "type": "integer", "minimum": 1, "maximum": 30 }, "archetype": { "type": "string", "enum": [ "cover", "how_to_use", "section_opener", "reference", "framework", "checklist", "process", "comparison", "case_study", "worksheet", "planner", "tracker", "scorecard", "challenge", "swipe_file", "resource_guide", "meal_plan", "roadmap", "recap", "cta" ] }, "narrative_role": { "type": "string", "enum": [ "promise", "orient", "teach", "apply", "synthesize", "act" ] }, "story_bridge": { "type": "string", "minLength": 50, "maxLength": 260 }, "editorial_goal": { "type": "string", "minLength": 1, "maxLength": 500 }, "reader_action": { "type": "string", "minLength": 1, "maxLength": 240 }, "completion_state": { "type": "string", "minLength": 1, "maxLength": 240 }, "completion_artifact_contribution": { "type": "string", "minLength": 1, "maxLength": 240 }, "header": { "type": "object", "properties": { "eyebrow": { "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 80 }, { "type": "null" } ], "description": "Optional short category or section marker, or null." }, "headline": { "type": "string", "minLength": 1, "maxLength": 180, "description": "The dominant page headline. On the cover this must exactly equal the document title." }, "subtitle": { "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 180 }, { "type": "null" } ], "description": "Optional supporting deck below or beside the headline, or null." }, "footer": { "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 120 }, { "type": "null" } ], "description": "Optional visible footer copy, or null. Do not put the Project logo here." } }, "required": [ "eyebrow", "headline", "subtitle", "footer" ], "additionalProperties": false }, "components": { "maxItems": 6, "type": "array", "items": { "oneOf": [ { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "^[A-Za-z0-9_-]+$" }, "heading": { "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 100 }, { "type": "null" } ] }, "type": { "type": "string", "const": "prose" }, "paragraphs": { "minItems": 1, "maxItems": 3, "type": "array", "items": { "type": "string", "minLength": 60, "maxLength": 260 } } }, "required": [ "id", "heading", "type", "paragraphs" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "^[A-Za-z0-9_-]+$" }, "type": { "type": "string", "const": "guidance" }, "heading": { "type": "string", "minLength": 1, "maxLength": 100 }, "context": { "type": "string", "minLength": 80, "maxLength": 320 }, "instruction": { "type": "string", "minLength": 60, "maxLength": 260 }, "example": { "anyOf": [ { "type": "string", "minLength": 60, "maxLength": 260 }, { "type": "null" } ] }, "success_criterion": { "type": "string", "minLength": 50, "maxLength": 220 } }, "required": [ "id", "type", "heading", "context", "instruction", "example", "success_criterion" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "^[A-Za-z0-9_-]+$" }, "heading": { "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 100 }, { "type": "null" } ] }, "type": { "type": "string", "const": "checklist" }, "groups": { "minItems": 1, "maxItems": 4, "type": "array", "items": { "type": "object", "properties": { "label": { "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 100 }, { "type": "null" } ] }, "items": { "minItems": 1, "maxItems": 8, "type": "array", "items": { "type": "object", "properties": { "text": { "type": "string", "minLength": 1, "maxLength": 120 }, "completion_criterion": { "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 100 }, { "type": "null" } ] } }, "required": [ "text", "completion_criterion" ], "additionalProperties": false } } }, "required": [ "label", "items" ], "additionalProperties": false } } }, "required": [ "id", "heading", "type", "groups" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "^[A-Za-z0-9_-]+$" }, "heading": { "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 100 }, { "type": "null" } ] }, "type": { "type": "string", "const": "steps" }, "items": { "minItems": 2, "maxItems": 8, "type": "array", "items": { "type": "object", "properties": { "label": { "type": "string", "minLength": 1, "maxLength": 80 }, "action": { "type": "string", "minLength": 1, "maxLength": 160 }, "outcome": { "type": "string", "minLength": 1, "maxLength": 120 } }, "required": [ "label", "action", "outcome" ], "additionalProperties": false } } }, "required": [ "id", "heading", "type", "items" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "^[A-Za-z0-9_-]+$" }, "heading": { "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 100 }, { "type": "null" } ] }, "type": { "type": "string", "const": "table" }, "columns": { "minItems": 2, "maxItems": 6, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 60 } }, "rows": { "minItems": 2, "maxItems": 12, "type": "array", "items": { "type": "object", "properties": { "cells": { "minItems": 2, "maxItems": 6, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 100 } } }, "required": [ "cells" ], "additionalProperties": false } } }, "required": [ "id", "heading", "type", "columns", "rows" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "^[A-Za-z0-9_-]+$" }, "heading": { "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 100 }, { "type": "null" } ] }, "type": { "type": "string", "const": "worksheet" }, "instruction": { "type": "string", "minLength": 1, "maxLength": 180 }, "worked_example": { "type": "string", "minLength": 40, "maxLength": 260 }, "prompts": { "minItems": 1, "maxItems": 6, "type": "array", "items": { "anyOf": [ { "type": "object", "properties": { "prompt": { "type": "string", "minLength": 1, "maxLength": 140 }, "response_label": { "type": "string", "minLength": 1, "maxLength": 80 }, "response_lines": { "type": "integer", "minimum": 1, "maximum": 8 } }, "required": [ "prompt", "response_label", "response_lines" ], "additionalProperties": false }, { "type": "object", "properties": { "prompt": { "type": "string", "minLength": 1, "maxLength": 140 }, "response_label": { "type": "string", "minLength": 1, "maxLength": 80 }, "response_lines": { "type": "number", "const": 0 }, "response_control": { "type": "object", "properties": { "type": { "type": "string", "const": "single_choice" }, "options": { "minItems": 2, "maxItems": 8, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 80 } } }, "required": [ "type", "options" ], "additionalProperties": false } }, "required": [ "prompt", "response_label", "response_lines", "response_control" ], "additionalProperties": false }, { "type": "object", "properties": { "prompt": { "type": "string", "minLength": 1, "maxLength": 140 }, "response_label": { "type": "string", "minLength": 1, "maxLength": 80 }, "response_lines": { "type": "number", "const": 0 }, "response_control": { "type": "object", "properties": { "type": { "type": "string", "const": "allocation" }, "options": { "minItems": 2, "maxItems": 8, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 80 } }, "total": { "type": "integer", "minimum": 1, "maximum": 1000 }, "total_display": { "type": "string", "minLength": 1, "maxLength": 80 } }, "required": [ "type", "options", "total", "total_display" ], "additionalProperties": false } }, "required": [ "prompt", "response_label", "response_lines", "response_control" ], "additionalProperties": false } ] } }, "completion_prompt": { "type": "string", "minLength": 1, "maxLength": 140 } }, "required": [ "id", "heading", "type", "instruction", "worked_example", "prompts", "completion_prompt" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "^[A-Za-z0-9_-]+$" }, "heading": { "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 100 }, { "type": "null" } ] }, "type": { "type": "string", "const": "scorecard" }, "questions": { "minItems": 3, "maxItems": 12, "type": "array", "items": { "type": "object", "properties": { "question": { "type": "string", "minLength": 1, "maxLength": 140 }, "points": { "type": "integer", "minimum": -10, "maximum": 10 }, "points_display": { "type": "string", "minLength": 1, "maxLength": 60 } }, "required": [ "question", "points", "points_display" ], "additionalProperties": false } }, "scoring_instruction": { "type": "string", "minLength": 1, "maxLength": 180 }, "worked_example": { "type": "string", "minLength": 40, "maxLength": 260 }, "result_bands": { "minItems": 2, "maxItems": 6, "type": "array", "items": { "type": "object", "properties": { "minimum": { "type": "integer", "minimum": -120, "maximum": 120 }, "maximum": { "type": "integer", "minimum": -120, "maximum": 120 }, "range_display": { "type": "string", "minLength": 1, "maxLength": 80 }, "label": { "type": "string", "minLength": 1, "maxLength": 80 }, "action": { "type": "string", "minLength": 1, "maxLength": 140 } }, "required": [ "minimum", "maximum", "range_display", "label", "action" ], "additionalProperties": false } } }, "required": [ "id", "heading", "type", "questions", "scoring_instruction", "worked_example", "result_bands" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "^[A-Za-z0-9_-]+$" }, "heading": { "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 100 }, { "type": "null" } ] }, "type": { "type": "string", "const": "cards" }, "cards": { "minItems": 2, "maxItems": 8, "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 80 }, "body": { "type": "string", "minLength": 1, "maxLength": 260 }, "variable_labels": { "maxItems": 5, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 60 } } }, "required": [ "title", "body", "variable_labels" ], "additionalProperties": false } } }, "required": [ "id", "heading", "type", "cards" ], "additionalProperties": false } ] } }, "cta": { "anyOf": [ { "type": "object", "properties": { "label": { "type": "string", "minLength": 1, "maxLength": 80 }, "action": { "type": "string", "minLength": 1, "maxLength": 140 }, "supporting_text": { "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 160 }, { "type": "null" } ] } }, "required": [ "label", "action", "supporting_text" ], "additionalProperties": false }, { "type": "null" } ] }, "generated_visual": { "type": "object", "properties": { "mode": { "type": "string", "enum": [ "none", "structural", "typographic", "illustrative", "photographic", "diagrammatic", "mixed" ] }, "medium": { "type": "string", "minLength": 1, "maxLength": 300 }, "subject": { "type": "string", "minLength": 1, "maxLength": 400 }, "elements": { "maxItems": 8, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 180 } }, "composition": { "type": "string", "minLength": 1, "maxLength": 500 }, "semantic_purpose": { "type": "string", "minLength": 1, "maxLength": 300 }, "reference_integration": { "type": "string", "minLength": 1, "maxLength": 400 }, "avoid": { "minItems": 1, "maxItems": 8, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 180 } } }, "required": [ "mode", "medium", "subject", "elements", "composition", "semantic_purpose", "reference_integration", "avoid" ], "additionalProperties": false }, "layout_blueprint": { "type": "object", "properties": { "family": { "type": "string", "minLength": 1, "maxLength": 100 }, "variant": { "type": "string", "minLength": 1, "maxLength": 120 }, "functional_series": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "^[A-Za-z0-9_-]+$" }, "purpose": { "type": "string", "minLength": 1, "maxLength": 240 }, "sequence_index": { "type": "integer", "minimum": 1, "maximum": 30 } }, "required": [ "id", "purpose", "sequence_index" ], "additionalProperties": false }, { "type": "null" } ], "description": "Explicit identity, purpose, and position only for pages that intentionally repeat one functional tool series." }, "hierarchy": { "minItems": 2, "maxItems": 12, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "^[A-Za-z0-9_-]+$" }, "description": "Exact reading priority using reserved header IDs, functional component IDs, cta, and generated_visual." }, "zones": { "minItems": 2, "maxItems": 12, "type": "array", "items": { "type": "object", "properties": { "component_id": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "^[A-Za-z0-9_-]+$" }, "x_percent": { "type": "integer", "minimum": 0, "maximum": 95 }, "y_percent": { "type": "integer", "minimum": 0, "maximum": 95 }, "width_percent": { "type": "integer", "minimum": 5, "maximum": 100 }, "height_percent": { "type": "integer", "minimum": 5, "maximum": 100 }, "layer": { "type": "string", "enum": [ "background", "content", "foreground" ] }, "alignment": { "type": "string", "enum": [ "left", "center", "right", "stretch" ] }, "treatment": { "type": "string", "minLength": 1, "maxLength": 500 } }, "required": [ "component_id", "x_percent", "y_percent", "width_percent", "height_percent", "layer", "alignment", "treatment" ], "additionalProperties": false }, "description": "Proportional placement, relative scale, span, and treatment guidance for each component; not pixel-exact coordinates." }, "focal_point": { "type": "string", "minLength": 1, "maxLength": 500 }, "reading_path": { "type": "string", "minLength": 1, "maxLength": 500 }, "density": { "type": "string", "enum": [ "low", "medium", "high" ] }, "whitespace_allocation": { "type": "object", "properties": { "approximate_percent": { "type": "integer", "minimum": 10, "maximum": 60 }, "intent": { "type": "string", "minLength": 1, "maxLength": 400 }, "protected_zones": { "maxItems": 6, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 240 } } }, "required": [ "approximate_percent", "intent", "protected_zones" ], "additionalProperties": false } }, "required": [ "family", "variant", "functional_series", "hierarchy", "zones", "focal_point", "reading_path", "density", "whitespace_allocation" ], "additionalProperties": false }, "evidence_revision_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "^[A-Za-z0-9_-]+$" } }, "selected_visuals": { "maxItems": 15, "type": "array", "items": { "type": "object", "properties": { "revision_id": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "^[A-Za-z0-9_-]+$" }, "use": { "type": "string", "enum": [ "hero_subject", "editorial_crop", "evidence_inset", "texture", "background", "supporting_detail" ] }, "treatment": { "type": "string", "minLength": 1, "maxLength": 500 }, "source_id": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "^[A-Za-z0-9_-]+$" }, "source_revision_id": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "^[A-Za-z0-9_-]+$" }, "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "byte_size": { "type": "integer", "minimum": 1, "maximum": 20971520 }, "mime_type": { "type": "string", "enum": [ "image/png", "image/jpeg", "image/webp" ] }, "width": { "type": "integer", "minimum": 128, "maximum": 8192 }, "height": { "type": "integer", "minimum": 128, "maximum": 8192 }, "provenance": { "type": "object", "properties": { "kind": { "type": "string", "const": "upload" } }, "required": [ "kind" ], "additionalProperties": false } }, "required": [ "revision_id", "use", "treatment", "source_id", "source_revision_id", "sha256", "byte_size", "mime_type", "width", "height", "provenance" ], "additionalProperties": false } }, "style_reference": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "const": "generated_cover_style" }, "page_number": { "type": "number", "const": 1 }, "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "byte_size": { "type": "integer", "minimum": 1, "maximum": 33554432 }, "mime_type": { "type": "string", "const": "image/png" } }, "required": [ "kind", "page_number", "sha256", "byte_size", "mime_type" ], "additionalProperties": false }, { "type": "null" } ] }, "logo_overlay": { "anyOf": [ { "type": "object", "properties": { "revision_id": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "^[A-Za-z0-9_-]+$" }, "source_sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "rendered_sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "left": { "type": "integer", "minimum": 0, "maximum": 4000 }, "top": { "type": "integer", "minimum": 0, "maximum": 4000 }, "width": { "type": "integer", "minimum": 1, "maximum": 4000 }, "height": { "type": "integer", "minimum": 1, "maximum": 4000 }, "treatment": { "type": "string", "enum": [ "direct", "contrast_halo" ] } }, "required": [ "revision_id", "source_sha256", "rendered_sha256", "left", "top", "width", "height", "treatment" ], "additionalProperties": false }, { "type": "null" } ] }, "image_model": { "type": "object", "properties": { "model_id": { "type": "string", "enum": [ "gpt-image-2", "gpt-image-2-2026-04-21" ] }, "parameters": { "type": "object", "properties": { "size": { "type": "string", "const": "1024x1536" }, "quality": { "type": "string", "const": "high" }, "output_format": { "type": "string", "const": "png" }, "background": { "type": "string", "const": "opaque" } }, "required": [ "size", "quality", "output_format", "background" ], "additionalProperties": false } }, "required": [ "model_id", "parameters" ], "additionalProperties": false }, "generated_page_sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "final_page_sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" } }, "required": [ "page_number", "archetype", "narrative_role", "story_bridge", "editorial_goal", "reader_action", "completion_state", "completion_artifact_contribution", "header", "components", "cta", "generated_visual", "layout_blueprint", "evidence_revision_ids", "selected_visuals", "style_reference", "logo_overlay", "image_model", "generated_page_sha256", "final_page_sha256" ], "additionalProperties": false } } }, "required": [ "schema_version", "title", "offer", "narrative", "creative_concept", "page_count", "logo_revision_id", "evidence", "pages" ], "additionalProperties": false, "allOf": [ { "properties": { "pages": { "prefixItems": [ { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 1 } } }, { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 2 } } }, { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 3 } } }, { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 4 } } }, { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 5 } } }, { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 6 } } }, { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 7 } } }, { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 8 } } }, { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 9 } } }, { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 10 } } }, { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 11 } } }, { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 12 } } }, { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 13 } } }, { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 14 } } }, { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 15 } } }, { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 16 } } }, { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 17 } } }, { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 18 } } }, { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 19 } } }, { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 20 } } }, { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 21 } } }, { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 22 } } }, { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 23 } } }, { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 24 } } }, { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 25 } } }, { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 26 } } }, { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 27 } } }, { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 28 } } }, { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 29 } } }, { "type": "object", "required": [ "page_number" ], "properties": { "page_number": { "const": 30 } } } ], "items": false } } }, { "oneOf": [ { "type": "object", "required": [ "page_count", "pages" ], "properties": { "page_count": { "const": 4 }, "pages": { "minItems": 4, "maxItems": 4 } } }, { "type": "object", "required": [ "page_count", "pages" ], "properties": { "page_count": { "const": 5 }, "pages": { "minItems": 5, "maxItems": 5 } } }, { "type": "object", "required": [ "page_count", "pages" ], "properties": { "page_count": { "const": 6 }, "pages": { "minItems": 6, "maxItems": 6 } } }, { "type": "object", "required": [ "page_count", "pages" ], "properties": { "page_count": { "const": 7 }, "pages": { "minItems": 7, "maxItems": 7 } } }, { "type": "object", "required": [ "page_count", "pages" ], "properties": { "page_count": { "const": 8 }, "pages": { "minItems": 8, "maxItems": 8 } } }, { "type": "object", "required": [ "page_count", "pages" ], "properties": { "page_count": { "const": 9 }, "pages": { "minItems": 9, "maxItems": 9 } } }, { "type": "object", "required": [ "page_count", "pages" ], "properties": { "page_count": { "const": 10 }, "pages": { "minItems": 10, "maxItems": 10 } } }, { "type": "object", "required": [ "page_count", "pages" ], "properties": { "page_count": { "const": 11 }, "pages": { "minItems": 11, "maxItems": 11 } } }, { "type": "object", "required": [ "page_count", "pages" ], "properties": { "page_count": { "const": 12 }, "pages": { "minItems": 12, "maxItems": 12 } } }, { "type": "object", "required": [ "page_count", "pages" ], "properties": { "page_count": { "const": 13 }, "pages": { "minItems": 13, "maxItems": 13 } } }, { "type": "object", "required": [ "page_count", "pages" ], "properties": { "page_count": { "const": 14 }, "pages": { "minItems": 14, "maxItems": 14 } } }, { "type": "object", "required": [ "page_count", "pages" ], "properties": { "page_count": { "const": 15 }, "pages": { "minItems": 15, "maxItems": 15 } } }, { "type": "object", "required": [ "page_count", "pages" ], "properties": { "page_count": { "const": 16 }, "pages": { "minItems": 16, "maxItems": 16 } } }, { "type": "object", "required": [ "page_count", "pages" ], "properties": { "page_count": { "const": 17 }, "pages": { "minItems": 17, "maxItems": 17 } } }, { "type": "object", "required": [ "page_count", "pages" ], "properties": { "page_count": { "const": 18 }, "pages": { "minItems": 18, "maxItems": 18 } } }, { "type": "object", "required": [ "page_count", "pages" ], "properties": { "page_count": { "const": 19 }, "pages": { "minItems": 19, "maxItems": 19 } } }, { "type": "object", "required": [ "page_count", "pages" ], "properties": { "page_count": { "const": 20 }, "pages": { "minItems": 20, "maxItems": 20 } } }, { "type": "object", "required": [ "page_count", "pages" ], "properties": { "page_count": { "const": 21 }, "pages": { "minItems": 21, "maxItems": 21 } } }, { "type": "object", "required": [ "page_count", "pages" ], "properties": { "page_count": { "const": 22 }, "pages": { "minItems": 22, "maxItems": 22 } } }, { "type": "object", "required": [ "page_count", "pages" ], "properties": { "page_count": { "const": 23 }, "pages": { "minItems": 23, "maxItems": 23 } } }, { "type": "object", "required": [ "page_count", "pages" ], "properties": { "page_count": { "const": 24 }, "pages": { "minItems": 24, "maxItems": 24 } } }, { "type": "object", "required": [ "page_count", "pages" ], "properties": { "page_count": { "const": 25 }, "pages": { "minItems": 25, "maxItems": 25 } } }, { "type": "object", "required": [ "page_count", "pages" ], "properties": { "page_count": { "const": 26 }, "pages": { "minItems": 26, "maxItems": 26 } } }, { "type": "object", "required": [ "page_count", "pages" ], "properties": { "page_count": { "const": 27 }, "pages": { "minItems": 27, "maxItems": 27 } } }, { "type": "object", "required": [ "page_count", "pages" ], "properties": { "page_count": { "const": 28 }, "pages": { "minItems": 28, "maxItems": 28 } } }, { "type": "object", "required": [ "page_count", "pages" ], "properties": { "page_count": { "const": 29 }, "pages": { "minItems": 29, "maxItems": 29 } } }, { "type": "object", "required": [ "page_count", "pages" ], "properties": { "page_count": { "const": 30 }, "pages": { "minItems": 30, "maxItems": 30 } } } ] } ] }, "Voice": { "type": "object", "additionalProperties": false, "required": [ "id", "project_id", "display_name", "kind", "status", "compatibility", "created_at", "error" ], "properties": { "id": { "type": "string", "pattern": "^voice_[A-Za-z0-9_-]+$" }, "project_id": { "oneOf": [ { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, { "type": "null" } ] }, "display_name": { "type": "string", "minLength": 1, "maxLength": 80 }, "kind": { "type": "string", "enum": [ "stock", "custom" ] }, "status": { "type": "string", "enum": [ "processing", "ready", "failed", "revoked" ] }, "compatibility": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "asset_type", "model_id", "language" ], "properties": { "asset_type": { "$ref": "#/components/schemas/AssetType" }, "model_id": { "type": "string", "minLength": 1 }, "language": { "type": "string", "minLength": 2, "maxLength": 255, "format": "bcp47" } } } }, "created_at": { "oneOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "error": { "oneOf": [ { "$ref": "#/components/schemas/ResourceError" }, { "type": "null" } ] } } }, "Avatar": { "type": "object", "additionalProperties": false, "required": [ "id", "project_id", "display_name", "kind", "status", "compatibility", "created_at", "error" ], "properties": { "id": { "type": "string", "pattern": "^avatar_[A-Za-z0-9_-]+$" }, "project_id": { "oneOf": [ { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, { "type": "null" } ] }, "display_name": { "type": "string", "minLength": 1, "maxLength": 80 }, "kind": { "type": "string", "enum": [ "stock", "custom" ] }, "status": { "type": "string", "enum": [ "processing", "ready", "failed", "revoked" ] }, "compatibility": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "asset_type", "model_id", "language" ], "properties": { "asset_type": { "$ref": "#/components/schemas/AssetType" }, "model_id": { "type": "string", "minLength": 1 }, "language": { "type": "string", "minLength": 2, "maxLength": 255, "format": "bcp47" } } } }, "created_at": { "oneOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "error": { "oneOf": [ { "$ref": "#/components/schemas/ResourceError" }, { "type": "null" } ] } } }, "WebhookEvent": { "oneOf": [ { "type": "object", "properties": { "id": { "type": "string", "pattern": "^evt_[A-Za-z0-9_-]+$" }, "type": { "type": "string", "const": "project.needs_review" }, "created_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "data": { "type": "object", "properties": { "project_id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "status": { "type": "string", "const": "needs_review" } }, "required": [ "project_id", "status" ], "additionalProperties": false } }, "required": [ "id", "type", "created_at", "data" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string", "pattern": "^evt_[A-Za-z0-9_-]+$" }, "type": { "type": "string", "const": "project.ready" }, "created_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "data": { "type": "object", "properties": { "project_id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "status": { "type": "string", "const": "ready" } }, "required": [ "project_id", "status" ], "additionalProperties": false } }, "required": [ "id", "type", "created_at", "data" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string", "pattern": "^evt_[A-Za-z0-9_-]+$" }, "type": { "type": "string", "const": "source.ready" }, "created_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "data": { "type": "object", "properties": { "project_id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "source_id": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" }, "status": { "type": "string", "const": "ready" } }, "required": [ "project_id", "source_id", "status" ], "additionalProperties": false } }, "required": [ "id", "type", "created_at", "data" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string", "pattern": "^evt_[A-Za-z0-9_-]+$" }, "type": { "type": "string", "const": "source.failed" }, "created_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "data": { "type": "object", "properties": { "project_id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "source_id": { "type": "string", "pattern": "^src_[A-Za-z0-9_-]+$" }, "status": { "type": "string", "const": "failed" } }, "required": [ "project_id", "source_id", "status" ], "additionalProperties": false } }, "required": [ "id", "type", "created_at", "data" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string", "pattern": "^evt_[A-Za-z0-9_-]+$" }, "type": { "type": "string", "const": "generation.succeeded" }, "created_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "data": { "type": "object", "properties": { "project_id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "generation_id": { "type": "string", "pattern": "^gen_[A-Za-z0-9_-]+$" }, "status": { "type": "string", "const": "succeeded" } }, "required": [ "project_id", "generation_id", "status" ], "additionalProperties": false } }, "required": [ "id", "type", "created_at", "data" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string", "pattern": "^evt_[A-Za-z0-9_-]+$" }, "type": { "type": "string", "const": "generation.partially_succeeded" }, "created_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "data": { "type": "object", "properties": { "project_id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "generation_id": { "type": "string", "pattern": "^gen_[A-Za-z0-9_-]+$" }, "status": { "type": "string", "const": "partially_succeeded" } }, "required": [ "project_id", "generation_id", "status" ], "additionalProperties": false } }, "required": [ "id", "type", "created_at", "data" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string", "pattern": "^evt_[A-Za-z0-9_-]+$" }, "type": { "type": "string", "const": "generation.failed" }, "created_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "data": { "type": "object", "properties": { "project_id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "generation_id": { "type": "string", "pattern": "^gen_[A-Za-z0-9_-]+$" }, "status": { "type": "string", "const": "failed" } }, "required": [ "project_id", "generation_id", "status" ], "additionalProperties": false } }, "required": [ "id", "type", "created_at", "data" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string", "pattern": "^evt_[A-Za-z0-9_-]+$" }, "type": { "type": "string", "const": "generation.cancelled" }, "created_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "data": { "type": "object", "properties": { "project_id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "generation_id": { "type": "string", "pattern": "^gen_[A-Za-z0-9_-]+$" }, "status": { "type": "string", "const": "cancelled" } }, "required": [ "project_id", "generation_id", "status" ], "additionalProperties": false } }, "required": [ "id", "type", "created_at", "data" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string", "pattern": "^evt_[A-Za-z0-9_-]+$" }, "type": { "type": "string", "const": "content_loop.configuration_warning" }, "created_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "data": { "type": "object", "properties": { "project_id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "content_loop_id": { "type": "string", "pattern": "^loop_[A-Za-z0-9_-]+$" }, "warning": { "type": "string", "const": "model_deprecated" }, "model_id": { "type": "string", "minLength": 1, "maxLength": 200 }, "retires_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "replacement_model_id": { "type": "string", "minLength": 1, "maxLength": 200 } }, "required": [ "project_id", "content_loop_id", "warning", "model_id", "retires_at", "replacement_model_id" ], "additionalProperties": false } }, "required": [ "id", "type", "created_at", "data" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string", "pattern": "^evt_[A-Za-z0-9_-]+$" }, "type": { "type": "string", "const": "content_loop.paused" }, "created_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "data": { "type": "object", "properties": { "project_id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "content_loop_id": { "type": "string", "pattern": "^loop_[A-Za-z0-9_-]+$" }, "pause_reason": { "type": "string", "enum": [ "manual", "repeated_no_qualified_input", "promotion_exhausted", "prepaid_balance_insufficient", "billing_restricted" ] }, "status": { "type": "string", "const": "paused" } }, "required": [ "project_id", "content_loop_id", "pause_reason", "status" ], "additionalProperties": false } }, "required": [ "id", "type", "created_at", "data" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string", "pattern": "^evt_[A-Za-z0-9_-]+$" }, "type": { "type": "string", "const": "content_loop_run.succeeded" }, "created_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "data": { "type": "object", "properties": { "project_id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "content_loop_id": { "type": "string", "pattern": "^loop_[A-Za-z0-9_-]+$" }, "run_id": { "type": "string", "pattern": "^run_[A-Za-z0-9_-]+$" }, "generation_id": { "type": "string", "pattern": "^gen_[A-Za-z0-9_-]+$" }, "status": { "type": "string", "const": "succeeded" } }, "required": [ "project_id", "content_loop_id", "run_id", "generation_id", "status" ], "additionalProperties": false } }, "required": [ "id", "type", "created_at", "data" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string", "pattern": "^evt_[A-Za-z0-9_-]+$" }, "type": { "type": "string", "const": "content_loop_run.partially_succeeded" }, "created_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "data": { "type": "object", "properties": { "project_id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "content_loop_id": { "type": "string", "pattern": "^loop_[A-Za-z0-9_-]+$" }, "run_id": { "type": "string", "pattern": "^run_[A-Za-z0-9_-]+$" }, "generation_id": { "type": "string", "pattern": "^gen_[A-Za-z0-9_-]+$" }, "status": { "type": "string", "const": "partially_succeeded" } }, "required": [ "project_id", "content_loop_id", "run_id", "generation_id", "status" ], "additionalProperties": false } }, "required": [ "id", "type", "created_at", "data" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string", "pattern": "^evt_[A-Za-z0-9_-]+$" }, "type": { "type": "string", "const": "content_loop_run.failed" }, "created_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "data": { "type": "object", "properties": { "project_id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "content_loop_id": { "type": "string", "pattern": "^loop_[A-Za-z0-9_-]+$" }, "run_id": { "type": "string", "pattern": "^run_[A-Za-z0-9_-]+$" }, "generation_id": { "anyOf": [ { "type": "string", "pattern": "^gen_[A-Za-z0-9_-]+$" }, { "type": "null" } ] }, "status": { "type": "string", "const": "failed" } }, "required": [ "project_id", "content_loop_id", "run_id", "generation_id", "status" ], "additionalProperties": false } }, "required": [ "id", "type", "created_at", "data" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string", "pattern": "^evt_[A-Za-z0-9_-]+$" }, "type": { "type": "string", "const": "content_loop_run.budget_blocked" }, "created_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "data": { "type": "object", "properties": { "project_id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "content_loop_id": { "type": "string", "pattern": "^loop_[A-Za-z0-9_-]+$" }, "run_id": { "type": "string", "pattern": "^run_[A-Za-z0-9_-]+$" }, "generation_id": { "type": "null" }, "block_reason": { "type": "string", "enum": [ "per_run_cap", "loop_period_cap", "promotion_exhausted", "prepaid_balance_insufficient" ] }, "status": { "type": "string", "const": "budget_blocked" } }, "required": [ "project_id", "content_loop_id", "run_id", "generation_id", "block_reason", "status" ], "additionalProperties": false } }, "required": [ "id", "type", "created_at", "data" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string", "pattern": "^evt_[A-Za-z0-9_-]+$" }, "type": { "type": "string", "const": "content_loop_run.configuration_blocked" }, "created_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "data": { "type": "object", "properties": { "project_id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "content_loop_id": { "type": "string", "pattern": "^loop_[A-Za-z0-9_-]+$" }, "run_id": { "type": "string", "pattern": "^run_[A-Za-z0-9_-]+$" }, "generation_id": { "type": "null" }, "block_reason": { "type": "string", "enum": [ "project_not_ready", "billing_restricted", "invalid_configuration", "model_retired", "source_not_ready" ] }, "status": { "type": "string", "const": "configuration_blocked" } }, "required": [ "project_id", "content_loop_id", "run_id", "generation_id", "block_reason", "status" ], "additionalProperties": false } }, "required": [ "id", "type", "created_at", "data" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string", "pattern": "^evt_[A-Za-z0-9_-]+$" }, "type": { "type": "string", "const": "content_loop_run.cancelled" }, "created_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "data": { "type": "object", "properties": { "project_id": { "type": "string", "pattern": "^prj_[A-Za-z0-9_-]+$" }, "content_loop_id": { "type": "string", "pattern": "^loop_[A-Za-z0-9_-]+$" }, "run_id": { "type": "string", "pattern": "^run_[A-Za-z0-9_-]+$" }, "generation_id": { "type": "string", "pattern": "^gen_[A-Za-z0-9_-]+$" }, "status": { "type": "string", "const": "cancelled" } }, "required": [ "project_id", "content_loop_id", "run_id", "generation_id", "status" ], "additionalProperties": false } }, "required": [ "id", "type", "created_at", "data" ], "additionalProperties": false } ], "discriminator": { "propertyName": "type" }, "description": "Canonical signed webhook body. Verify HMAC-SHA256 over `.`, require x-autocontent-event-id to equal body.id, reject timestamps outside a ±300-second window, and deduplicate by id." }, "ErrorDetail": { "type": "object", "additionalProperties": false, "required": [ "reason" ], "properties": { "field": { "type": "string" }, "reason": { "type": "string" } } }, "ErrorBody": { "type": "object", "additionalProperties": false, "required": [ "code", "message", "correlation_id", "doc_url" ], "properties": { "code": { "type": "string", "enum": [ "invalid_request", "unknown_asset_type", "invalid_asset_options", "invalid_model_options", "model_not_supported", "model_retired", "project_not_ready", "project_limit_exceeded", "provider_operation_limit_exceeded", "source_not_ready", "source_unreachable", "source_paywalled", "product_visual_required", "no_qualified_trend", "no_qualified_knowledge", "input_resolution_failed", "max_cost_exceeded", "payment_required", "content_loop_budget_exceeded", "content_loop_limit_exceeded", "idempotency_conflict", "idempotency_in_progress", "consent_required", "voice_not_found", "voice_not_ready", "voice_not_supported", "avatar_not_found", "avatar_not_ready", "avatar_not_supported", "artifact_verification_failed", "rate_limited", "webhook_limit_exceeded", "not_found", "unauthorized", "forbidden", "internal_error" ] }, "message": { "type": "string" }, "details": { "oneOf": [ { "type": "array", "items": { "$ref": "#/components/schemas/ErrorDetail" } }, { "type": "object" } ] }, "correlation_id": { "type": "string", "pattern": "^corr_[A-Za-z0-9_-]+$" }, "doc_url": { "type": "string", "format": "uri" } } }, "ErrorEnvelope": { "type": "object", "additionalProperties": false, "required": [ "error" ], "properties": { "error": { "$ref": "#/components/schemas/ErrorBody" } } } }, "responses": { "AutoContentError": { "description": "Normalized AutoContent error; provider payloads are never returned.", "headers": { "Retry-After": { "description": "Whole seconds before retry when the error supplies a bounded retry time.", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" }, "example": { "error": { "code": "max_cost_exceeded", "message": "Current price exceeds max_cost_usd.", "correlation_id": "corr_42", "doc_url": "https://docs.autocontentapi.com/errors/max-cost-exceeded" } } } } } } } }