set_model_price #
Generated automatically from the published contract sources.
Build metadata: Registered in this build. Registration describes the default dispatcher in this build. It does not guarantee that a caller has the required credential or grant, that a tool is listed for that connection, or that the required service is configured.
A script calls this action over HTTPS at POST https://turnzero.ai/api/v1/actions/set_model_price, with a bearer credential and the action's payload as the JSON body.
Contract description #
Append a Gemini model's price row to the platform's price table, with no deploy. Super-admin (platform operator) only. The row carries the model's name and its input, cached-input, audio-input, output, and image-output rates in US dollars per million tokens. It also carries its long-context rates and their threshold where the model has a tier, the date it takes effect, and the price list's address and read date. Every rate is the provider's published figure and no value of the pricing registry, whose allowance row records the table's provenance.
A row is appended and never rewritten. The row in effect at a call's instant prices that call, so a later row moves no past call. The AI allowance meter reads the table at each call. A model with no row is metered at the dearest row in effect and signalled to the operator by the watched condition named for it; append the model's row to clear the condition. The calls already priced at the dearest row stay so.
Access and action metadata #
{
"name": "set_model_price",
"resource": "account",
"tier": "reversible",
"grant": "super_admin",
"summary": "Super-admin: append one row to the AI allowance's price table — a Gemini model's name, its input, cached-input, audio-input, output, and image-output rates in US dollars per million tokens, its long-context rates and threshold where it has a tier, the date the row takes effect, and the price list's address and read date — with no deploy; a row is appended and never rewritten, the row in effect at a call's instant prices that call, and a later row moves no past call; every rate is the provider's published figure and no value of the pricing registry, whose allowance row records the table's provenance; a model with no row is metered at the dearest row in effect and signalled by the watched condition named for it, which the appended row clears at its next evaluation.",
"annotations": {
"readOnlyHint": false,
"destructiveHint": false,
"openWorldHint": false
}
}
MCP catalog entry #
{
"name": "set_model_price",
"title": "Set model price",
"tier": "reversible",
"scenario": "API-L0-12",
"summary": "Append a Gemini model's price row to the platform's price table, with no deploy. Super-admin (platform operator) only. The row carries the model's name and its input, cached-input, audio-input, output, and image-output rates in US dollars per million tokens. It also carries its long-context rates and their threshold where the model has a tier, the date it takes effect, and the price list's address and read date. Every rate is the provider's published figure and no value of the pricing registry, whose allowance row records the table's provenance.\n\nA row is appended and never rewritten. The row in effect at a call's instant prices that call, so a later row moves no past call. The AI allowance meter reads the table at each call. A model with no row is metered at the dearest row in effect and signalled to the operator by the watched condition named for it; append the model's row to clear the condition. The calls already priced at the dearest row stay so.",
"owners": [
"EGW-L0-06",
"API-L0-12",
"PRC-L0-01"
]
}
request #
| JSON pointer | Description and constraints |
|---|---|
| "" (root) | Type: object Required fields: ["model","input_usd_per_million","output_usd_per_million","effective_from","source"] |
| / |
The Gemini model name the row prices, spelled as a call names it in the allowance route's path, opening with `gemini-`. Type: string Pattern: ^gemini-[a-z0-9.-]+$ |
| / |
US dollars per million prompt tokens of text, image, or video, to six places, the provider's published figure. Type: number Minimum: 0 |
| / |
US dollars per million prompt tokens the provider serves from its cache, to six places, the provider's published cached-input figure. Null or absent draws cached tokens at the input rate. Type: ["number","null"] Minimum: 0 |
| / |
US dollars per million prompt tokens of audio, where the provider prices audio apart; null or absent prices audio at the input rate. Type: ["number","null"] Minimum: 0 |
| / |
US dollars per million output tokens, thinking tokens among them, the provider's published figure. Type: number Minimum: 0 |
| / |
US dollars per million image output tokens; the provider's per-image price is the image's tokens at this rate. Null or absent for a model that generates no image. Type: ["number","null"] Minimum: 0 |
| / |
The input rate for a prompt whose tokens pass `long_context_threshold_tokens`; null or absent where the model has no long-context tier. Type: ["number","null"] Minimum: 0 |
| / |
The output rate for a call whose prompt passes the threshold; null or absent where the model has no long-context tier. Type: ["number","null"] Minimum: 0 |
| / |
The prompt token count past which the long-context rates apply; null or absent where the model has no long-context tier. Type: ["integer","null"] Minimum: 1 |
| / |
The UTC date, `YYYY-MM-DD`, from which the row prices calls, the provider's own effective date. A row is appended and never rewritten: the row in effect at a call's instant is the model's newest whose date has passed. Type: string |
| / |
Where the figures were read: the provider's price list's address and the date it was read, recorded with the row. Type: string |
response #
| JSON pointer | Description and constraints |
|---|---|
| "" (root) | Type: object Required fields: ["contract_version","price"] |
| / |
Required value: 1 |
| / |
The short reference the platform recorded this call under, ten lowercase hexadecimal characters, the value the call’s record row carries; quote it when reporting the call. Type: string Pattern: ^[0-9a-f]{10}$ |
| / |
the row as appended; a row the table already holds for the model and the date is answered unchanged Type: object Required fields: ["model","input_usd_per_million","cached_input_usd_per_million","audio_input_usd_per_million","output_usd_per_million","image_output_usd_per_million","long_context_input_usd_per_million","long_context_output_usd_per_million","long_context_threshold_tokens","effective_from","source","set_at","set_by"] |
| / |
The Gemini model name the row prices, spelled as a call names it in the allowance route's path, opening with `gemini-`. Type: string Pattern: ^gemini-[a-z0-9.-]+$ |
| / |
US dollars per million prompt tokens of text, image, or video, to six places, the provider's published figure. Type: number Minimum: 0 |
| / |
US dollars per million prompt tokens the provider serves from its cache, to six places, the provider's published cached-input figure. Null or absent draws cached tokens at the input rate. Type: ["number","null"] Minimum: 0 |
| / |
US dollars per million prompt tokens of audio, where the provider prices audio apart; null or absent prices audio at the input rate. Type: ["number","null"] Minimum: 0 |
| / |
US dollars per million output tokens, thinking tokens among them, the provider's published figure. Type: number Minimum: 0 |
| / |
US dollars per million image output tokens; the provider's per-image price is the image's tokens at this rate. Null or absent for a model that generates no image. Type: ["number","null"] Minimum: 0 |
| / |
The input rate for a prompt whose tokens pass `long_context_threshold_tokens`; null or absent where the model has no long-context tier. Type: ["number","null"] Minimum: 0 |
| / |
The output rate for a call whose prompt passes the threshold; null or absent where the model has no long-context tier. Type: ["number","null"] Minimum: 0 |
| / |
The prompt token count past which the long-context rates apply; null or absent where the model has no long-context tier. Type: ["integer","null"] Minimum: 1 |
| / |
The UTC date, `YYYY-MM-DD`, from which the row prices calls, the provider's own effective date. A row is appended and never rewritten: the row in effect at a call's instant is the model's newest whose date has passed. Type: string |
| / |
Where the figures were read: the provider's price list's address and the date it was read, recorded with the row. Type: string |
| / |
the write's instant, ISO 8601 in UTC Type: string |
| / |
the operator's account id; seed for a row the migration wrote Type: string |
| / |
from when the row prices calls, that earlier calls keep the draw recorded on their rows, and, where the model stood on the unpriced condition, that the condition clears at its next evaluation Type: string |
Complete payload contract #
{
"request": {
"type": "object",
"required": [
"model",
"input_usd_per_million",
"output_usd_per_million",
"effective_from",
"source"
],
"properties": {
"model": {
"type": "string",
"pattern": "^gemini-[a-z0-9.-]+$",
"description": "The Gemini model name the row prices, spelled as a call names it in the allowance route's path, opening with `gemini-`."
},
"input_usd_per_million": {
"type": "number",
"minimum": 0,
"description": "US dollars per million prompt tokens of text, image, or video, to six places, the provider's published figure."
},
"cached_input_usd_per_million": {
"type": [
"number",
"null"
],
"minimum": 0,
"description": "US dollars per million prompt tokens the provider serves from its cache, to six places, the provider's published cached-input figure. Null or absent draws cached tokens at the input rate."
},
"audio_input_usd_per_million": {
"type": [
"number",
"null"
],
"minimum": 0,
"description": "US dollars per million prompt tokens of audio, where the provider prices audio apart; null or absent prices audio at the input rate."
},
"output_usd_per_million": {
"type": "number",
"minimum": 0,
"description": "US dollars per million output tokens, thinking tokens among them, the provider's published figure."
},
"image_output_usd_per_million": {
"type": [
"number",
"null"
],
"minimum": 0,
"description": "US dollars per million image output tokens; the provider's per-image price is the image's tokens at this rate. Null or absent for a model that generates no image."
},
"long_context_input_usd_per_million": {
"type": [
"number",
"null"
],
"minimum": 0,
"description": "The input rate for a prompt whose tokens pass `long_context_threshold_tokens`; null or absent where the model has no long-context tier."
},
"long_context_output_usd_per_million": {
"type": [
"number",
"null"
],
"minimum": 0,
"description": "The output rate for a call whose prompt passes the threshold; null or absent where the model has no long-context tier."
},
"long_context_threshold_tokens": {
"type": [
"integer",
"null"
],
"minimum": 1,
"description": "The prompt token count past which the long-context rates apply; null or absent where the model has no long-context tier."
},
"effective_from": {
"type": "string",
"description": "The UTC date, `YYYY-MM-DD`, from which the row prices calls, the provider's own effective date. A row is appended and never rewritten: the row in effect at a call's instant is the model's newest whose date has passed."
},
"source": {
"type": "string",
"description": "Where the figures were read: the provider's price list's address and the date it was read, recorded with the row."
}
}
},
"response": {
"type": "object",
"required": [
"contract_version",
"price"
],
"properties": {
"contract_version": {
"const": 1
},
"reference": {
"type": "string",
"pattern": "^[0-9a-f]{10}$",
"description": "The short reference the platform recorded this call under, ten lowercase hexadecimal characters, the value the call’s record row carries; quote it when reporting the call."
},
"price": {
"type": "object",
"required": [
"model",
"input_usd_per_million",
"cached_input_usd_per_million",
"audio_input_usd_per_million",
"output_usd_per_million",
"image_output_usd_per_million",
"long_context_input_usd_per_million",
"long_context_output_usd_per_million",
"long_context_threshold_tokens",
"effective_from",
"source",
"set_at",
"set_by"
],
"properties": {
"model": {
"type": "string",
"pattern": "^gemini-[a-z0-9.-]+$",
"description": "The Gemini model name the row prices, spelled as a call names it in the allowance route's path, opening with `gemini-`."
},
"input_usd_per_million": {
"type": "number",
"minimum": 0,
"description": "US dollars per million prompt tokens of text, image, or video, to six places, the provider's published figure."
},
"cached_input_usd_per_million": {
"type": [
"number",
"null"
],
"minimum": 0,
"description": "US dollars per million prompt tokens the provider serves from its cache, to six places, the provider's published cached-input figure. Null or absent draws cached tokens at the input rate."
},
"audio_input_usd_per_million": {
"type": [
"number",
"null"
],
"minimum": 0,
"description": "US dollars per million prompt tokens of audio, where the provider prices audio apart; null or absent prices audio at the input rate."
},
"output_usd_per_million": {
"type": "number",
"minimum": 0,
"description": "US dollars per million output tokens, thinking tokens among them, the provider's published figure."
},
"image_output_usd_per_million": {
"type": [
"number",
"null"
],
"minimum": 0,
"description": "US dollars per million image output tokens; the provider's per-image price is the image's tokens at this rate. Null or absent for a model that generates no image."
},
"long_context_input_usd_per_million": {
"type": [
"number",
"null"
],
"minimum": 0,
"description": "The input rate for a prompt whose tokens pass `long_context_threshold_tokens`; null or absent where the model has no long-context tier."
},
"long_context_output_usd_per_million": {
"type": [
"number",
"null"
],
"minimum": 0,
"description": "The output rate for a call whose prompt passes the threshold; null or absent where the model has no long-context tier."
},
"long_context_threshold_tokens": {
"type": [
"integer",
"null"
],
"minimum": 1,
"description": "The prompt token count past which the long-context rates apply; null or absent where the model has no long-context tier."
},
"effective_from": {
"type": "string",
"description": "The UTC date, `YYYY-MM-DD`, from which the row prices calls, the provider's own effective date. A row is appended and never rewritten: the row in effect at a call's instant is the model's newest whose date has passed."
},
"source": {
"type": "string",
"description": "Where the figures were read: the provider's price list's address and the date it was read, recorded with the row."
},
"set_at": {
"type": "string",
"description": "the write's instant, ISO 8601 in UTC"
},
"set_by": {
"type": "string",
"description": "the operator's account id; seed for a row the migration wrote"
}
},
"description": "the row as appended; a row the table already holds for the model and the date is answered unchanged"
},
"detail": {
"type": "string",
"description": "from when the row prices calls, that earlier calls keep the draw recorded on their rows, and, where the model stood on the unpriced condition, that the condition clears at its next evaluation (EGW-L0-06; PLD-L0-83)"
}
}
}
}
Shared contracts #
- Refusals: every refusal, by surface, with its cause and its remedy
- schemas/wire_error.schema.json
- schemas/wire_errors.json
- schemas/action_payloads.json (includes shared shapes)
- management_api_contract.md