Save generated creatives
Saves AI-generated creatives (from generate-creatives) into the brand's creative library, where the creatives list shows them. A generated creative stays out of that list until it is saved or used in an ad. Creatives an agent chat made go into one folder for that chat, named on its first save; others are saved at the top of the library. Returns the ids this call saved, the ids that were already saved, the ids that are not generated creatives of this brand, and the folders it saved into. Idempotent.
bearerAuthAuthorizationBearer <token>An organization API key (koast_sk_…) with the API surface enabled, or an OAuth access token issued by Koast (koast_at_…) whose audience covers this API. REST access requires an active Agency plan.
brandId*integerThe brand the request acts on. Every brand-scoped resource lives under its brand.
Idempotency-Key?stringRetrying with the same key within 24 hours returns the first response without acting again.
length <= 255application/json- body
creativeIds*array<>The creativeIds from generate-creatives that the user wants to keep.
1 <= items <= 100folderName?stringA short name for what this round is (brand and idea), for the folder the chat's ads are saved into. Used only when the chat has no folder yet; the date is added to it.
1 <= length <= 120Save generated creatives
application/json- response
saved*array<>Generated creatives this call put in the creative library.
alreadySaved*array<>Generated creatives that were already in the library.
notSaved*array<>Ids that are not AI-generated creatives of this brand, so nothing was saved for them.
folders*array<>The folder each chat's saved creatives went into. Creatives made outside a chat are saved at the top of the library and are in no folder.
[key: string]?unknowncurl -X POST "https://example.com/v1/brands/0/creatives/save" \ -H "Authorization: Bearer koast_sk_..." \ -H "Content-Type: application/json" \ -d '{ "creativeIds": [ 1 ] }'{ "saved": [ -9007199254740991 ], "alreadySaved": [ -9007199254740991 ], "notSaved": [ -9007199254740991 ], "folders": [ { "id": -9007199254740991, "name": "string", "creativeIds": [ -9007199254740991 ], "property1": null, "property2": null } ], "property1": null, "property2": null}Required scope: write. CLI: koast save-generated-creatives, see Creatives commands. Authentication, headers, errors and pagination work the same on every operation. See Conventions.
Render creative
Renders an html ad, or a saved creative template with its slot values, at 1080 pixels wide in the aspect ratio given, and stores the image for the brand; it stays out of the creative library list until it is saved with save-generated-creatives or used in an ad. Page scripts are off and only data: urls, Koast storage and Google Fonts load; other requests are listed in blocked. Synchronous; allow up to three minutes.
View images
Returns viewable copies of library creatives (creativeIds) and web images (urls). Web images are fetched, shrunk to at most 1568 pixels on the long side and stored on Koast storage; private and internal addresses are refused.