创建我的第一个广告活动
文档菜单
POST/api/v1/estimate

Estimate credits

Find out how many credits an operation would cost and what your balance is, without reserving anything.

Before asking for a job, ask what it would cost. It reserves and charges nothing; it uses the model you ask for or the workspace default, with the same price source as the app. Requires the read permission (or any of the others).

FieldRequirementDescription
operationstring
Required
generate, edit, add_sizes, add_locale, translate or export.
modelstring
Optional
Model family: haiku, sonnet, opus, or fable.
sizesstring[]
Depends on the operation
In generate, the concept's sizes (default 4); in edit, the ones the correction touches; in add_sizes, the new ones (required).
localesstring[]
Optional
In generate, the concept's locales (default 1).
bannerIdstring
Depends on the operation
In edit it takes all its sizes; in add_sizes it counts the sizes it already has; in translate it is required.
campaignIdstring
Depends on the operation
In generate it takes its sizes and locales; in add_locale it is required.
localestring
Depends on the operation
In add_locale, the locale to add.

The cost comes from the same formula as the app: concept, correction, new sizes and language (see “Credits”). The response carries operation, model, credits (what it would cost), balance (your current balance) and sufficient (whether you have enough), plus the measures it used (sizes, locales, newSizes, existingSizes…). With a bm_test_ key nothing costs anything: credits is what it would cost with bm_live_ and balance is null.

小贴士。 An export costs 0 credits. Translating always uses the latest Sonnet.
这一页对你有帮助吗?