完整计费规则(含所有情况、单位和条件)
{
"branches": [
{
"components": [
{
"coefficient": "8",
"unit": "DECLARED_USD_PER_MILLION_TOKENS",
"usageKind": "OUTPUT_BASE",
"usageVariable": "c"
},
{
"coefficient": "0.04",
"unit": "DECLARED_USD_PER_MILLION_TOKENS",
"usageKind": "CACHE_READ",
"usageVariable": "cr"
},
{
"coefficient": "2",
"unit": "DECLARED_USD_PER_MILLION_TOKENS",
"usageKind": "INPUT_BASE",
"usageVariable": "p"
}
],
"pathConditions": [
{
"conditionAST": {
"left": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "weekday",
"type": "call"
},
"operator": ">=",
"right": {
"type": "number",
"value": "1"
},
"type": "binary"
},
"operator": "&&",
"right": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "weekday",
"type": "call"
},
"operator": "<=",
"right": {
"type": "number",
"value": "5"
},
"type": "binary"
},
"type": "binary"
},
"operator": "&&",
"right": {
"left": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "hour",
"type": "call"
},
"operator": "*",
"right": {
"type": "number",
"value": "60"
},
"type": "binary"
},
"operator": "+",
"right": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "minute",
"type": "call"
},
"type": "binary"
},
"operator": ">=",
"right": {
"type": "number",
"value": "540"
},
"type": "binary"
},
"operator": "&&",
"right": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "hour",
"type": "call"
},
"operator": "*",
"right": {
"type": "number",
"value": "60"
},
"type": "binary"
},
"operator": "+",
"right": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "minute",
"type": "call"
},
"type": "binary"
},
"operator": "<",
"right": {
"type": "number",
"value": "720"
},
"type": "binary"
},
"type": "binary"
},
"type": "binary"
},
"operator": "||",
"right": {
"left": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "hour",
"type": "call"
},
"operator": "*",
"right": {
"type": "number",
"value": "60"
},
"type": "binary"
},
"operator": "+",
"right": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "minute",
"type": "call"
},
"type": "binary"
},
"operator": ">=",
"right": {
"type": "number",
"value": "840"
},
"type": "binary"
},
"operator": "&&",
"right": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "hour",
"type": "call"
},
"operator": "*",
"right": {
"type": "number",
"value": "60"
},
"type": "binary"
},
"operator": "+",
"right": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "minute",
"type": "call"
},
"type": "binary"
},
"operator": "<",
"right": {
"type": "number",
"value": "1080"
},
"type": "binary"
},
"type": "binary"
},
"type": "binary"
},
"matches": true
}
],
"perRequestPrice": null,
"tierName": "peak",
"unit": "DECLARED_USD_PER_MILLION_TOKENS"
},
{
"components": [
{
"coefficient": "4",
"unit": "DECLARED_USD_PER_MILLION_TOKENS",
"usageKind": "OUTPUT_BASE",
"usageVariable": "c"
},
{
"coefficient": "0.02",
"unit": "DECLARED_USD_PER_MILLION_TOKENS",
"usageKind": "CACHE_READ",
"usageVariable": "cr"
},
{
"coefficient": "1",
"unit": "DECLARED_USD_PER_MILLION_TOKENS",
"usageKind": "INPUT_BASE",
"usageVariable": "p"
}
],
"pathConditions": [
{
"conditionAST": {
"left": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "weekday",
"type": "call"
},
"operator": ">=",
"right": {
"type": "number",
"value": "1"
},
"type": "binary"
},
"operator": "&&",
"right": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "weekday",
"type": "call"
},
"operator": "<=",
"right": {
"type": "number",
"value": "5"
},
"type": "binary"
},
"type": "binary"
},
"operator": "&&",
"right": {
"left": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "hour",
"type": "call"
},
"operator": "*",
"right": {
"type": "number",
"value": "60"
},
"type": "binary"
},
"operator": "+",
"right": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "minute",
"type": "call"
},
"type": "binary"
},
"operator": ">=",
"right": {
"type": "number",
"value": "540"
},
"type": "binary"
},
"operator": "&&",
"right": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "hour",
"type": "call"
},
"operator": "*",
"right": {
"type": "number",
"value": "60"
},
"type": "binary"
},
"operator": "+",
"right": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "minute",
"type": "call"
},
"type": "binary"
},
"operator": "<",
"right": {
"type": "number",
"value": "720"
},
"type": "binary"
},
"type": "binary"
},
"type": "binary"
},
"operator": "||",
"right": {
"left": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "hour",
"type": "call"
},
"operator": "*",
"right": {
"type": "number",
"value": "60"
},
"type": "binary"
},
"operator": "+",
"right": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "minute",
"type": "call"
},
"type": "binary"
},
"operator": ">=",
"right": {
"type": "number",
"value": "840"
},
"type": "binary"
},
"operator": "&&",
"right": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "hour",
"type": "call"
},
"operator": "*",
"right": {
"type": "number",
"value": "60"
},
"type": "binary"
},
"operator": "+",
"right": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "minute",
"type": "call"
},
"type": "binary"
},
"operator": "<",
"right": {
"type": "number",
"value": "1080"
},
"type": "binary"
},
"type": "binary"
},
"type": "binary"
},
"matches": false
}
],
"perRequestPrice": null,
"tierName": "off_peak",
"unit": "DECLARED_USD_PER_MILLION_TOKENS"
}
],
"cashQualification": "NOT_EVALUATED",
"cashQualified": false,
"conditionAST": {
"condition": {
"left": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "weekday",
"type": "call"
},
"operator": ">=",
"right": {
"type": "number",
"value": "1"
},
"type": "binary"
},
"operator": "&&",
"right": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "weekday",
"type": "call"
},
"operator": "<=",
"right": {
"type": "number",
"value": "5"
},
"type": "binary"
},
"type": "binary"
},
"operator": "&&",
"right": {
"left": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "hour",
"type": "call"
},
"operator": "*",
"right": {
"type": "number",
"value": "60"
},
"type": "binary"
},
"operator": "+",
"right": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "minute",
"type": "call"
},
"type": "binary"
},
"operator": ">=",
"right": {
"type": "number",
"value": "540"
},
"type": "binary"
},
"operator": "&&",
"right": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "hour",
"type": "call"
},
"operator": "*",
"right": {
"type": "number",
"value": "60"
},
"type": "binary"
},
"operator": "+",
"right": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "minute",
"type": "call"
},
"type": "binary"
},
"operator": "<",
"right": {
"type": "number",
"value": "720"
},
"type": "binary"
},
"type": "binary"
},
"type": "binary"
},
"operator": "||",
"right": {
"left": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "hour",
"type": "call"
},
"operator": "*",
"right": {
"type": "number",
"value": "60"
},
"type": "binary"
},
"operator": "+",
"right": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "minute",
"type": "call"
},
"type": "binary"
},
"operator": ">=",
"right": {
"type": "number",
"value": "840"
},
"type": "binary"
},
"operator": "&&",
"right": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "hour",
"type": "call"
},
"operator": "*",
"right": {
"type": "number",
"value": "60"
},
"type": "binary"
},
"operator": "+",
"right": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "minute",
"type": "call"
},
"type": "binary"
},
"operator": "<",
"right": {
"type": "number",
"value": "1080"
},
"type": "binary"
},
"type": "binary"
},
"type": "binary"
},
"type": "conditional",
"whenFalse": {
"arguments": [
{
"type": "string",
"value": "off_peak"
},
{
"left": {
"left": {
"left": {
"name": "p",
"type": "variable"
},
"operator": "*",
"right": {
"type": "number",
"value": "1"
},
"type": "binary"
},
"operator": "+",
"right": {
"left": {
"name": "c",
"type": "variable"
},
"operator": "*",
"right": {
"type": "number",
"value": "4"
},
"type": "binary"
},
"type": "binary"
},
"operator": "+",
"right": {
"left": {
"name": "cr",
"type": "variable"
},
"operator": "*",
"right": {
"type": "number",
"value": "0.02"
},
"type": "binary"
},
"type": "binary"
}
],
"function": "tier",
"type": "call"
},
"whenTrue": {
"arguments": [
{
"type": "string",
"value": "peak"
},
{
"left": {
"left": {
"left": {
"name": "p",
"type": "variable"
},
"operator": "*",
"right": {
"type": "number",
"value": "2"
},
"type": "binary"
},
"operator": "+",
"right": {
"left": {
"name": "c",
"type": "variable"
},
"operator": "*",
"right": {
"type": "number",
"value": "8"
},
"type": "binary"
},
"type": "binary"
},
"operator": "+",
"right": {
"left": {
"name": "cr",
"type": "variable"
},
"operator": "*",
"right": {
"type": "number",
"value": "0.04"
},
"type": "binary"
},
"type": "binary"
}
],
"function": "tier",
"type": "call"
}
},
"dependencies": {
"requestContext": [
{
"argument": "Asia/Shanghai",
"function": "hour"
},
{
"argument": "Asia/Shanghai",
"function": "minute"
},
{
"argument": "Asia/Shanghai",
"function": "weekday"
}
],
"taskUsageSchema": null,
"usageVariables": [
"c",
"cr",
"p"
]
},
"evidenceRefs": [
"https://github.com/QuantumNous/new-api/blob/1a4166d8e8ba9802d2ca56fe8ecf0ed5404e80d5/pkg/billingexpr/expr.md",
"https://github.com/QuantumNous/new-api/blob/1a4166d8e8ba9802d2ca56fe8ecf0ed5404e80d5/pkg/billingexpr/settle.go",
"https://github.com/QuantumNous/new-api/blob/1a4166d8e8ba9802d2ca56fe8ecf0ed5404e80d5/pkg/billingexpr/run.go",
"https://github.com/QuantumNous/new-api/blob/1a4166d8e8ba9802d2ca56fe8ecf0ed5404e80d5/pkg/billingexpr/fixed.go"
],
"expressionVersion": "v1",
"groupRatio": "1.2",
"groupRatioApplied": false,
"humanExtractionReview": "NOT_PERFORMED",
"kind": "CONDITIONAL_EXPRESSION",
"limitations": [
"DECLARED_USD_COEFFICIENTS_NOT_RECHARGE_CASH_PROOF",
"PROVIDER_DEPLOYMENT_SEMANTICS_UNVERIFIED",
"TOKEN_USAGE_NORMALIZATION_REQUIRES_UPSTREAM_USAGE_SHAPE",
"GROUP_RATIO_NOT_APPLIED",
"TOOL_SURCHARGES_AND_EXTERNAL_REQUEST_MULTIPLIERS_NOT_ESTABLISHED",
"OTHER_PRICING_FIELDS_REQUIRE_SEPARATE_REVIEW",
"CONDITIONS_RETAINED_NOT_EVALUATED_WITH_REQUEST_OR_PROVIDER_CLOCK"
],
"normalization": {
"contextLength": "len is full input context, before subclass exclusion",
"inputBase": "p excludes separately referenced input subclasses; omitted subclasses follow its base rate",
"outputBase": "c excludes separately referenced output subclasses; omitted subclasses follow its base rate",
"profile": "NEW_API_BILLINGEXPR_V1",
"referencedVariablesAreExpressionWide": true,
"upstreamUsageConvention": "Normalization depends on OpenAI or Claude usage shape; img_cr requires valid modality details"
},
"parserVersion": "grandet.new-api-expression-projection/1.1.0",
"ruleContentSha256": "69fa2e1b44440875f8f829b683bb81eba1d39b683c4caa057b993f63a3779f7c",
"schema": "grandet.public-pricing-rule/v1",
"sourceExpressionSha256": "e633f07d6bc0cabf0200a73b65bb36f4f30741d0594124503ea6b6cbbbe87283",
"status": "SUPPORTED_PUBLIC_DECLARATION",
"units": [
"DECLARED_USD_PER_MILLION_TOKENS"
]
}这条价格的完整原始记录
{
"accountEligibility": "UNVERIFIED",
"analysisDoesNotRenewObservation": true,
"attemptId": "029757cc4d57201f192a30d8cf6c2e456d1515df3ebd0fd85ca361d862d2a28d",
"cacheReadPrice": null,
"cacheWritePrice": null,
"captureParserVersion": "grandet.new-api-public-pricing/1.7.0",
"cashQualification": "NOT_EVALUATED",
"cashQualified": false,
"classification": "SPECIAL_OR_UNKNOWN_PRICING",
"conditions": {
"balanceExpiry": {
"status": "UNKNOWN"
},
"bonusWallet": {
"status": "UNKNOWN"
},
"declaredEndpointTypes": [
"openai",
"anthropic"
],
"declaredGroupDescription": "OpenAI-VIP",
"declaredGroupRatio": "1.2",
"eligibility": {
"declaredGroup": "OpenAIVIP",
"status": "UNKNOWN"
},
"membership": {
"status": "UNKNOWN"
},
"minimumTopup": {
"status": "UNKNOWN"
},
"mixedWallet": {
"status": "UNKNOWN"
},
"nightDiscount": {
"status": "UNKNOWN"
},
"rateWindows": {
"status": "UNKNOWN"
},
"requiredFees": {
"status": "UNKNOWN"
},
"sharedAllowance": {
"status": "UNKNOWN"
},
"sourceEffectiveAt": {
"status": "UNKNOWN"
},
"tieredRates": {
"status": "UNKNOWN"
},
"topupBonus": {
"status": "UNKNOWN"
}
},
"declaredGroup": "OpenAIVIP",
"formulaAssurance": "DECLARED_BILLING_EXPRESSION_IMPLEMENTATION_UNVERIFIED",
"formulaProjectionBlockers": [
"NONEMPTY_MODELCONDITIONALPRICING_SEMANTICS_UNVERIFIED",
"NONSTANDARD_GLOBAL_FIELDS"
],
"freshUntil": "2026-10-17T07:19:55.331000Z",
"groupOfferingFlags": [],
"humanExtractionReview": "NOT_PERFORMED",
"inputPrice": null,
"modelName": "deepseek-v4-flash",
"multimodalPricing": null,
"observedAt": "2026-10-10T07:19:56.903Z",
"offerKey": "83f00f9b5d15db7ced5e265223f5e31d34e12872c12f4b44b0d2285c59be673c",
"outputPrice": null,
"parseRevisionId": null,
"parsedPricingDeclarations": null,
"parserFamily": "NEW_API_PUBLIC_PRICING",
"parserVersion": "grandet.new-api-public-pricing/1.7.0",
"partialPriceComponents": {
"baseFormulaArithmetic": {
"formula": "model_ratio * declared_group_ratio * 1000000; output/cache additionally multiply their declared ratios",
"meaning": "UNMODIFIED_BASE_ARITHMETIC_ONLY_NOT_THE_FINAL_TARIFF",
"overridesApplied": false,
"unit": "PLATFORM_QUOTA_POINTS_PER_MILLION_TOKENS",
"values": {
"cacheRead": "120000.000",
"cacheWrite": null,
"input": "600000.00",
"output": "2400000.00"
}
},
"cashQualification": "NOT_EVALUATED",
"components": [
{
"role": "BASE_DECLARATION_NOT_EFFECTIVE_TARIFF",
"sourceField": "model_ratio",
"status": "EXACT_NUMERIC_DECLARATION",
"unit": "SOURCE_BASE_MODEL_RATIO",
"usageKind": "TEXT_INPUT",
"value": "0.5"
},
{
"role": "BASE_DECLARATION_NOT_EFFECTIVE_TARIFF",
"sourceField": "completion_ratio",
"status": "EXACT_NUMERIC_DECLARATION",
"unit": "SOURCE_COMPLETION_RATIO",
"usageKind": "TEXT_OUTPUT",
"value": "4"
},
{
"role": "BASE_DECLARATION_NOT_EFFECTIVE_TARIFF",
"sourceField": "cache_ratio",
"status": "EXACT_NUMERIC_DECLARATION",
"unit": "SOURCE_CACHE_READ_RATIO",
"usageKind": "CACHE_READ",
"value": "0.2"
}
],
"contentSha256": "b0df6cabd198a2e7ce01b85101f4d32333d40bca34d4ccb6ea0ae1295f09c87f",
"currencyInferred": false,
"declaredGroupRatio": "1.2",
"effectiveQuote": false,
"eligibleForPriceRanking": false,
"quoteId": "22bb2899766a54fb0dfee900fc096d03a0beb19fc43aafc10ad40e1c0cd98b50",
"rawDeclaredFieldsSha256": "bbf9f88d8efe6152869970d7b6ba4b5f1cb1d3eb246426b997736f487daa89d5",
"schema": "grandet.partial-price-components/v1",
"sourceRowId": "36bd883956e1d6e5ecc66b9309fca07eb568f23e045a1cdd3238a57362f68c47",
"status": "PARTIAL_EXTRACTION_FINAL_TARIFF_UNRESOLVED",
"unresolvedTariffReasons": [
"NONEMPTY_MODELCONDITIONALPRICING_SEMANTICS_UNVERIFIED",
"NONSTANDARD_GLOBAL_FIELDS"
]
},
"perRequestPrice": null,
"planId": "declared-group:OpenAIVIP",
"pricePairSourceRowId": "36bd883956e1d6e5ecc66b9309fca07eb568f23e045a1cdd3238a57362f68c47",
"pricingAdapterEvidence": [
{
"kind": "PUBLIC_PRIMARY_VENDOR_SCHEMA",
"url": "https://raw.githubusercontent.com/QuantumNous/new-api/1a4166d8e8ba9802d2ca56fe8ecf0ed5404e80d5/model/pricing.go"
},
{
"kind": "PUBLIC_PRIMARY_USABLE_GROUP_FILTER",
"url": "https://raw.githubusercontent.com/QuantumNous/new-api/1a4166d8e8ba9802d2ca56fe8ecf0ed5404e80d5/controller/pricing.go"
}
],
"pricingResolution": "UNRESOLVED",
"pricingRule": {
"branches": [
{
"components": [
{
"coefficient": "8",
"unit": "DECLARED_USD_PER_MILLION_TOKENS",
"usageKind": "OUTPUT_BASE",
"usageVariable": "c"
},
{
"coefficient": "0.04",
"unit": "DECLARED_USD_PER_MILLION_TOKENS",
"usageKind": "CACHE_READ",
"usageVariable": "cr"
},
{
"coefficient": "2",
"unit": "DECLARED_USD_PER_MILLION_TOKENS",
"usageKind": "INPUT_BASE",
"usageVariable": "p"
}
],
"pathConditions": [
{
"conditionAST": {
"left": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "weekday",
"type": "call"
},
"operator": ">=",
"right": {
"type": "number",
"value": "1"
},
"type": "binary"
},
"operator": "&&",
"right": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "weekday",
"type": "call"
},
"operator": "<=",
"right": {
"type": "number",
"value": "5"
},
"type": "binary"
},
"type": "binary"
},
"operator": "&&",
"right": {
"left": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "hour",
"type": "call"
},
"operator": "*",
"right": {
"type": "number",
"value": "60"
},
"type": "binary"
},
"operator": "+",
"right": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "minute",
"type": "call"
},
"type": "binary"
},
"operator": ">=",
"right": {
"type": "number",
"value": "540"
},
"type": "binary"
},
"operator": "&&",
"right": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "hour",
"type": "call"
},
"operator": "*",
"right": {
"type": "number",
"value": "60"
},
"type": "binary"
},
"operator": "+",
"right": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "minute",
"type": "call"
},
"type": "binary"
},
"operator": "<",
"right": {
"type": "number",
"value": "720"
},
"type": "binary"
},
"type": "binary"
},
"type": "binary"
},
"operator": "||",
"right": {
"left": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "hour",
"type": "call"
},
"operator": "*",
"right": {
"type": "number",
"value": "60"
},
"type": "binary"
},
"operator": "+",
"right": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "minute",
"type": "call"
},
"type": "binary"
},
"operator": ">=",
"right": {
"type": "number",
"value": "840"
},
"type": "binary"
},
"operator": "&&",
"right": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "hour",
"type": "call"
},
"operator": "*",
"right": {
"type": "number",
"value": "60"
},
"type": "binary"
},
"operator": "+",
"right": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "minute",
"type": "call"
},
"type": "binary"
},
"operator": "<",
"right": {
"type": "number",
"value": "1080"
},
"type": "binary"
},
"type": "binary"
},
"type": "binary"
},
"matches": true
}
],
"perRequestPrice": null,
"tierName": "peak",
"unit": "DECLARED_USD_PER_MILLION_TOKENS"
},
{
"components": [
{
"coefficient": "4",
"unit": "DECLARED_USD_PER_MILLION_TOKENS",
"usageKind": "OUTPUT_BASE",
"usageVariable": "c"
},
{
"coefficient": "0.02",
"unit": "DECLARED_USD_PER_MILLION_TOKENS",
"usageKind": "CACHE_READ",
"usageVariable": "cr"
},
{
"coefficient": "1",
"unit": "DECLARED_USD_PER_MILLION_TOKENS",
"usageKind": "INPUT_BASE",
"usageVariable": "p"
}
],
"pathConditions": [
{
"conditionAST": {
"left": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "weekday",
"type": "call"
},
"operator": ">=",
"right": {
"type": "number",
"value": "1"
},
"type": "binary"
},
"operator": "&&",
"right": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "weekday",
"type": "call"
},
"operator": "<=",
"right": {
"type": "number",
"value": "5"
},
"type": "binary"
},
"type": "binary"
},
"operator": "&&",
"right": {
"left": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "hour",
"type": "call"
},
"operator": "*",
"right": {
"type": "number",
"value": "60"
},
"type": "binary"
},
"operator": "+",
"right": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "minute",
"type": "call"
},
"type": "binary"
},
"operator": ">=",
"right": {
"type": "number",
"value": "540"
},
"type": "binary"
},
"operator": "&&",
"right": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "hour",
"type": "call"
},
"operator": "*",
"right": {
"type": "number",
"value": "60"
},
"type": "binary"
},
"operator": "+",
"right": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "minute",
"type": "call"
},
"type": "binary"
},
"operator": "<",
"right": {
"type": "number",
"value": "720"
},
"type": "binary"
},
"type": "binary"
},
"type": "binary"
},
"operator": "||",
"right": {
"left": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "hour",
"type": "call"
},
"operator": "*",
"right": {
"type": "number",
"value": "60"
},
"type": "binary"
},
"operator": "+",
"right": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "minute",
"type": "call"
},
"type": "binary"
},
"operator": ">=",
"right": {
"type": "number",
"value": "840"
},
"type": "binary"
},
"operator": "&&",
"right": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "hour",
"type": "call"
},
"operator": "*",
"right": {
"type": "number",
"value": "60"
},
"type": "binary"
},
"operator": "+",
"right": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "minute",
"type": "call"
},
"type": "binary"
},
"operator": "<",
"right": {
"type": "number",
"value": "1080"
},
"type": "binary"
},
"type": "binary"
},
"type": "binary"
},
"matches": false
}
],
"perRequestPrice": null,
"tierName": "off_peak",
"unit": "DECLARED_USD_PER_MILLION_TOKENS"
}
],
"cashQualification": "NOT_EVALUATED",
"cashQualified": false,
"conditionAST": {
"condition": {
"left": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "weekday",
"type": "call"
},
"operator": ">=",
"right": {
"type": "number",
"value": "1"
},
"type": "binary"
},
"operator": "&&",
"right": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "weekday",
"type": "call"
},
"operator": "<=",
"right": {
"type": "number",
"value": "5"
},
"type": "binary"
},
"type": "binary"
},
"operator": "&&",
"right": {
"left": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "hour",
"type": "call"
},
"operator": "*",
"right": {
"type": "number",
"value": "60"
},
"type": "binary"
},
"operator": "+",
"right": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "minute",
"type": "call"
},
"type": "binary"
},
"operator": ">=",
"right": {
"type": "number",
"value": "540"
},
"type": "binary"
},
"operator": "&&",
"right": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "hour",
"type": "call"
},
"operator": "*",
"right": {
"type": "number",
"value": "60"
},
"type": "binary"
},
"operator": "+",
"right": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "minute",
"type": "call"
},
"type": "binary"
},
"operator": "<",
"right": {
"type": "number",
"value": "720"
},
"type": "binary"
},
"type": "binary"
},
"type": "binary"
},
"operator": "||",
"right": {
"left": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "hour",
"type": "call"
},
"operator": "*",
"right": {
"type": "number",
"value": "60"
},
"type": "binary"
},
"operator": "+",
"right": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "minute",
"type": "call"
},
"type": "binary"
},
"operator": ">=",
"right": {
"type": "number",
"value": "840"
},
"type": "binary"
},
"operator": "&&",
"right": {
"left": {
"left": {
"left": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "hour",
"type": "call"
},
"operator": "*",
"right": {
"type": "number",
"value": "60"
},
"type": "binary"
},
"operator": "+",
"right": {
"arguments": [
{
"type": "string",
"value": "Asia/Shanghai"
}
],
"function": "minute",
"type": "call"
},
"type": "binary"
},
"operator": "<",
"right": {
"type": "number",
"value": "1080"
},
"type": "binary"
},
"type": "binary"
},
"type": "binary"
},
"type": "conditional",
"whenFalse": {
"arguments": [
{
"type": "string",
"value": "off_peak"
},
{
"left": {
"left": {
"left": {
"name": "p",
"type": "variable"
},
"operator": "*",
"right": {
"type": "number",
"value": "1"
},
"type": "binary"
},
"operator": "+",
"right": {
"left": {
"name": "c",
"type": "variable"
},
"operator": "*",
"right": {
"type": "number",
"value": "4"
},
"type": "binary"
},
"type": "binary"
},
"operator": "+",
"right": {
"left": {
"name": "cr",
"type": "variable"
},
"operator": "*",
"right": {
"type": "number",
"value": "0.02"
},
"type": "binary"
},
"type": "binary"
}
],
"function": "tier",
"type": "call"
},
"whenTrue": {
"arguments": [
{
"type": "string",
"value": "peak"
},
{
"left": {
"left": {
"left": {
"name": "p",
"type": "variable"
},
"operator": "*",
"right": {
"type": "number",
"value": "2"
},
"type": "binary"
},
"operator": "+",
"right": {
"left": {
"name": "c",
"type": "variable"
},
"operator": "*",
"right": {
"type": "number",
"value": "8"
},
"type": "binary"
},
"type": "binary"
},
"operator": "+",
"right": {
"left": {
"name": "cr",
"type": "variable"
},
"operator": "*",
"right": {
"type": "number",
"value": "0.04"
},
"type": "binary"
},
"type": "binary"
}
],
"function": "tier",
"type": "call"
}
},
"dependencies": {
"requestContext": [
{
"argument": "Asia/Shanghai",
"function": "hour"
},
{
"argument": "Asia/Shanghai",
"function": "minute"
},
{
"argument": "Asia/Shanghai",
"function": "weekday"
}
],
"taskUsageSchema": null,
"usageVariables": [
"c",
"cr",
"p"
]
},
"evidenceRefs": [
"https://github.com/QuantumNous/new-api/blob/1a4166d8e8ba9802d2ca56fe8ecf0ed5404e80d5/pkg/billingexpr/expr.md",
"https://github.com/QuantumNous/new-api/blob/1a4166d8e8ba9802d2ca56fe8ecf0ed5404e80d5/pkg/billingexpr/settle.go",
"https://github.com/QuantumNous/new-api/blob/1a4166d8e8ba9802d2ca56fe8ecf0ed5404e80d5/pkg/billingexpr/run.go",
"https://github.com/QuantumNous/new-api/blob/1a4166d8e8ba9802d2ca56fe8ecf0ed5404e80d5/pkg/billingexpr/fixed.go"
],
"expressionVersion": "v1",
"groupRatio": "1.2",
"groupRatioApplied": false,
"humanExtractionReview": "NOT_PERFORMED",
"kind": "CONDITIONAL_EXPRESSION",
"limitations": [
"DECLARED_USD_COEFFICIENTS_NOT_RECHARGE_CASH_PROOF",
"PROVIDER_DEPLOYMENT_SEMANTICS_UNVERIFIED",
"TOKEN_USAGE_NORMALIZATION_REQUIRES_UPSTREAM_USAGE_SHAPE",
"GROUP_RATIO_NOT_APPLIED",
"TOOL_SURCHARGES_AND_EXTERNAL_REQUEST_MULTIPLIERS_NOT_ESTABLISHED",
"OTHER_PRICING_FIELDS_REQUIRE_SEPARATE_REVIEW",
"CONDITIONS_RETAINED_NOT_EVALUATED_WITH_REQUEST_OR_PROVIDER_CLOCK"
],
"normalization": {
"contextLength": "len is full input context, before subclass exclusion",
"inputBase": "p excludes separately referenced input subclasses; omitted subclasses follow its base rate",
"outputBase": "c excludes separately referenced output subclasses; omitted subclasses follow its base rate",
"profile": "NEW_API_BILLINGEXPR_V1",
"referencedVariablesAreExpressionWide": true,
"upstreamUsageConvention": "Normalization depends on OpenAI or Claude usage shape; img_cr requires valid modality details"
},
"parserVersion": "grandet.new-api-expression-projection/1.1.0",
"ruleContentSha256": "69fa2e1b44440875f8f829b683bb81eba1d39b683c4caa057b993f63a3779f7c",
"schema": "grandet.public-pricing-rule/v1",
"sourceExpressionSha256": "e633f07d6bc0cabf0200a73b65bb36f4f30741d0594124503ea6b6cbbbe87283",
"status": "SUPPORTED_PUBLIC_DECLARATION",
"units": [
"DECLARED_USD_PER_MILLION_TOKENS"
]
},
"publicOfferingStatus": "DECLARED_IN_PUBLIC_GROUP",
"quoteId": "22bb2899766a54fb0dfee900fc096d03a0beb19fc43aafc10ad40e1c0cd98b50",
"quoteOrdinal": 50,
"semanticFlags": [],
"snapshotId": "b606c9c50d4e36bfdfb824888e3abad5f29f96244c532c549f6c12554da0ab33",
"sourceDomain": "api.openai-labs.com",
"sourceId": "api.openai-labs.com",
"sourceRowId": "36bd883956e1d6e5ecc66b9309fca07eb568f23e045a1cdd3238a57362f68c47",
"transactionId": "cb43cccfc82648df5a06be6a041e8e4ce2c315269a208a56c069f2ac9a01f090",
"unit": "STRUCTURED_DECLARED_PRICING_RULE"
}