Draft offers from a key's models
create_offersDraft offers from a key's models
Drafts one offer per model of the key's last discovery, priced to follow the market unless a fixed discount is given. The selection replaces the key's drafts. A draft goes live after its health test and identity checks pass (the test_offer tool) and it is published (the publish_offer tool). Sellers only: an account that has not accepted the selling terms gets 403 not_seller. Send selfPrices (model id to { p, c, cr? }, USD per 1M tokens, each above 0) to draft any model at your own price; a model with no reference price anywhere needs one. A Z.ai key that discovery found to be an open-platform one (the job's zaiKind is open) is refused while nothing is listed on it: 422 preset_coming_soon (GLM Coding Plan keys work now). At most 500 offers per account (drafts included, cancelled ones not), and 2,000 new ones a day: past either, 409 limit_reached.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"credentialId": "<credentialId>",
"models": "<models>"
},
"name": "create_offers"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| models | Yes | Models of the key's last discovery (our id or the vendor's). The selection replaces the key's drafts. | |
| selfPrices | No | Your own price for selected models, by model id: { p, c, cr? } in USD per 1M tokens, each above 0. Any model; required for a model with no reference anywhere. | |
| discountPct | No | ||
| pricingMode | No | match | |
| credentialId | Yes | ||
| idempotencyKey | No | Optional. A unique string so that repeating this call never creates twice. | |
| maxDiscountPct | No |