{"openapi":"3.0.3","info":{"title":"Tolstoy API","version":"1.0.0","description":"The Tolstoy developer API — programmatic access to the AI commerce platform\n(AI Studio, AI Player, AI Shopper) for developers and AI agents.\n\nEvery endpoint requires an authenticated workspace token. Authenticate with\nOAuth 2.0 (authorization server https://apilb.gotolstoy.com/mcp/v1, scope\n`workspace`), or create a Tolstoy API key in your workspace and exchange it for\nan access token at POST /account-service/authenticateCliApiKey with the\n`X-CLI-API-Key` header. Send the token as `Authorization: Bearer <token>` and\ninclude your workspace `appKey` in the request body.\n\nThis surface mirrors the official CLI (`@tolstoy-ai/cli` on npm) and the Tolstoy\nMCP server (https://apilb.gotolstoy.com/mcp/v1/mcp). Full docs:\nhttps://developers.gotolstoy.com","contact":{"name":"Tolstoy Developer Hub","url":"https://developers.gotolstoy.com"}},"externalDocs":{"description":"Tolstoy developer documentation","url":"https://developers.gotolstoy.com"},"servers":[{"url":"https://api.gotolstoy.com","description":"Production (Lambda APIs)"},{"url":"https://apilb.gotolstoy.com","description":"Production (load-balancer APIs)"}],"tags":[{"name":"products","description":"Product catalog: search, media, Shopify collections"},{"name":"stores","description":"Stores connected to the authenticated workspace"},{"name":"studio","description":"Studio-generated asset management"},{"name":"video","description":"VOD asset search and mutations"},{"name":"ai-tools","description":"AI tool invocations (LLM, image, audio)"}],"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}],"paths":{"/products-service/getProduct":{"post":{"operationId":"products_getProduct","summary":"Get a product by external ID","tags":["products"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appUrl":{"type":"string","description":"Store URL"},"productId":{"type":"string","description":"External product ID"},"skipVariantMetafields":{"type":"boolean","description":"Skip live variant metafield enrichment"}},"required":["appUrl","productId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"product":{"type":"object","properties":{"id":{"type":"number"},"externalProductId":{"type":"string"},"appUrl":{"type":"string"},"title":{"type":"string"},"handle":{"type":"string"},"description":{"type":"string","nullable":true},"vendor":{"type":"string","nullable":true},"productType":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"status":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"providerCreatedAt":{"type":"string","format":"date-time","nullable":true},"providerUpdatedAt":{"type":"string","format":"date-time","nullable":true},"platform":{"type":"string"},"version":{"type":"number"},"descriptionHtml":{"type":"string","nullable":true},"category":{"type":"object","properties":{"gid":{"type":"string"},"fullName":{"type":"string"},"name":{"type":"string"}},"required":["gid","fullName","name"],"additionalProperties":false,"nullable":true},"templateSuffix":{"type":"string","nullable":true},"featuredMediaId":{"type":"string","nullable":true},"featuredMediaPreviewUrl":{"type":"string","nullable":true},"publishedAt":{"type":"string","nullable":true},"currencyCode":{"type":"string","nullable":true},"currencySymbol":{"type":"string","nullable":true},"media":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","nullable":true},"appUrl":{"type":"string"},"id":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"externalMediaId":{"type":"string"},"mediaContentType":{"type":"string"},"alt":{"type":"string","nullable":true},"previewUrl":{"type":"string","nullable":true},"previewHeight":{"type":"number","nullable":true},"previewWidth":{"type":"number","nullable":true},"videoUrl":{"type":"string","nullable":true},"videoSize":{"type":"number","nullable":true},"position":{"type":"number","nullable":true},"mediaToVariant":{"type":"array","items":{"type":"string"},"nullable":true}},"required":["status","appUrl","id","createdAt","updatedAt","externalMediaId","mediaContentType","alt","previewUrl","previewHeight","previewWidth","videoUrl","videoSize","position"],"additionalProperties":false}},"variants":{"type":"array","items":{"type":"object","properties":{"appUrl":{"type":"string"},"id":{"type":"number"},"externalProductId":{"type":"string"},"title":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"position":{"type":"number","nullable":true},"externalMediaId":{"type":"string","nullable":true},"externalVariantId":{"type":"string"},"barcode":{"type":"string","nullable":true},"compareAtPrice":{"type":"string","nullable":true},"inventoryItemId":{"type":"string","nullable":true},"inventoryQuantity":{"type":"number","nullable":true},"inventoryPolicy":{"type":"string","nullable":true},"inventoryTracked":{"type":"boolean","nullable":true},"selectedOptions":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"name":{"type":"string"}},"required":["value","name"],"additionalProperties":false},"nullable":true},"price":{"type":"string","nullable":true},"sku":{"type":"string","nullable":true},"taxable":{"type":"boolean","nullable":true}},"required":["appUrl","id","externalProductId","title","createdAt","updatedAt","position","externalMediaId","externalVariantId","barcode","compareAtPrice","inventoryItemId","inventoryQuantity","inventoryPolicy","inventoryTracked","selectedOptions","price","sku","taxable"],"additionalProperties":false}},"metafields":{"type":"object","additionalProperties":{}},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"gid":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"},"values":{"type":"array","items":{"type":"string"}}},"required":["id","gid","name","position","values"],"additionalProperties":false},"nullable":true},"productUrl":{"type":"string"},"matchedTitle":{"type":"boolean"},"matchedTags":{"type":"boolean"}},"required":["id","externalProductId","appUrl","title","handle","description","vendor","productType","tags","status","createdAt","updatedAt","platform","version","descriptionHtml","category","templateSuffix","featuredMediaId","featuredMediaPreviewUrl","publishedAt","currencyCode","currencySymbol","media","variants","metafields","options","productUrl"],"additionalProperties":false,"nullable":true}},"required":["product"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/products-service/getProductMedia":{"post":{"operationId":"products_getProductMedia","summary":"Get media for a product","tags":["products"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appUrl":{"type":"string","description":"Store URL"},"productId":{"type":"string","description":"External product ID"}},"required":["appUrl","productId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","nullable":true},"appUrl":{"type":"string"},"id":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"externalMediaId":{"type":"string"},"mediaContentType":{"type":"string"},"alt":{"type":"string","nullable":true},"previewUrl":{"type":"string","nullable":true},"previewHeight":{"type":"number","nullable":true},"previewWidth":{"type":"number","nullable":true},"videoUrl":{"type":"string","nullable":true},"videoSize":{"type":"number","nullable":true},"position":{"type":"number","nullable":true},"mediaToVariant":{"type":"array","items":{"type":"string"},"nullable":true}},"required":["status","appUrl","id","createdAt","updatedAt","externalMediaId","mediaContentType","alt","previewUrl","previewHeight","previewWidth","videoUrl","videoSize","position"],"additionalProperties":false}}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/products-service/searchProductsCursor":{"post":{"operationId":"products_searchProductsCursor","summary":"Search products with cursor pagination","tags":["products"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appUrl":{"type":"string","description":"Store URL"},"limit":{"type":"number","minimum":1,"maximum":500,"default":30},"cursor":{"type":"string","description":"Cursor from previous page"},"searchTerm":{"type":"string","nullable":true},"include":{"type":"object","properties":{"analysis":{"anyOf":[{"type":"boolean","enum":[true]},{"type":"object","properties":{"analysisTimeoutMs":{"type":"number","exclusiveMinimum":true,"minimum":0}},"additionalProperties":false}]},"media":{"type":"boolean"},"variants":{"type":"boolean"}},"additionalProperties":false},"filters":{"type":"object","properties":{"productType":{"type":"array","items":{"type":"string"},"nullable":true},"category":{"type":"array","items":{"type":"string"},"nullable":true},"tags":{"type":"array","items":{"type":"string"},"nullable":true},"tagsMatchMode":{"type":"string","enum":["any","all"]},"inventory":{"type":"object","properties":{"min":{"type":"number","nullable":true},"max":{"type":"number","nullable":true}},"additionalProperties":false,"nullable":true},"productId":{"type":"array","items":{"type":"string"},"nullable":true},"variantId":{"type":"array","items":{"type":"string"},"nullable":true},"sku":{"type":"array","items":{"type":"string"},"nullable":true},"productName":{"type":"array","items":{"type":"string"},"nullable":true},"createdAt":{"type":"object","properties":{"from":{"type":"string","nullable":true},"to":{"type":"string","nullable":true}},"additionalProperties":false,"nullable":true}},"additionalProperties":false,"default":{}},"sortBy":{"type":"string","enum":["inventoryQuantity","providerCreatedAt","providerUpdatedAt"],"nullable":true},"sortDirection":{"type":"string","enum":["asc","desc"],"default":"asc"},"publishedOnly":{"type":"boolean"}},"required":["appUrl"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"externalProductId":{"type":"string"},"appUrl":{"type":"string"},"title":{"type":"string"},"handle":{"type":"string"},"description":{"type":"string","nullable":true},"vendor":{"type":"string","nullable":true},"productType":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"status":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"providerCreatedAt":{"type":"string","format":"date-time","nullable":true},"providerUpdatedAt":{"type":"string","format":"date-time","nullable":true},"platform":{"type":"string"},"version":{"type":"number"},"descriptionHtml":{"type":"string","nullable":true},"category":{"type":"object","properties":{"gid":{"type":"string"},"fullName":{"type":"string"},"name":{"type":"string"}},"required":["gid","fullName","name"],"additionalProperties":false,"nullable":true},"templateSuffix":{"type":"string","nullable":true},"featuredMediaId":{"type":"string","nullable":true},"featuredMediaPreviewUrl":{"type":"string","nullable":true},"publishedAt":{"type":"string","nullable":true},"currencyCode":{"type":"string","nullable":true},"currencySymbol":{"type":"string","nullable":true},"media":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","nullable":true},"appUrl":{"type":"string"},"id":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"externalMediaId":{"type":"string"},"mediaContentType":{"type":"string"},"alt":{"type":"string","nullable":true},"previewUrl":{"type":"string","nullable":true},"previewHeight":{"type":"number","nullable":true},"previewWidth":{"type":"number","nullable":true},"videoUrl":{"type":"string","nullable":true},"videoSize":{"type":"number","nullable":true},"position":{"type":"number","nullable":true},"mediaToVariant":{"type":"array","items":{"type":"string"},"nullable":true}},"required":["status","appUrl","id","createdAt","updatedAt","externalMediaId","mediaContentType","alt","previewUrl","previewHeight","previewWidth","videoUrl","videoSize","position"],"additionalProperties":false}},"variants":{"type":"array","items":{"type":"object","properties":{"appUrl":{"type":"string"},"id":{"type":"number"},"externalProductId":{"type":"string"},"title":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"position":{"type":"number","nullable":true},"externalMediaId":{"type":"string","nullable":true},"externalVariantId":{"type":"string"},"barcode":{"type":"string","nullable":true},"compareAtPrice":{"type":"string","nullable":true},"inventoryItemId":{"type":"string","nullable":true},"inventoryQuantity":{"type":"number","nullable":true},"inventoryPolicy":{"type":"string","nullable":true},"inventoryTracked":{"type":"boolean","nullable":true},"selectedOptions":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"name":{"type":"string"}},"required":["value","name"],"additionalProperties":false},"nullable":true},"price":{"type":"string","nullable":true},"sku":{"type":"string","nullable":true},"taxable":{"type":"boolean","nullable":true}},"required":["appUrl","id","externalProductId","title","createdAt","updatedAt","position","externalMediaId","externalVariantId","barcode","compareAtPrice","inventoryItemId","inventoryQuantity","inventoryPolicy","inventoryTracked","selectedOptions","price","sku","taxable"],"additionalProperties":false}},"metafields":{"type":"object","additionalProperties":{}},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"gid":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"},"values":{"type":"array","items":{"type":"string"}}},"required":["id","gid","name","position","values"],"additionalProperties":false},"nullable":true},"productUrl":{"type":"string"},"matchedTitle":{"type":"boolean"},"matchedTags":{"type":"boolean"},"price":{"type":"number","minimum":0,"nullable":true},"imageUrl":{"type":"string","nullable":true},"mediaCount":{"type":"number"},"variantsCount":{"type":"number"},"analysis":{"type":"object","properties":{"appUrl":{"type":"string"},"productId":{"type":"string"},"version":{"type":"number"},"data":{"type":"object","properties":{"genderAppropriateness":{"type":"string","enum":["male","female","unisex","unknown"]},"productType":{"type":"string","enum":["tops","outerwear","bottoms","one-pieces","shoes","jewelry","accessories","cosmetics","furniture","bags","automotive","home","toys","media","electronics","other"]},"ageGroup":{"type":"string","enum":["baby","kids","teen","adult","senior","all-ages","unknown"]},"priceRange":{"type":"string","enum":["budget","mid-range","premium","luxury","unknown"]},"confidence":{"type":"number"}},"required":["genderAppropriateness","productType","ageGroup","priceRange","confidence"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["appUrl","productId","version","data","createdAt","updatedAt"],"additionalProperties":false},"analysisStatus":{"type":"string","enum":["pending","analyzed"]}},"required":["id","externalProductId","appUrl","title","handle","description","vendor","productType","tags","status","createdAt","updatedAt","platform","version","descriptionHtml","category","templateSuffix","featuredMediaId","featuredMediaPreviewUrl","publishedAt","currencyCode","currencySymbol","media","variants","metafields","options","productUrl","mediaCount","variantsCount"],"additionalProperties":false}},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}},"required":["products","nextCursor","hasMore"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/products-service/getProductsCount":{"post":{"operationId":"products_getProductsCount","summary":"Get total products count for a store","tags":["products"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appUrl":{"type":"string","description":"Store URL"},"strict":{"type":"boolean"}},"required":["appUrl"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"number"}},"required":["total"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/products-service/getProductCategoryBucketCounts":{"post":{"operationId":"products_getProductCategoryBucketCounts","summary":"Get search-aware product category bucket counts for a store","tags":["products"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appUrl":{"type":"string","description":"Store URL"},"searchTerm":{"type":"string","nullable":true},"filters":{"type":"object","properties":{"productType":{"type":"array","items":{"type":"string"},"nullable":true},"category":{"type":"array","items":{"type":"string"},"nullable":true},"tags":{"type":"array","items":{"type":"string"},"nullable":true},"tagsMatchMode":{"type":"string","enum":["any","all"]},"inventory":{"type":"object","properties":{"min":{"type":"number","nullable":true},"max":{"type":"number","nullable":true}},"additionalProperties":false,"nullable":true},"productId":{"type":"array","items":{"type":"string"},"nullable":true},"variantId":{"type":"array","items":{"type":"string"},"nullable":true},"sku":{"type":"array","items":{"type":"string"},"nullable":true},"productName":{"type":"array","items":{"type":"string"},"nullable":true},"createdAt":{"type":"object","properties":{"from":{"type":"string","nullable":true},"to":{"type":"string","nullable":true}},"additionalProperties":false,"nullable":true}},"additionalProperties":false,"default":{}},"limit":{"type":"integer","minimum":1,"maximum":500}},"required":["appUrl"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer","minimum":0},"buckets":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"count":{"type":"integer","minimum":0}},"required":["label","count"],"additionalProperties":false}}},"required":["total","buckets"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/products-service/getCollections":{"post":{"operationId":"products_getCollections","summary":"List Shopify collections","tags":["products"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appUrl":{"type":"string","description":"Store URL"},"query":{"type":"string","description":"Filter collections by title"},"first":{"type":"number","minimum":1,"maximum":250,"default":50},"after":{"type":"string"}},"required":["appUrl"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"handle":{"type":"string"},"productsCount":{"type":"number"}},"required":["id","title","productsCount"],"additionalProperties":false}}},"required":["collections"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/products-service/getProductCollections":{"post":{"operationId":"products_getProductCollections","summary":"Get Shopify collections a product belongs to","tags":["products"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appUrl":{"type":"string","description":"Store URL"},"productId":{"type":"string","description":"External product ID"}},"required":["appUrl","productId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"handle":{"type":"string"},"productsCount":{"type":"number"}},"required":["id","title","productsCount"],"additionalProperties":false}}},"required":["collections"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/products-service/getCollectionProducts":{"post":{"operationId":"products_getCollectionProducts","summary":"Get products in a Shopify collection","tags":["products"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appUrl":{"type":"string","description":"Store URL"},"collectionId":{"type":"string","description":"Shopify Collection ID"}},"required":["appUrl","collectionId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"products":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"title":{"type":"string"},"imageUrl":{"type":"string"},"imageUrls":{"type":"array","items":{"type":"string"}},"description":{"type":"string"},"productType":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"category":{"type":"string"}},"required":["productId","title"],"additionalProperties":false}},"collectionTitle":{"type":"string"}},"required":["products","collectionTitle"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/account-service/listStores":{"post":{"operationId":"stores_listStores","summary":"List stores and app URLs available to this API key","tags":["stores"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string"}},"required":["appKey"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"stores":{"type":"array","items":{"type":"object","properties":{"appUrl":{"type":"string"},"app":{"type":"string"}},"required":["appUrl","app"],"additionalProperties":false}}},"required":["stores"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/studio/getStudioAssets":{"post":{"operationId":"studio_getStudioAssets","summary":"List studio assets with optional filters","tags":["studio"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string"},"filters":{"type":"object","properties":{"type":{"type":"string","enum":["video","image","audio"]},"externalProductIds":{"type":"array","items":{"type":"string"}},"sourceIds":{"type":"array","items":{"type":"string"}},"toolCallIds":{"type":"array","items":{"type":"string"}},"createdFrom":{"type":"string"},"createdTo":{"type":"string"},"includeArchived":{"type":"boolean"},"favorite":{"type":"boolean"},"visibility":{"type":"string","enum":["workspace","private"]},"hasVodAsset":{"type":"boolean"},"folder":{"type":"string"},"includedFolderIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"limit":{"type":"integer","exclusiveMinimum":true,"minimum":0,"maximum":100},"cursor":{"type":"string"}},"required":["appKey"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"appKey":{"type":"string"},"id":{"type":"string"},"appUrl":{"type":"string"},"type":{"type":"string","enum":["video","image","audio"]},"name":{"type":"string"},"mediaDbIdentifier":{"type":"object","properties":{"appKey":{"type":"string"},"id":{"type":"string"},"temporary":{"type":"boolean"},"type":{"type":"string","enum":["image","video","audio","document"]}},"required":["appKey","id","type"],"additionalProperties":false},"metadata":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["prompt","negativePrompt","model","sourceType","sourceId","sourceName","toolCallId","image","productId","productName","variantId","vodLabelId","projectRunId","projectId","sourceWorkflowIdentifier","duration","aspectRatio","cameraFixed","quality","generateAudio","seed","garmentCategory","tokensUsed","sourceVideo","inputMedia","renderedVersion","templateId"]},"value":{"type":"string"}},"required":["type","value"],"additionalProperties":false}},"isArchived":{"type":"boolean"},"vodAssetId":{"type":"string"},"favorite":{"type":"boolean"},"dislikeFeedback":{"type":"object","properties":{"text":{"type":"string","maxLength":500},"dislikedAt":{"type":"string","format":"date-time"}},"required":["dislikedAt"],"additionalProperties":false,"nullable":true},"isInMediaGallery":{"type":"boolean"},"folder":{"type":"string","nullable":true},"createdByUserId":{"type":"string","nullable":true},"visibility":{"type":"string","enum":["workspace","private"]},"isTolstoyAuthored":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"mediaDbAsset":{"type":"object","properties":{"appKey":{"type":"string"},"id":{"type":"string"},"temporary":{"type":"boolean"},"type":{"type":"string","enum":["image","video","audio","document"]},"status":{"type":"string","enum":["uploading","rendering","completed"]},"contentType":{"type":"string"},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false}},"size":{"type":"number"},"url":{"type":"string"},"originalS3Key":{"type":"string"},"thumbnails":{"type":"object","additionalProperties":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false}},"videoRenditions":{"type":"object","additionalProperties":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false}},"videoPreviews":{"type":"object","additionalProperties":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false}},"height":{"type":"number"},"width":{"type":"number"},"durationMs":{"type":"number"},"hasAudio":{"type":"boolean"}},"required":["appKey","id","type","status","contentType","metadata","url","originalS3Key"],"additionalProperties":false}},"required":["appKey","id","appUrl","type","name","mediaDbIdentifier","createdAt","updatedAt","mediaDbAsset"],"additionalProperties":false}},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"total":{"type":"number"}},"required":["items","nextCursor","hasMore","total"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/studio/getDraftStudioAssetCountsByProductIds":{"post":{"operationId":"studio_getDraftStudioAssetCountsByProductIds","summary":"Count draft studio assets by product IDs","tags":["studio"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string"},"productIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":200},"includedFolderIds":{"type":"array","items":{"type":"string"}}},"required":["appKey","productIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"counts":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"count":{"type":"integer","minimum":0}},"required":["productId","count"],"additionalProperties":false}}},"required":["counts"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/studio/getStudioAssetById":{"post":{"operationId":"studio_getStudioAssetById","summary":"Get a studio asset by ID","tags":["studio"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string"},"assetId":{"type":"string"}},"required":["appKey","assetId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string"},"id":{"type":"string"},"appUrl":{"type":"string"},"type":{"type":"string","enum":["video","image","audio"]},"name":{"type":"string"},"mediaDbIdentifier":{"type":"object","properties":{"appKey":{"type":"string"},"id":{"type":"string"},"temporary":{"type":"boolean"},"type":{"type":"string","enum":["image","video","audio","document"]}},"required":["appKey","id","type"],"additionalProperties":false},"metadata":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["prompt","negativePrompt","model","sourceType","sourceId","sourceName","toolCallId","image","productId","productName","variantId","vodLabelId","projectRunId","projectId","sourceWorkflowIdentifier","duration","aspectRatio","cameraFixed","quality","generateAudio","seed","garmentCategory","tokensUsed","sourceVideo","inputMedia","renderedVersion","templateId"]},"value":{"type":"string"}},"required":["type","value"],"additionalProperties":false}},"isArchived":{"type":"boolean"},"vodAssetId":{"type":"string"},"favorite":{"type":"boolean"},"dislikeFeedback":{"type":"object","properties":{"text":{"type":"string","maxLength":500},"dislikedAt":{"type":"string","format":"date-time"}},"required":["dislikedAt"],"additionalProperties":false,"nullable":true},"isInMediaGallery":{"type":"boolean"},"folder":{"type":"string","nullable":true},"createdByUserId":{"type":"string","nullable":true},"visibility":{"type":"string","enum":["workspace","private"]},"isTolstoyAuthored":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"mediaDbAsset":{"type":"object","properties":{"appKey":{"type":"string"},"id":{"type":"string"},"temporary":{"type":"boolean"},"type":{"type":"string","enum":["image","video","audio","document"]},"status":{"type":"string","enum":["uploading","rendering","completed"]},"contentType":{"type":"string"},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false}},"size":{"type":"number"},"url":{"type":"string"},"originalS3Key":{"type":"string"},"thumbnails":{"type":"object","additionalProperties":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false}},"videoRenditions":{"type":"object","additionalProperties":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false}},"videoPreviews":{"type":"object","additionalProperties":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false}},"height":{"type":"number"},"width":{"type":"number"},"durationMs":{"type":"number"},"hasAudio":{"type":"boolean"}},"required":["appKey","id","type","status","contentType","metadata","url","originalS3Key"],"additionalProperties":false}},"required":["appKey","id","appUrl","type","name","mediaDbIdentifier","createdAt","updatedAt","mediaDbAsset"],"additionalProperties":false,"nullable":true}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/studio/getStudioAssetComments":{"post":{"operationId":"studio_getStudioAssetComments","summary":"List team comments for a Studio image asset","tags":["studio"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string"},"assetId":{"type":"string"}},"required":["appKey","assetId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"comments":{"type":"array","items":{"type":"object","properties":{"appKey":{"type":"string"},"assetId":{"type":"string"},"id":{"type":"string"},"body":{"type":"string"},"authorUserId":{"type":"string"},"authorEmail":{"type":"string","nullable":true},"parentCommentId":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["appKey","assetId","id","body","authorUserId","authorEmail","parentCommentId","createdAt","updatedAt"],"additionalProperties":false}},"totalCount":{"type":"integer","minimum":0}},"required":["comments","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/studio/createStudioAssetComment":{"post":{"operationId":"studio_createStudioAssetComment","summary":"Create a team comment or reply on a Studio image asset","tags":["studio"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string"},"assetId":{"type":"string"},"body":{"type":"string","minLength":1,"maxLength":2000},"parentCommentId":{"type":"string","minLength":1}},"required":["appKey","assetId","body"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string"},"assetId":{"type":"string"},"id":{"type":"string"},"body":{"type":"string"},"authorUserId":{"type":"string"},"authorEmail":{"type":"string","nullable":true},"parentCommentId":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["appKey","assetId","id","body","authorUserId","authorEmail","parentCommentId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/studio/convertToNewVodAsset":{"post":{"operationId":"studio_convertToNewVodAsset","summary":"Publish studio asset to library as VOD asset","tags":["studio"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string"},"appUrl":{"type":"string"},"tagProducts":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"variantId":{"type":"string"}},"required":["productId"],"additionalProperties":false},"default":[]},"studioAssetId":{"type":"string"}},"required":["appKey","appUrl","studioAssetId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"vodAssetId":{"type":"string"}},"required":["vodAssetId"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/video-service/searchVod":{"post":{"operationId":"video_searchVod","summary":"Search VOD assets with filters and pagination","tags":["video"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string"},"filters":{"type":"object","properties":{"satisfies":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","enum":["type"]},"value":{"type":"string","enum":["video","image","gallery"]}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["types"]},"value":{"type":"array","items":{"type":"string","enum":["video","image","gallery"]}}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["text"]},"value":{"type":"string"}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["source"]},"value":{"type":"array","items":{"type":"string","enum":["upload","instagramGraph","googleDrive","tiktok","recordings","synthesia","aiVideo","aiVideo_tolstoy","dropbox","youtube","pinterest","adspy","canva","yotpo","heygen","higgsfield","did","fal","websiteScraping","ugc_currated","ugc_pending","ugc_approved","ugc_denied","unknown"]}}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["tagged"]},"value":{"anyOf":[{"type":"object","properties":{"taggedIn":{"type":"array","items":{"type":"string","enum":["tag","productId","vodLabelId","suggestedProducts"]}},"shopifyUrl":{"type":"string"}},"required":["taggedIn","shopifyUrl"],"additionalProperties":false},{"type":"object","properties":{"taggedIn":{"type":"array","items":{"type":"string","enum":["vodLabelId"]},"minItems":1,"maxItems":1}},"required":["taggedIn"],"additionalProperties":false}]}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["products"]},"value":{"type":"array","items":{"type":"string"}}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["uploadType"]},"value":{"type":"array","items":{"type":"string"}}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["labels"]},"value":{"type":"array","items":{"type":"string"}}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["tags"]},"value":{"type":"array","items":{"type":"string"}}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["owner"]},"value":{"type":"array","items":{"type":"string"}}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["suggestedProducts"]},"value":{"type":"array","items":{"type":"string"}}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["appExternalId"]},"value":{"type":"array","items":{"type":"string"}}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["createDate"]},"value":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"}},"additionalProperties":false}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["date"]},"value":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"}},"additionalProperties":false}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["instaTags"]},"value":{"type":"array","items":{"type":"string"}}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["settingsVersion"]},"value":{"type":"string"}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["ugcUsername"]},"value":{"type":"array","items":{"type":"string"}}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["stores"]},"value":{"type":"array","items":{"type":"string"}}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["folder"]},"value":{"type":"string"}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["favorite"]},"value":{"type":"boolean"}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["pinterestBoardIds"]},"value":{"type":"array","items":{"type":"string"}}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["shopifyPublished"]},"value":{"type":"boolean"}},"required":["name","value"],"additionalProperties":false}]}},"notSatisfies":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","enum":["type"]},"value":{"type":"string","enum":["video","image","gallery"]}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["types"]},"value":{"type":"array","items":{"type":"string","enum":["video","image","gallery"]}}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["text"]},"value":{"type":"string"}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["source"]},"value":{"type":"array","items":{"type":"string","enum":["upload","instagramGraph","googleDrive","tiktok","recordings","synthesia","aiVideo","aiVideo_tolstoy","dropbox","youtube","pinterest","adspy","canva","yotpo","heygen","higgsfield","did","fal","websiteScraping","ugc_currated","ugc_pending","ugc_approved","ugc_denied","unknown"]}}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["tagged"]},"value":{"anyOf":[{"type":"object","properties":{"taggedIn":{"type":"array","items":{"type":"string","enum":["tag","productId","vodLabelId","suggestedProducts"]}},"shopifyUrl":{"type":"string"}},"required":["taggedIn","shopifyUrl"],"additionalProperties":false},{"type":"object","properties":{"taggedIn":{"type":"array","items":{"type":"string","enum":["vodLabelId"]},"minItems":1,"maxItems":1}},"required":["taggedIn"],"additionalProperties":false}]}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["products"]},"value":{"type":"array","items":{"type":"string"}}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["uploadType"]},"value":{"type":"array","items":{"type":"string"}}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["labels"]},"value":{"type":"array","items":{"type":"string"}}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["tags"]},"value":{"type":"array","items":{"type":"string"}}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["owner"]},"value":{"type":"array","items":{"type":"string"}}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["suggestedProducts"]},"value":{"type":"array","items":{"type":"string"}}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["appExternalId"]},"value":{"type":"array","items":{"type":"string"}}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["createDate"]},"value":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"}},"additionalProperties":false}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["date"]},"value":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"}},"additionalProperties":false}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["instaTags"]},"value":{"type":"array","items":{"type":"string"}}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["settingsVersion"]},"value":{"type":"string"}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["ugcUsername"]},"value":{"type":"array","items":{"type":"string"}}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["stores"]},"value":{"type":"array","items":{"type":"string"}}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["folder"]},"value":{"type":"string"}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["favorite"]},"value":{"type":"boolean"}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["pinterestBoardIds"]},"value":{"type":"array","items":{"type":"string"}}},"required":["name","value"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["shopifyPublished"]},"value":{"type":"boolean"}},"required":["name","value"],"additionalProperties":false}]},"default":[]}},"required":["satisfies"],"additionalProperties":false,"description":"Filters to include and exclude. notSatisfies defaults to []."},"sort":{"type":"object","properties":{"field":{"type":"string","enum":["createdAt","updatedAt","date","likes","comments","aiUgcScore","uploadType","type"]},"direction":{"type":"string","enum":["asc","desc"]}},"required":["field","direction"],"additionalProperties":false,"description":"Optional single-field sort override."},"sortBy":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["createdAt","updatedAt","date","likes","comments","aiUgcScore","uploadType","type"]},"direction":{"type":"string","enum":["asc","desc"]}},"required":["field","direction"],"additionalProperties":false},"default":[{"field":"date","direction":"desc"}],"description":"Advanced multi-field sort. Defaults to newest media first."},"from":{"type":"number"},"size":{"type":"number"},"withConnections":{"type":"boolean"},"appUrl":{"type":"string"},"includeInvalid":{"type":"boolean"},"includeShared":{"type":"boolean"},"sharedOnly":{"type":"boolean"},"projectFolderFilter":{"type":"object","properties":{"includedProjectFolderIds":{"type":"array","items":{"type":"string"}},"excludedLegacyProjectFolderIds":{"type":"array","items":{"type":"string"}}},"required":["includedProjectFolderIds","excludedLegacyProjectFolderIds"],"additionalProperties":false}},"required":["appKey","filters","from","size","appUrl"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"number"},"items":{"type":"array"},"itemsCount":{"type":"number"},"total":{"type":"number"}},"required":["from","items","itemsCount","total"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/video-service/searchVodByIds":{"post":{"operationId":"video_searchVodByIds","summary":"Get VOD assets by IDs","tags":["video"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string"},"ids":{"type":"array","items":{"type":"string"}}},"required":["appKey","ids"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array"}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/video-service/searchVodByExternalIds":{"post":{"operationId":"video_searchVodByExternalIds","summary":"Get VOD assets by external IDs. e.g. Instagram IDs","tags":["video"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string"},"externalIds":{"type":"array","items":{"type":"string"}}},"required":["appKey","externalIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array"}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/video-service/searchVodAssetsByProductId":{"post":{"operationId":"video_searchVodAssetsByProductId","summary":"Search VOD assets by product ID","tags":["video"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string"},"productId":{"type":"string"},"from":{"type":"number"},"size":{"type":"number"},"projectFolderFilter":{"type":"object","properties":{"includedProjectFolderIds":{"type":"array","items":{"type":"string"}},"excludedLegacyProjectFolderIds":{"type":"array","items":{"type":"string"}}},"required":["includedProjectFolderIds","excludedLegacyProjectFolderIds"],"additionalProperties":false}},"required":["appKey","productId","from","size"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"number"},"items":{"type":"array"},"itemsCount":{"type":"number"},"total":{"type":"number"}},"required":["from","items","itemsCount","total"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/video-service/getTaggedVodAssetCountsByProductIds":{"post":{"operationId":"video_getTaggedVodAssetCountsByProductIds","summary":"Count tagged VOD assets by product IDs","tags":["video"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string"},"productIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":200},"projectFolderFilter":{"type":"object","properties":{"includedProjectFolderIds":{"type":"array","items":{"type":"string"}},"excludedLegacyProjectFolderIds":{"type":"array","items":{"type":"string"}}},"required":["includedProjectFolderIds","excludedLegacyProjectFolderIds"],"additionalProperties":false}},"required":["appKey","productIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"counts":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"count":{"type":"integer","minimum":0}},"required":["productId","count"],"additionalProperties":false}}},"required":["counts"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/video-service/getActiveShopifyTags":{"post":{"operationId":"video_getActiveShopifyTags","summary":"Get the list of Shopify tags actually applied to at least one VOD asset","tags":["video"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string"}},"required":["appKey"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"tags":{"type":"array","items":{"type":"string"}}},"required":["tags"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/video-service/getVodLabels":{"post":{"operationId":"video_getVodLabels","summary":"List all playlists in the video library","tags":["video"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string"}},"required":["appKey"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"number"},"items":{"type":"array"},"itemsCount":{"type":"number"},"total":{"type":"number"}},"required":["from","items","itemsCount","total"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/video-service/listViews":{"post":{"operationId":"video_listViews","summary":"List saved dynamic playlists (media filter views): id, name, and rule conditionExpression. Use to resolve a dynamic playlist the merchant names.","tags":["video"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string"}},"required":["appKey"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"views":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"appKey":{"type":"string"},"name":{"type":"string","minLength":1},"isFavorite":{"type":"boolean","default":false},"pinnedAt":{"type":"string","nullable":true,"default":null},"pillColor":{"type":"string","pattern":"^#[0-9A-F]{6}$","nullable":true,"default":null},"conditionExpression":{"anyOf":[{"anyOf":[{"type":"object","properties":{"field":{"type":"string"},"customId":{"type":"string"},"operator":{"type":"string","enum":["EQUAL"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string"},"customId":{"type":"string"},"operator":{"type":"string","enum":["IN"]},"value":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string"},"customId":{"type":"string"},"operator":{"type":"string","enum":["GT"]},"value":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string"},"customId":{"type":"string"},"operator":{"type":"string","enum":["GTE"]},"value":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string"},"customId":{"type":"string"},"operator":{"type":"string","enum":["LT"]},"value":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string"},"customId":{"type":"string"},"operator":{"type":"string","enum":["LTE"]},"value":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string"},"customId":{"type":"string"},"operator":{"type":"string","enum":["STARTS_WITH"]},"value":{"type":"string"}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string"},"customId":{"type":"string"},"operator":{"type":"string","enum":["CONTAINS"]},"value":{"type":"string"}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string"},"customId":{"type":"string"},"operator":{"type":"string","enum":["EXISTS"]}},"required":["field","operator"],"additionalProperties":false}]},{"type":"object","properties":{"customId":{"type":"string"},"operator":{"type":"string","enum":["AND","OR"]},"children":{"type":"array","items":{}}},"required":["operator","children"],"additionalProperties":false},{"type":"object","properties":{"customId":{"type":"string"},"operator":{"type":"string","enum":["NOT"]},"child":{}},"required":["operator","child"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["PIN"]},"customId":{"type":"string"},"child":{}},"required":["operator","child"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["BOOST"]},"customId":{"type":"string"},"boost":{"type":"number"},"children":{"type":"array","items":{}}},"required":["operator","boost","children"],"additionalProperties":false}]},"selection":{"type":"object","properties":{"selected":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"excluded":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["selected","excluded"],"additionalProperties":false},"pins":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"position":{"type":"integer","minimum":0},"productId":{"type":"string"}},"required":["id","position"],"additionalProperties":false},"default":[]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","appKey","name","conditionExpression","selection","createdAt","updatedAt"],"additionalProperties":false}}},"required":["views"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/ai-tools-service/textToImage":{"post":{"operationId":"ai-tools_textToImage","summary":"Generate images from text prompt","tags":["ai-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string","description":"Account app key"},"model":{"type":"string","enum":["openai_image_1_5","openai_image_2","google_nano_banana","google_nano_banana_pro","google_nano_banana_2","google_nano_banana_2_lite","flux_2_flex","flux_2_pro","flux_kontext_pro","grok_imagine","seedream_v5_pro","higgsfield_soul","reve_2_1"],"description":"Image generation model"},"prompt":{"type":"string","description":"Image generation prompt"},"openAIImageQuality":{"type":"string","enum":["low","medium","high","auto"],"description":"OpenAI image quality"},"openAIImageAspectRatio":{"type":"string","enum":["auto","1024x1024","1536x1024","1024x1536"],"description":"OpenAI aspect ratio"},"openAIImageCustomSize":{"type":"object","properties":{"width":{"type":"integer","exclusiveMinimum":true,"minimum":0},"height":{"type":"integer","exclusiveMinimum":true,"minimum":0}},"required":["width","height"],"additionalProperties":false,"description":"OpenAI gpt-image-2 only. Custom {width, height} in pixels. Takes precedence over openAIImageAspectRatio when set."},"fluxKontextAspectRatio":{"type":"string","enum":["21:9","16:9","4:3","3:2","1:1","2:3","3:4","9:16","9:21"],"description":"Flux Kontext aspect ratio"},"flux2AspectRatio":{"type":"string","enum":["auto","square_hd","square","portrait_4_3","portrait_16_9","landscape_4_3","landscape_16_9"],"description":"Flux 2 aspect ratio"},"nanoBananaAspectRatio":{"type":"string","enum":["21:9","1:1","4:3","3:2","2:3","5:4","4:5","3:4","16:9","9:16"],"description":"Nano Banana aspect ratio"},"nanoBanana2Resolution":{"type":"string","enum":["1K","2K","4K"],"description":"Nano Banana 2 resolution"},"grokImageAspectRatio":{"type":"string","enum":["2:1","20:9","19.5:9","16:9","4:3","3:2","1:1","2:3","3:4","9:16","9:19.5","9:20","1:2"],"description":"Grok image aspect ratio"},"numberOfImages":{"type":"integer","minimum":1,"maximum":4,"description":"Number of images to generate (1-4)"}},"required":["appKey","model","prompt"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["COMPLETED"]},"runId":{"type":"string"},"result":{},"tokensUsed":{"type":"number","nullable":true}},"required":["status","runId","tokensUsed"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["IN_PROGRESS"]},"runId":{"type":"string"}},"required":["status","runId"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["FAILED"]},"runId":{"type":"string"},"error":{"type":"string"}},"required":["status","runId","error"],"additionalProperties":false}]}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/ai-tools-service/editImage":{"post":{"operationId":"ai-tools_editImage","summary":"Edit images with text prompt","tags":["ai-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string","description":"Account app key"},"images":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","properties":{"appKey":{"type":"string"},"id":{"type":"string"},"temporary":{"type":"boolean"},"type":{"type":"string","enum":["image","video","audio","document"]}},"required":["appKey","id","type"],"additionalProperties":false}]},"minItems":1,"description":"Images to edit"},"prompt":{"type":"string","description":"Edit instruction"},"model":{"type":"string","enum":["openai_image_1_5","openai_image_2","google_nano_banana","google_nano_banana_pro","google_nano_banana_2","google_nano_banana_2_lite","flux_2_flex","flux_2_pro","flux_kontext_pro","flux_2_klein_9b","grok_imagine","phota","seedream_v5_lite","seedream_v5_pro","higgsfield_soul","reve_2_1"],"description":"Edit model"},"openAIImageQuality":{"type":"string","enum":["low","medium","high","auto"],"description":"OpenAI image quality"},"openAIImageAspectRatio":{"type":"string","enum":["auto","1024x1024","1536x1024","1024x1536"],"description":"OpenAI aspect ratio"},"openAIImageCustomSize":{"type":"object","properties":{"width":{"type":"integer","exclusiveMinimum":true,"minimum":0},"height":{"type":"integer","exclusiveMinimum":true,"minimum":0}},"required":["width","height"],"additionalProperties":false,"description":"OpenAI gpt-image-2 only. Custom {width, height} in pixels. Takes precedence over openAIImageAspectRatio when set."},"fluxKontextAspectRatio":{"type":"string","enum":["21:9","16:9","4:3","3:2","1:1","2:3","3:4","9:16","9:21"],"description":"Flux Kontext aspect ratio"},"flux2AspectRatio":{"type":"string","enum":["auto","square_hd","square","portrait_4_3","portrait_16_9","landscape_4_3","landscape_16_9"],"description":"Flux 2 aspect ratio"},"nanoBananaAspectRatio":{"type":"string","enum":["21:9","1:1","4:3","3:2","2:3","5:4","4:5","3:4","16:9","9:16"],"description":"Nano Banana aspect ratio"},"nanoBanana2Resolution":{"type":"string","enum":["1K","2K","4K"],"description":"Nano Banana 2 resolution"},"numberOfImages":{"type":"integer","minimum":1,"maximum":4,"description":"Number of images (1-4)"}},"required":["appKey","images","prompt","model"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["COMPLETED"]},"runId":{"type":"string"},"result":{},"tokensUsed":{"type":"number","nullable":true}},"required":["status","runId","tokensUsed"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["IN_PROGRESS"]},"runId":{"type":"string"}},"required":["status","runId"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["FAILED"]},"runId":{"type":"string"},"error":{"type":"string"}},"required":["status","runId","error"],"additionalProperties":false}]}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/ai-tools-service/animateImage":{"post":{"operationId":"ai-tools_animateImage","summary":"Animate image into video","tags":["ai-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","enum":["veo_3_1","veo_3_1_fast","openai_sora_2","openai_sora_2_pro","bytedance_seedance_v1_5_pro","bytedance_seedance_2_0","bytedance_seedance_2_0_fast","bytedance_seedance_2_0_mini","bytedance_seedance_2_5","kling_v2_6","kling_o1","kling_o3","kling_v3","kling_v3_turbo","grok_imagine_video","grok_imagine_video_v1_5","veo_3_1_lite","veed_fabric_1_0","gemini_omni_flash","flux_3"],"description":"Animation model"},"image":{"anyOf":[{"type":"string"},{"type":"object","properties":{"appKey":{"type":"string"},"id":{"type":"string"},"temporary":{"type":"boolean"},"type":{"type":"string","enum":["image","video","audio","document"]}},"required":["appKey","id","type"],"additionalProperties":false}],"description":"Source image"},"prompt":{"type":"string","nullable":true,"description":"Animation prompt"},"endFrame":{"anyOf":[{"type":"string"},{"type":"object","properties":{"appKey":{"type":"string"},"id":{"type":"string"},"temporary":{"type":"boolean"},"type":{"type":"string","enum":["image","video","audio","document"]}},"required":["appKey","id","type"],"additionalProperties":false}],"description":"End frame image"},"negativePrompt":{"type":"string","description":"Negative prompt"},"appKey":{"type":"string","description":"Account app key"},"klingMode":{"type":"string","enum":["pro","std"]},"klingDuration":{"type":"string","enum":["5","10"]},"klingAspectRatio":{"type":"string","enum":["16:9","9:16","1:1"]},"klingO3Duration":{"type":"string","enum":["3","4","5","6","7","8","9","10","11","12","13","14","15"]},"multiPrompt":{"type":"array","items":{"type":"object","properties":{"prompt":{"type":"string"},"duration":{"type":"string","enum":["3","4","5","6","7","8","9","10","11","12","13","14","15"]}},"required":["prompt"],"additionalProperties":false}},"veoAspectRatio":{"type":"string","enum":["9:16","16:9"]},"veoDuration":{"type":"string","enum":["4s","6s","8s"]},"veoResolution":{"type":"string","enum":["720p","1080p","4k"]},"geminiOmniFlashAspectRatio":{"type":"string","enum":["9:16","16:9"]},"geminiOmniFlashDuration":{"type":"integer","minimum":3,"maximum":10},"seedanceDuration":{"type":"string","enum":["4","5","6","7","8","9","10","11","12"]},"seedanceResolution":{"type":"string","enum":["480p","720p","1080p"]},"seedanceCameraFixed":{"type":"boolean"},"seedanceAspectRatio":{"type":"string","enum":["21:9","16:9","4:3","1:1","3:4","9:16"]},"seedance20Duration":{"type":"string","enum":["auto","4","5","6","7","8","9","10","11","12","13","14","15"],"description":"Seedance 2.0 duration"},"seedance25Duration":{"type":"string","enum":["4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30"],"description":"Seedance 2.5 duration"},"seedance20AspectRatio":{"type":"string","enum":["auto","21:9","16:9","4:3","1:1","3:4","9:16"],"description":"Seedance 2.x aspect ratio"},"generateAudio":{"type":"boolean"},"openaiDuration":{"type":"number","enum":[4,8,12]},"openaiResolution":{"type":"string","enum":["720p","1080p"]},"openaiAspectRatio":{"type":"string","enum":["auto","9:16","16:9"]},"grokAspectRatio":{"type":"string","enum":["auto","16:9","4:3","3:2","1:1","2:3","3:4","9:16"]},"grokResolution":{"type":"string","enum":["480p","720p","1080p"]},"grokDuration":{"type":"integer","minimum":6,"maximum":15},"cfgScale":{"type":"number"},"audioUrl":{"type":"string","format":"uri","description":"Audio URL for VEED Fabric talking-head generation"},"veedResolution":{"type":"string","enum":["480p","720p"],"description":"VEED Fabric output resolution"},"flux3AspectRatio":{"type":"string","enum":["21:9","2:1","16:9","4:3","1:1","3:4","9:16"]},"flux3Resolution":{"type":"string","enum":["720p","1080p"]},"flux3Duration":{"type":"integer","minimum":5,"maximum":20},"flux3MidFrames":{"type":"array","items":{"type":"object","properties":{"image":{"anyOf":[{"type":"string"},{"type":"object","properties":{"appKey":{"type":"string"},"id":{"type":"string"},"temporary":{"type":"boolean"},"type":{"type":"string","enum":["image","video","audio","document"]}},"required":["appKey","id","type"],"additionalProperties":false}]},"atSecond":{"type":"number","minimum":0}},"required":["image","atSecond"],"additionalProperties":false},"maxItems":8,"description":"FLUX 3 interior keyframes pinned between the source image and the end frame"}},"required":["model","image","prompt","appKey"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["COMPLETED"]},"runId":{"type":"string"},"result":{},"tokensUsed":{"type":"number","nullable":true}},"required":["status","runId","tokensUsed"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["IN_PROGRESS"]},"runId":{"type":"string"}},"required":["status","runId"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["FAILED"]},"runId":{"type":"string"},"error":{"type":"string"}},"required":["status","runId","error"],"additionalProperties":false}]}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/ai-tools-service/textToVideo":{"post":{"operationId":"ai-tools_textToVideo","summary":"Generate video from text prompt","tags":["ai-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string","description":"Account app key"},"model":{"type":"string","enum":["veo_3_1","veo_3_1_fast","openai_sora_2","openai_sora_2_pro","bytedance_seedance_v1_5_pro","bytedance_seedance_2_0","bytedance_seedance_2_0_fast","bytedance_seedance_2_0_mini","bytedance_seedance_2_5","kling_v2_6","kling_o3","kling_v3","kling_v3_turbo","grok_imagine_video","grok_imagine_video_v1_5","veo_3_1_lite","gemini_omni_flash","flux_3"],"description":"Video generation model"},"prompt":{"type":"string","nullable":true,"description":"Video prompt"},"negativePrompt":{"type":"string","description":"Negative prompt"},"veoAspectRatio":{"type":"string","enum":["9:16","16:9"]},"veoDuration":{"type":"string","enum":["4s","6s","8s"]},"veoResolution":{"type":"string","enum":["720p","1080p","4k"]},"geminiOmniFlashAspectRatio":{"type":"string","enum":["9:16","16:9"]},"geminiOmniFlashDuration":{"type":"integer","minimum":3,"maximum":10},"generateAudio":{"type":"boolean"},"openaiDuration":{"type":"number","enum":[4,8,12]},"openaiResolution":{"type":"string","enum":["720p","1080p"]},"openaiAspectRatio":{"type":"string","enum":["auto","9:16","16:9"]},"klingMode":{"type":"string","enum":["pro","std"]},"klingDuration":{"type":"string","enum":["5","10"]},"klingAspectRatio":{"type":"string","enum":["16:9","9:16","1:1"]},"klingO3Duration":{"type":"string","enum":["3","4","5","6","7","8","9","10","11","12","13","14","15"]},"multiPrompt":{"type":"array","items":{"type":"object","properties":{"prompt":{"type":"string"},"duration":{"type":"string","enum":["3","4","5","6","7","8","9","10","11","12","13","14","15"]}},"required":["prompt"],"additionalProperties":false}},"seedanceDuration":{"type":"string","enum":["4","5","6","7","8","9","10","11","12"]},"seedanceResolution":{"type":"string","enum":["480p","720p","1080p"]},"seedanceCameraFixed":{"type":"boolean"},"seedanceAspectRatio":{"type":"string","enum":["21:9","16:9","4:3","1:1","3:4","9:16"]},"seedance20Duration":{"type":"string","enum":["auto","4","5","6","7","8","9","10","11","12","13","14","15"],"description":"Seedance 2.0 duration"},"seedance25Duration":{"type":"string","enum":["4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30"],"description":"Seedance 2.5 duration"},"seedance20AspectRatio":{"type":"string","enum":["auto","21:9","16:9","4:3","1:1","3:4","9:16"],"description":"Seedance 2.x aspect ratio"},"grokAspectRatio":{"type":"string","enum":["auto","16:9","4:3","3:2","1:1","2:3","3:4","9:16"]},"grokResolution":{"type":"string","enum":["480p","720p","1080p"]},"grokDuration":{"type":"integer","minimum":6,"maximum":15},"cfgScale":{"type":"number"},"flux3AspectRatio":{"type":"string","enum":["21:9","2:1","16:9","4:3","1:1","3:4","9:16"]},"flux3Resolution":{"type":"string","enum":["720p","1080p"]},"flux3Duration":{"type":"integer","minimum":5,"maximum":20}},"required":["appKey","model","prompt"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["COMPLETED"]},"runId":{"type":"string"},"result":{},"tokensUsed":{"type":"number","nullable":true}},"required":["status","runId","tokensUsed"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["IN_PROGRESS"]},"runId":{"type":"string"}},"required":["status","runId"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["FAILED"]},"runId":{"type":"string"},"error":{"type":"string"}},"required":["status","runId","error"],"additionalProperties":false}]}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/ai-tools-service/multiImage2Video":{"post":{"operationId":"ai-tools_multiImage2Video","summary":"Create video from multiple images","tags":["ai-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string","description":"Account app key"},"images":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","properties":{"appKey":{"type":"string"},"id":{"type":"string"},"temporary":{"type":"boolean"},"type":{"type":"string","enum":["image","video","audio","document"]}},"required":["appKey","id","type"],"additionalProperties":false}]},"description":"Source images"},"elements":{"type":"array","items":{"type":"object","properties":{"referenceImageUrls":{"type":"array","items":{"type":"string","format":"uri"}},"frontalImageUrl":{"type":"string","format":"uri"}},"required":["referenceImageUrls","frontalImageUrl"],"additionalProperties":false},"description":"Reference elements"},"prompt":{"type":"string","nullable":true,"description":"Video prompt"},"negativePrompt":{"type":"string","description":"Negative prompt"},"klingMode":{"type":"string","enum":["pro","std"]},"klingDuration":{"type":"string","enum":["5","10"]},"klingAspectRatio":{"type":"string","enum":["16:9","9:16","1:1"]},"klingO3Duration":{"type":"string","enum":["3","4","5","6","7","8","9","10","11","12","13","14","15"]},"multiPrompt":{"type":"array","items":{"type":"object","properties":{"prompt":{"type":"string"},"duration":{"type":"string","enum":["3","4","5","6","7","8","9","10","11","12","13","14","15"]}},"required":["prompt"],"additionalProperties":false}},"veoAspectRatio":{"type":"string","enum":["9:16","16:9"]},"veoResolution":{"type":"string","enum":["720p","1080p","4k"]},"veoDuration":{"type":"string","enum":["4s","6s","8s"]},"seedanceResolution":{"type":"string","enum":["480p","720p","1080p"]},"seedance20Duration":{"type":"string","enum":["auto","4","5","6","7","8","9","10","11","12","13","14","15"],"description":"Seedance 2.0 duration"},"seedance25Duration":{"type":"string","enum":["4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30"],"description":"Seedance 2.5 duration"},"seedance20AspectRatio":{"type":"string","enum":["auto","21:9","16:9","4:3","1:1","3:4","9:16"],"description":"Seedance 2.x aspect ratio"},"grokAspectRatio":{"type":"string","enum":["auto","16:9","4:3","3:2","1:1","2:3","3:4","9:16"]},"grokResolution":{"type":"string","enum":["480p","720p","1080p"]},"grokDuration":{"type":"integer","minimum":6,"maximum":15},"geminiOmniFlashAspectRatio":{"type":"string","enum":["9:16","16:9"]},"geminiOmniFlashDuration":{"type":"integer","minimum":3,"maximum":10},"generateAudio":{"type":"boolean"},"seedanceAudioUrls":{"type":"array","items":{"type":"string"},"maxItems":10},"model":{"type":"string","enum":["kling_o1","kling_o3","veo_3_1","grok_imagine_video","grok_imagine_video_v1_5","veo_3_1_lite","bytedance_seedance_2_0","bytedance_seedance_2_0_fast","bytedance_seedance_2_0_mini","bytedance_seedance_2_5","gemini_omni_flash"],"description":"Video model"}},"required":["appKey","prompt","model"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["COMPLETED"]},"runId":{"type":"string"},"result":{},"tokensUsed":{"type":"number","nullable":true}},"required":["status","runId","tokensUsed"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["IN_PROGRESS"]},"runId":{"type":"string"}},"required":["status","runId"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["FAILED"]},"runId":{"type":"string"},"error":{"type":"string"}},"required":["status","runId","error"],"additionalProperties":false}]}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/ai-tools-service/editVideo":{"post":{"operationId":"ai-tools_editVideo","summary":"Edit video with text prompt","tags":["ai-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string","description":"Account app key"},"variant":{"type":"string","enum":["edit","reference"],"description":"Edit variant"},"model":{"type":"string","enum":["kling_o1","kling_o3","grok_imagine_video","gemini_omni_flash"],"description":"Edit model"},"prompt":{"type":"string","description":"Edit instruction"},"videoUrl":{"type":"string","format":"uri","description":"Source video URL"},"images":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","properties":{"appKey":{"type":"string"},"id":{"type":"string"},"temporary":{"type":"boolean"},"type":{"type":"string","enum":["image","video","audio","document"]}},"required":["appKey","id","type"],"additionalProperties":false}]},"maxItems":4,"description":"Reference images"},"elements":{"type":"array","items":{"type":"object","properties":{"referenceImageUrls":{"type":"array","items":{"type":"string","format":"uri"}},"frontalImageUrl":{"type":"string","format":"uri"}},"required":["referenceImageUrls","frontalImageUrl"],"additionalProperties":false},"description":"Reference elements"},"klingAspectRatio":{"type":"string","enum":["16:9","9:16","1:1"]},"klingDuration":{"type":"string","enum":["5","10"]},"klingMode":{"type":"string","enum":["pro","std"]},"klingO3Duration":{"type":"string","enum":["3","4","5","6","7","8","9","10","11","12","13","14","15"]},"klingO3V2VAspectRatio":{"type":"string","enum":["auto","16:9","9:16","1:1"]},"keepAudio":{"type":"boolean","description":"Keep original audio"},"grokResolution":{"type":"string","enum":["480p","720p","1080p"]}},"required":["appKey","variant","model","prompt","videoUrl"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["COMPLETED"]},"runId":{"type":"string"},"result":{},"tokensUsed":{"type":"number","nullable":true}},"required":["status","runId","tokensUsed"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["IN_PROGRESS"]},"runId":{"type":"string"}},"required":["status","runId"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["FAILED"]},"runId":{"type":"string"},"error":{"type":"string"}},"required":["status","runId","error"],"additionalProperties":false}]}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/ai-tools-service/upscaleImage":{"post":{"operationId":"ai-tools_upscaleImage","summary":"Upscale image resolution","tags":["ai-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string","description":"Account app key"},"image":{"anyOf":[{"type":"string"},{"type":"object","properties":{"appKey":{"type":"string"},"id":{"type":"string"},"temporary":{"type":"boolean"},"type":{"type":"string","enum":["image","video","audio","document"]}},"required":["appKey","id","type"],"additionalProperties":false}],"description":"Image to upscale"},"model":{"type":"string","enum":["topaz_upscale"],"description":"Upscale model"},"upscaleFactor":{"type":"number","minimum":1,"maximum":4,"default":2,"description":"Upscale factor (1-4, decimals supported)"},"faceEnhancementCreativity":{"type":"number","minimum":0,"maximum":1,"description":"Face enhancement creativity (0-1)"},"outputFormat":{"type":"string","enum":["jpeg","png"],"description":"Output format (png or jpeg). Default: png"}},"required":["appKey","image","model"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["COMPLETED"]},"runId":{"type":"string"},"result":{},"tokensUsed":{"type":"number","nullable":true}},"required":["status","runId","tokensUsed"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["IN_PROGRESS"]},"runId":{"type":"string"}},"required":["status","runId"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["FAILED"]},"runId":{"type":"string"},"error":{"type":"string"}},"required":["status","runId","error"],"additionalProperties":false}]}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/ai-tools-service/editCameraAngle":{"post":{"operationId":"ai-tools_editCameraAngle","summary":"Adjust camera angle of image","tags":["ai-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string","description":"Account app key"},"image":{"anyOf":[{"type":"string"},{"type":"object","properties":{"appKey":{"type":"string"},"id":{"type":"string"},"temporary":{"type":"boolean"},"type":{"type":"string","enum":["image","video","audio","document"]}},"required":["appKey","id","type"],"additionalProperties":false}],"description":"Source image"},"model":{"type":"string","enum":["qwen_multiple_angles"],"description":"Camera angle model"},"rotateDegree":{"type":"integer","minimum":-90,"maximum":90,"description":"Rotation degrees (-90 to 90)"},"verticalAngle":{"type":"integer","minimum":-1,"maximum":1,"description":"Vertical angle (-1 to 1)"},"moveForward":{"type":"integer","minimum":0,"maximum":10,"description":"Move forward (0-10)"}},"required":["appKey","image","model","rotateDegree","verticalAngle"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["COMPLETED"]},"runId":{"type":"string"},"result":{},"tokensUsed":{"type":"number","nullable":true}},"required":["status","runId","tokensUsed"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["IN_PROGRESS"]},"runId":{"type":"string"}},"required":["status","runId"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["FAILED"]},"runId":{"type":"string"},"error":{"type":"string"}},"required":["status","runId","error"],"additionalProperties":false}]}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/ai-tools-service/analyzeMedia":{"post":{"operationId":"ai-tools_analyzeMedia","summary":"Analyze media with AI","tags":["ai-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string","description":"Account app key"},"model":{"type":"string","enum":["gemini-3.1-flash-lite","GEMINI_3_1_FLASH_LITE","gemini-3.1-pro-preview","GEMINI_3_1_PRO_PREVIEW","gemini-3.5-flash","GEMINI_3_5_FLASH","gemini-3.5-flash-lite","GEMINI_3_5_FLASH_LITE","gemini-3.6-flash","GEMINI_3_6_FLASH","gemini-3.7-flash","GEMINI_3_7_FLASH"],"description":"Analysis model"},"videoUrl":{"type":"string","description":"Video URL to analyze"},"mediaUrls":{"type":"array","items":{"type":"string"},"description":"Media URLs to analyze"},"prompt":{"type":"string","description":"Analysis prompt"},"responseJsonSchema":{"type":"string","description":"JSON schema for structured response"}},"required":["appKey","model","prompt"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["COMPLETED"]},"runId":{"type":"string"},"result":{},"tokensUsed":{"type":"number","nullable":true}},"required":["status","runId","tokensUsed"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["IN_PROGRESS"]},"runId":{"type":"string"}},"required":["status","runId"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["FAILED"]},"runId":{"type":"string"},"error":{"type":"string"}},"required":["status","runId","error"],"additionalProperties":false}]}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/ai-tools-service/llm":{"post":{"operationId":"ai-tools_llm","summary":"Run LLM completion","tags":["ai-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string","description":"Account app key"},"model":{"type":"string","enum":["gemini-3.1-pro-preview","gemini-3.1-flash-lite","gemini-3.5-flash","gemini-3.5-flash-lite","gemini-3.6-flash","gemini-3.7-flash","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.5","gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna","claude-opus-4-6","claude-opus-4-7","claude-opus-4-8","claude-opus-5","claude-fable-5","claude-sonnet-5","claude-sonnet-4-6","claude-haiku-4-5-20251001","grok-4.3","grok-4.5","grok-4.6","kimi-k3","kimi-k2.7","minimax-m3","qwen3.8-max","seed-2-0-pro-260328","dola-seed-2-1-turbo-260628","seed-2-0-mini-260428","gpt-4o-mini-search-preview"],"description":"LLM model to use"},"prompt":{"type":"string","description":"Text prompt"},"attachments":{"type":"array","items":{"type":"string","format":"uri"},"description":"URLs to attach as context"},"systemPrompt":{"type":"string","description":"System prompt"},"reasoningEffort":{"type":"string","enum":["minimal","low","medium","high"],"description":"Reasoning effort level"},"temperature":{"type":"number","minimum":0,"maximum":1,"description":"Temperature (0-1)"}},"required":["appKey","model","prompt"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["COMPLETED"]},"runId":{"type":"string"},"result":{},"tokensUsed":{"type":"number","nullable":true}},"required":["status","runId","tokensUsed"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["IN_PROGRESS"]},"runId":{"type":"string"}},"required":["status","runId"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["FAILED"]},"runId":{"type":"string"},"error":{"type":"string"}},"required":["status","runId","error"],"additionalProperties":false}]}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/ai-tools-service/tryon":{"post":{"operationId":"ai-tools_tryon","summary":"Virtual try-on","tags":["ai-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string","description":"Account app key"},"model":{"type":"string","enum":["fashn_tryon_v1_6","fashn_product_to_model"],"description":"Try-on model"},"modelImage":{"anyOf":[{"type":"string"},{"type":"object","properties":{"appKey":{"type":"string"},"id":{"type":"string"},"temporary":{"type":"boolean"},"type":{"type":"string","enum":["image","video","audio","document"]}},"required":["appKey","id","type"],"additionalProperties":false}],"description":"Model person image"},"garmentImage":{"anyOf":[{"type":"string"},{"type":"object","properties":{"appKey":{"type":"string"},"id":{"type":"string"},"temporary":{"type":"boolean"},"type":{"type":"string","enum":["image","video","audio","document"]}},"required":["appKey","id","type"],"additionalProperties":false}],"description":"Garment image"},"fashnMode":{"type":"string","enum":["performance","balanced","quality"]},"fashnCategory":{"type":"string","enum":["tops","bottoms","one-pieces","auto"]},"fashnAspectRatio":{"type":"string","enum":["1:1","3:4","4:3","9:16","16:9","2:3","3:2","4:5","5:4"]}},"required":["appKey","model","garmentImage"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["COMPLETED"]},"runId":{"type":"string"},"result":{},"tokensUsed":{"type":"number","nullable":true}},"required":["status","runId","tokensUsed"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["IN_PROGRESS"]},"runId":{"type":"string"}},"required":["status","runId"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["FAILED"]},"runId":{"type":"string"},"error":{"type":"string"}},"required":["status","runId","error"],"additionalProperties":false}]}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/ai-tools-service/googleBatch":{"post":{"operationId":"ai-tools_googleBatch","summary":"Batch image generation via Google","tags":["ai-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string","description":"Account app key"},"batchId":{"type":"string","description":"Batch ID to process"},"model":{"type":"string","enum":["gemini-2.5-flash-image","gemini-3-pro-image","gemini-3.1-flash-image","gemini-3.1-flash-lite-image"],"description":"Gemini image model"}},"required":["appKey","batchId","model"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["COMPLETED"]},"runId":{"type":"string"},"result":{},"tokensUsed":{"type":"number","nullable":true}},"required":["status","runId","tokensUsed"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["IN_PROGRESS"]},"runId":{"type":"string"}},"required":["status","runId"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["FAILED"]},"runId":{"type":"string"},"error":{"type":"string"}},"required":["status","runId","error"],"additionalProperties":false}]}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/ai-tools-service/transcribeVideo":{"post":{"operationId":"ai-tools_transcribeVideo","summary":"Transcribe video to text","tags":["ai-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string","description":"Account app key"},"videoUrl":{"type":"string","description":"Video URL to transcribe"},"language":{"type":"string","description":"Language code"}},"required":["appKey","videoUrl"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["COMPLETED"]},"runId":{"type":"string"},"result":{},"tokensUsed":{"type":"number","nullable":true}},"required":["status","runId","tokensUsed"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["IN_PROGRESS"]},"runId":{"type":"string"}},"required":["status","runId"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["FAILED"]},"runId":{"type":"string"},"error":{"type":"string"}},"required":["status","runId","error"],"additionalProperties":false}]}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/ai-tools-service/textToSpeech":{"post":{"operationId":"ai-tools_textToSpeech","summary":"Convert text to speech","tags":["ai-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string","description":"Account app key"},"text":{"type":"string","description":"Text to synthesize"},"voiceId":{"type":"string","description":"ElevenLabs voice ID"},"language":{"type":"string","description":"Language code"},"modelId":{"type":"string","description":"TTS model ID"}},"required":["appKey","text"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["COMPLETED"]},"runId":{"type":"string"},"result":{},"tokensUsed":{"type":"number","nullable":true}},"required":["status","runId","tokensUsed"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["IN_PROGRESS"]},"runId":{"type":"string"}},"required":["status","runId"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["FAILED"]},"runId":{"type":"string"},"error":{"type":"string"}},"required":["status","runId","error"],"additionalProperties":false}]}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/ai-tools-service/listVoices":{"post":{"operationId":"ai-tools_listVoices","summary":"List available TTS voices","tags":["ai-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string","description":"Account app key"},"gender":{"type":"string","description":"Filter by gender"},"age":{"type":"string","description":"Filter by age"},"accent":{"type":"string","description":"Filter by accent"},"language":{"type":"string","description":"Filter by language"},"use_cases":{"type":"string","description":"Filter by use case"},"descriptives":{"type":"string","description":"Filter by descriptive tags"},"search":{"type":"string","description":"Search query"},"page_size":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Results per page (1-100)"}},"required":["appKey"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["COMPLETED"]},"runId":{"type":"string"},"result":{},"tokensUsed":{"type":"number","nullable":true}},"required":["status","runId","tokensUsed"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["IN_PROGRESS"]},"runId":{"type":"string"}},"required":["status","runId"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["FAILED"]},"runId":{"type":"string"},"error":{"type":"string"}},"required":["status","runId","error"],"additionalProperties":false}]}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/ai-tools-service/generateMusic":{"post":{"operationId":"ai-tools_generateMusic","summary":"Generate music from prompt","tags":["ai-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string","description":"Account app key"},"prompt":{"type":"string","description":"Music generation prompt"},"durationSeconds":{"type":"number","minimum":1,"maximum":22,"description":"Duration in seconds (1-22)"}},"required":["appKey","prompt"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["COMPLETED"]},"runId":{"type":"string"},"result":{},"tokensUsed":{"type":"number","nullable":true}},"required":["status","runId","tokensUsed"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["IN_PROGRESS"]},"runId":{"type":"string"}},"required":["status","runId"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["FAILED"]},"runId":{"type":"string"},"error":{"type":"string"}},"required":["status","runId","error"],"additionalProperties":false}]}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/ai-tools-service/motionControl":{"post":{"operationId":"ai-tools_motionControl","summary":"Transfer motion from reference video onto a subject image","tags":["ai-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","enum":["kling_v3"],"description":"Motion control model"},"imageUrl":{"type":"string","minLength":1,"description":"URL of the reference image (provides character/subject appearance)"},"videoUrl":{"type":"string","minLength":1,"description":"URL of the reference video (provides motion to transfer)"},"characterOrientation":{"type":"string","enum":["video","image"],"description":"Output orientation: \"video\" matches reference video pose, \"image\" matches reference image pose"},"appKey":{"type":"string","description":"Account app key"},"prompt":{"type":"string","description":"Text description guiding the generation"},"keepOriginalSound":{"type":"boolean","description":"Whether to preserve audio from the reference video"},"klingMode":{"type":"string","enum":["pro","std"],"description":"Kling mode: pro (higher quality) or std"},"elements":{"type":"array","items":{"type":"object","properties":{"referenceImageUrls":{"type":"array","items":{"type":"string"},"minItems":1,"description":"Reference image URLs for the face/identity"},"frontalImageUrl":{"type":"string","description":"Frontal face image URL for identity binding"}},"required":["referenceImageUrls","frontalImageUrl"],"additionalProperties":false},"maxItems":1,"description":"Face binding element (max 1). Only with characterOrientation=\"video\""}},"required":["model","imageUrl","videoUrl","characterOrientation","appKey"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["COMPLETED"]},"runId":{"type":"string"},"result":{},"tokensUsed":{"type":"number","nullable":true}},"required":["status","runId","tokensUsed"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["IN_PROGRESS"]},"runId":{"type":"string"}},"required":["status","runId"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["FAILED"]},"runId":{"type":"string"},"error":{"type":"string"}},"required":["status","runId","error"],"additionalProperties":false}]}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/ai-tools-service/lipsync":{"post":{"operationId":"ai-tools_lipsync","summary":"Synchronize lip movements in video to match audio","tags":["ai-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","enum":["kling_lipsync","sync_3","veed_lipsync_v2"],"description":"Lipsync model: kling_lipsync, sync_3, or veed_lipsync_v2"},"videoUrl":{"type":"string","format":"uri","description":"URL of the source video to lipsync"},"audioUrl":{"type":"string","format":"uri","description":"URL of the replacement audio track"},"appKey":{"type":"string","description":"Account app key"},"syncMode":{"type":"string","enum":["cut_off","loop","bounce","silence","remap"],"description":"Audio/video duration mismatch handling (Sync Labs only): cut_off, loop, bounce, silence, remap"}},"required":["model","videoUrl","audioUrl","appKey"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["COMPLETED"]},"runId":{"type":"string"},"result":{},"tokensUsed":{"type":"number","nullable":true}},"required":["status","runId","tokensUsed"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["IN_PROGRESS"]},"runId":{"type":"string"}},"required":["status","runId"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["FAILED"]},"runId":{"type":"string"},"error":{"type":"string"}},"required":["status","runId","error"],"additionalProperties":false}]}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/ai-tools-service/removeBackground":{"post":{"operationId":"ai-tools_removeBackground","summary":"Remove background from image","tags":["ai-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string","description":"Account app key"},"image":{"anyOf":[{"type":"string"},{"type":"object","properties":{"appKey":{"type":"string"},"id":{"type":"string"},"temporary":{"type":"boolean"},"type":{"type":"string","enum":["image","video","audio","document"]}},"required":["appKey","id","type"],"additionalProperties":false}],"description":"Image to remove background from"}},"required":["appKey","image"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["COMPLETED"]},"runId":{"type":"string"},"result":{},"tokensUsed":{"type":"number","nullable":true}},"required":["status","runId","tokensUsed"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["IN_PROGRESS"]},"runId":{"type":"string"}},"required":["status","runId"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["FAILED"]},"runId":{"type":"string"},"error":{"type":"string"}},"required":["status","runId","error"],"additionalProperties":false}]}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/ai-tools-service/generateSfx":{"post":{"operationId":"ai-tools_generateSfx","summary":"Generate sound effects from text description","tags":["ai-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string","description":"Account app key"},"prompt":{"type":"string","description":"Text description of the sound effect"},"durationSeconds":{"type":"number","minimum":1,"maximum":30,"description":"Duration in seconds (1-30, default 10)"},"promptInfluence":{"type":"number","minimum":0,"maximum":1,"description":"How closely output follows the prompt (0-1, default 0.3)"}},"required":["appKey","prompt"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["COMPLETED"]},"runId":{"type":"string"},"result":{},"tokensUsed":{"type":"number","nullable":true}},"required":["status","runId","tokensUsed"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["IN_PROGRESS"]},"runId":{"type":"string"}},"required":["status","runId"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["FAILED"]},"runId":{"type":"string"},"error":{"type":"string"}},"required":["status","runId","error"],"additionalProperties":false}]}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/ai-tools-service/getMultiTurnEditSession":{"post":{"operationId":"ai-tools_getMultiTurnEditSession","summary":"Get multi-turn edit session summary","tags":["ai-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string","description":"Account app key"},"sessionId":{"type":"string","description":"Session ID to fetch"},"sourceAssetId":{"type":"string","description":"Source asset ID to look up session for"}},"required":["appKey"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"string"},"model":{"type":"string"},"turnCount":{"type":"number"},"sourceImageUrl":{"type":"string"},"sourceAssetId":{"type":"string"},"parentSessionId":{"type":"string"},"turns":{"type":"array","items":{"type":"object","properties":{"prompt":{"type":"string"},"imageUrl":{"type":"string"},"studioAssetId":{"type":"string"},"turnIndex":{"type":"number"}},"required":["prompt","imageUrl","turnIndex"],"additionalProperties":false}}},"required":["sessionId","model","turnCount","turns"],"additionalProperties":false,"nullable":true}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}},"/ai-tools-service/getToolStatus":{"post":{"operationId":"ai-tools_getToolStatus","summary":"Poll async tool run status","tags":["ai-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appKey":{"type":"string","description":"Account app key"},"runId":{"type":"string","description":"Tool run ID to check"}},"required":["appKey","runId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["COMPLETED"]},"runId":{"type":"string"},"result":{},"tokensUsed":{"type":"number","nullable":true}},"required":["status","runId","tokensUsed"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["IN_PROGRESS"]},"runId":{"type":"string"}},"required":["status","runId"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["FAILED"]},"runId":{"type":"string"},"error":{"type":"string"}},"required":["status","runId","error"],"additionalProperties":false}]}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}},"security":[{"oauth2":["workspace"]},{"bearerAuth":[]}]}}},"components":{"securitySchemes":{"oauth2":{"type":"oauth2","description":"Tolstoy's OAuth 2.0 authorization server (also used by the MCP server). Grants workspace-scoped access to the authenticated account.","flows":{"authorizationCode":{"authorizationUrl":"https://apilb.gotolstoy.com/mcp/v1/oauth/authorize","tokenUrl":"https://apilb.gotolstoy.com/mcp/v1/oauth/token","refreshUrl":"https://apilb.gotolstoy.com/mcp/v1/oauth/token","scopes":{"workspace":"Full access to the authenticated Tolstoy workspace."}}}},"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Workspace access token. Obtain one via OAuth 2.0, or create a Tolstoy API key in your workspace and exchange it at POST /account-service/authenticateCliApiKey with the X-CLI-API-Key header. Include your workspace appKey in each request body."}}}}
