User Tools

Site Tools


api:ai:pricing-update

API : AI pricing : Create/update

Introduction

This request creates or updates the cost price for an AI model. Send _id to update an existing entry; omit it to create a new one. Only the unit price fields relevant for the service need to be set. Note that models must be unique - a duplicate model is rejected by a unique index.

Price changes only affect future usage; already logged records keep their frozen cost.

Request

URL https://api.telecomx.dk/ai/pricing
Method POST
Access level ADMIN
Body (JSON) _id [optional] Id of an existing entry to update.
provider ELEVENLABS or ANTHROPIC.
service TTS, STT or LLM.
model Model id the price applies to, matched against logged usage.
usdPerMCharacters [optional] TTS: USD per 1,000,000 input characters.
usdPerAudioHour [optional] STT: USD per hour of input audio (per channel).
usdPerMInputTokens [optional] LLM: USD per 1,000,000 input tokens.
usdPerMOutputTokens [optional] LLM: USD per 1,000,000 output tokens.

Response

Property Type Description
success Boolean True.
pricing Object The stored price entry (same fields as in the list response).

Errors

Error code Message Description
400 validation Invalid or missing body fields
403 access_denied Insufficient access level
500 internal_error Duplicate model, or unspecified
api/ai/pricing-update.txt · Last modified: by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki