Skip to content

Commit e379289

Browse files
author
sd
committed
Add pricing_adjustments to integrations API
Adds the optional pricing_adjustments field to CreateIntegrationRequest, UpdateIntegrationRequest, and IntegrationDetailResponse, plus the new PricingAdjustments and PricingMultiplier component schemas. The multiplier keys mirror the pricing keys in the Portkey Models database.
1 parent 92a7bb1 commit e379289

1 file changed

Lines changed: 151 additions & 1 deletion

File tree

openapi.yaml

Lines changed: 151 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31811,6 +31811,8 @@ components:
3181131811
items:
3181231812
$ref: '#/components/schemas/SecretMapping'
3181331813
description: Dynamically resolve secrets from secret references at runtime. Valid target_field values are "key" or "configurations.<field>" (e.g. "configurations.aws_secret_access_key", "configurations.azure_entra_client_secret"). Each target_field must be unique. When "key" is mapped, the key body field can be omitted.
31814+
pricing_adjustments:
31815+
$ref: '#/components/schemas/PricingAdjustments'
3181431816

3181531817
UpdateIntegrationRequest:
3181631818
type: object
@@ -31856,6 +31858,8 @@ components:
3185631858
items:
3185731859
$ref: '#/components/schemas/SecretMapping'
3185831860
description: Dynamically resolve secrets from secret references at runtime. Valid target_field values are "key" or "configurations.<field>" (e.g. "configurations.aws_secret_access_key", "configurations.azure_entra_client_secret"). Each target_field must be unique.
31861+
pricing_adjustments:
31862+
$ref: '#/components/schemas/PricingAdjustments'
3185931863

3186031864
IntegrationDetailResponse:
3186131865
allOf:
@@ -31911,7 +31915,153 @@ components:
3191131915
items:
3191231916
$ref: '#/components/schemas/SecretMapping'
3191331917
description: Secret reference mappings for this integration. Valid target_field values are "key" or "configurations.<field>".
31914-
31918+
pricing_adjustments:
31919+
$ref: '#/components/schemas/PricingAdjustments'
31920+
31921+
PricingAdjustments:
31922+
type: object
31923+
nullable: true
31924+
additionalProperties: false
31925+
description: |
31926+
Per-Integration pricing adjustments applied on top of Portkey's base model pricing
31927+
for cost tracking, analytics, and budget limits. Use to reflect negotiated discounts,
31928+
committed-use rates, or internal markups for cost showback.
31929+
properties:
31930+
multiplier:
31931+
$ref: '#/components/schemas/PricingMultiplier'
31932+
example:
31933+
multiplier:
31934+
default: 0.8
31935+
cache_read_input_token: 0.9
31936+
cache_write_input_token: 0.9
31937+
31938+
PricingMultiplier:
31939+
type: object
31940+
additionalProperties: false
31941+
description: |
31942+
Multipliers applied to the corresponding pricing keys from
31943+
[Portkey Models](https://portkey.ai/models). A multiplier of `1` leaves pricing
31944+
unchanged, `0.8` applies a 20% discount, `1.2` applies a 20% markup. Missing or
31945+
`null` fields inherit from `default`; if `default` is also unset, no change is applied.
31946+
All values must be non-negative numbers.
31947+
properties:
31948+
default:
31949+
type: number
31950+
nullable: true
31951+
minimum: 0
31952+
description: Multiplier applied to every token type unless a more specific multiplier is set.
31953+
request_token:
31954+
type: number
31955+
nullable: true
31956+
minimum: 0
31957+
description: Multiplier for input/request token cost.
31958+
response_token:
31959+
type: number
31960+
nullable: true
31961+
minimum: 0
31962+
description: Multiplier for output/response token cost.
31963+
cache_read_input_token:
31964+
type: number
31965+
nullable: true
31966+
minimum: 0
31967+
description: Multiplier for cache-read input token cost.
31968+
cache_write_input_token:
31969+
type: number
31970+
nullable: true
31971+
minimum: 0
31972+
description: Multiplier for cache-write input token cost.
31973+
cache_read_audio_input_token:
31974+
type: number
31975+
nullable: true
31976+
minimum: 0
31977+
description: Multiplier for cache-read audio input token cost.
31978+
request_audio_token:
31979+
type: number
31980+
nullable: true
31981+
minimum: 0
31982+
description: Multiplier for audio input token cost.
31983+
response_audio_token:
31984+
type: number
31985+
nullable: true
31986+
minimum: 0
31987+
description: Multiplier for audio output token cost.
31988+
reasoning_token:
31989+
type: number
31990+
nullable: true
31991+
minimum: 0
31992+
description: Multiplier for reasoning/thinking token cost.
31993+
prediction_accepted_token:
31994+
type: number
31995+
nullable: true
31996+
minimum: 0
31997+
description: Multiplier for accepted predicted-output token cost.
31998+
prediction_rejected_token:
31999+
type: number
32000+
nullable: true
32001+
minimum: 0
32002+
description: Multiplier for rejected predicted-output token cost.
32003+
request_image_token:
32004+
type: number
32005+
nullable: true
32006+
minimum: 0
32007+
description: Multiplier for image-modality input token cost.
32008+
response_image_token:
32009+
type: number
32010+
nullable: true
32011+
minimum: 0
32012+
description: Multiplier for image-modality output token cost.
32013+
request_text_token:
32014+
type: number
32015+
nullable: true
32016+
minimum: 0
32017+
description: Multiplier for text-modality input token cost.
32018+
response_text_token:
32019+
type: number
32020+
nullable: true
32021+
minimum: 0
32022+
description: Multiplier for text-modality output token cost.
32023+
cache_read_image_input_token:
32024+
type: number
32025+
nullable: true
32026+
minimum: 0
32027+
description: Multiplier for cache-read image-input token cost.
32028+
cache_read_text_input_token:
32029+
type: number
32030+
nullable: true
32031+
minimum: 0
32032+
description: Multiplier for cache-read text-input token cost.
32033+
cache_write_text_input_token:
32034+
type: number
32035+
nullable: true
32036+
minimum: 0
32037+
description: Multiplier for cache-write text-input token cost.
32038+
cache_write_image_input_token:
32039+
type: number
32040+
nullable: true
32041+
minimum: 0
32042+
description: Multiplier for cache-write image-input token cost.
32043+
image:
32044+
type: object
32045+
nullable: true
32046+
additionalProperties: false
32047+
description: Image generation pricing multipliers.
32048+
properties:
32049+
default:
32050+
type: number
32051+
nullable: true
32052+
minimum: 0
32053+
description: Multiplier applied to image generation pricing across all qualities and sizes.
32054+
additional_units:
32055+
type: object
32056+
nullable: true
32057+
description: |
32058+
Multipliers for per-unit charges such as `web_search`, `file_search`, `input_image`,
32059+
`input_video_standard`. Keys must match those returned by Portkey Models for the provider.
32060+
additionalProperties:
32061+
type: number
32062+
nullable: true
32063+
minimum: 0
32064+
3191532065
GlobalWorkspaceAccess:
3191632066
type: object
3191732067
required:

0 commit comments

Comments
 (0)