创建我的第一个广告活动
文档菜单
POST/api/v1/banners/:id/edits

Correct and adapt a banner

Correct a concept with a plain-language instruction or add new sizes to it. They respond 202 with a job.

These are the same changes you make in the studio, at the same credit cost. Both endpoints respond 202 with a job: follow it like the create-a-banner job and, when it finishes, you will receive the banner.updated webhook (or generation.failed). They require the generate permission and accept Idempotency-Key.

Correct with an instruction

POST /api/v1/banners/:id/edits changes the concept with an instruction such as "bigger button" and saves a new version.

FieldRequirementDescription
instructionstring
Required
What to change, in plain language. From 1 to 2000 characters.
sizesstring[]
Optional
Change only these sizes. If omitted, it changes all of them.
modelstring
Optional
Model family: haiku, sonnet, opus, or fable. If omitted, the workspace's.

Add sizes

POST /api/v1/banners/:id/sizes adapts the concept to new sizes and charges for each new size, as in the app.

FieldRequirementDescription
sizesstring[]
Required
Sizes in the format 300x600. From 1 to 12.
modelstring
Optional
Model family, as above.

Response · 202

It carries jobId, type (edit or adapt), status, bannerId and the statusUrl and eventsUrl paths. With a bm_test_ key the job comes already resolved and nothing is charged.

这一页对你有帮助吗?