Back to MCP Overview

Own AI key prices Tools

Model prices for your own AI keys: see them, and type or remove a price the provider does not publish.

4 tools

Available Tools

ownKeyPrices_list

List the model prices kept for this workspace's own AI keys: those a person typed and those the provider itself publishes. Param: llmKeyId (optional: one key only). Returns { prices: [{ id, llmKeyId, provider, keyLabel, providerModelId, source ("typed" or "provider"), inputPricePerMillionTokens, outputPricePerMillionTokens, cachedInputPricePerMillionTokens, cacheWritePricePerMillionTokens (null = charged at the input price), pricedAt, updatedAt }] }, in dollars per million tokens. When a key has both for one model, the provider's price is the one used. Only reads. Who may: anyone who may change workspace settings (the people allowed to manage the workspace's AI keys), from the dashboard, their AI chat, their AI client or an API key; an agent run, a function or a flow may read it through its grants.

Input Schema

llmKeyIdstring

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "ownKeyPrices_list",
    "arguments": {
          "llmKeyId": "example"
    }
  }
}
ownKeyPrices_keys

List this workspace's own AI keys (id, provider, label) so a price can be typed for one of them with ownKeyPrices_set. No params. Returns { keys: [{ llmKeyId, provider, keyLabel (null when the key has no name) }] }; never the key itself. Only reads. Who may: the people allowed to manage the workspace's AI keys, from the dashboard, their AI chat, their AI client or an API key; agents, functions and flows are refused.

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "ownKeyPrices_keys",
    "arguments": {}
  }
}
ownKeyPrices_set

Type the prices of one model on one of this workspace's own AI keys, used when the provider publishes none (a dollar spend limit counts a run at these prices). Params: llmKeyId (the id of one of the workspace's own AI keys, as ownKeyPrices_keys lists them), providerModelId (the model id exactly as the key's model list names it, 1 to 200 characters), inputPricePerMillionTokens and outputPricePerMillionTokens (dollars per million tokens, above 0), cachedInputPricePerMillionTokens and cacheWritePricePerMillionTokens (optional, above 0; left out = the input price; the cached price can't be above the input price). A second set for the same key and model replaces its typed prices. At most 500 typed prices per workspace. From an AI the change is never made at once: the answer is { applied: false, pendingChange } and nothing changes until the person allows it on the card in the Serenities dashboard; tell them it waits for their OK (pendingChanges_status says what became of it). Who may: the people allowed to manage the workspace's AI keys, from the dashboard, their AI chat, their AI client or an API key; agents, functions and flows are refused.

Input Schema

llmKeyIdstringrequired
providerModelIdstringrequired
inputPricePerMillionTokensnumberrequired
outputPricePerMillionTokensnumberrequired
cachedInputPricePerMillionTokensnumbernull
cacheWritePricePerMillionTokensnumbernull

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "ownKeyPrices_set",
    "arguments": {
          "llmKeyId": "example",
          "providerModelId": "example",
          "inputPricePerMillionTokens": 0
    }
  }
}
ownKeyPrices_remove

Remove the typed prices of one model on one of this workspace's own AI keys (prices the provider publishes are never removed here). Params: llmKeyId, providerModelId. Afterwards that model on that key has no typed price; a price the provider publishes still counts. From an AI the change is never made at once: the answer is { applied: false, pendingChange } and nothing changes until the person allows it on the card in the Serenities dashboard; tell them it waits for their OK (pendingChanges_status says what became of it). Who may: the people allowed to manage the workspace's AI keys, from the dashboard, their AI chat, their AI client or an API key; agents, functions and flows are refused. Act only on what the person named or picked.

Input Schema

llmKeyIdstringrequired
providerModelIdstringrequired

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "ownKeyPrices_remove",
    "arguments": {
          "llmKeyId": "example",
          "providerModelId": "example"
    }
  }
}