Repository navigation
Get‑ShpCostEstimate
Estimates the input cost of a prompt before sending it.
Get-ShpCostEstimate [-Text] <String> [[-Model] <String>]
[<CommonParameters>]
Combines the approximate token count from ConvertTo-ShpTokenCount with the module price table to estimate what the input side of a call will cost, in USD and Copilot premium-request credits, before the call is made. Only the input (prompt) side is estimated; the completion size is unknown until the model replies, so the real cost reported by Invoke-Shp will be higher. The price-table key is resolved case-insensitively; when the model has no entry the token count is still returned with null cost, Priced is false, and PriceTableKey names the key that was looked up and missed - so an unpriced model is never mistaken for a free one.
Get-ShpCostEstimate -Text 'Explain quantum tunnelling.' -Model claude-opus-4.8
Estimates the input tokens and USD/credit cost for the prompt.
The model id whose input rate is used. Defaults to the session default model (Select-ShpModel) or the built-in fallback when none is set.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe prompt text to estimate. Mandatory.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
- Clear-ShpChat
- Clear-ShpContext
- Clear-ShpRedactionPolicy
- Clear-ShpToolPolicy
- Clear-ShpUsage
- Compress-ShpChat
- ConvertTo-ShpAnnotation
- ConvertTo-ShpOtelTrace
- ConvertTo-ShpTokenCount
- Get-ShpChat
- Get-ShpChatCheckpoint
- Get-ShpContext
- Get-ShpContextReport
- Get-ShpCosineSimilarity
- Get-ShpCostEstimate
- Get-ShpDefault
- Get-ShpMcpServer
- Get-ShpModel
- Get-ShpModelName
- Get-ShpRedactionPolicy
- Get-ShpTool
- Get-ShpToolPolicy
- Get-ShpUsage
- Initialize-Shp
- Invoke-Shp
- Invoke-ShpBatch
- Invoke-ShpEval
- Invoke-ShpSubagent
- Register-ShpMcpServer
- Register-ShpTool
- Request-ShpEmbedding
- Resolve-ShpError
- Restore-ShpChat
- Save-ShpChat
- Select-ShpModel
- Set-ShpContext
- Set-ShpRedactionPolicy
- Set-ShpToolPolicy
- Start-ShpChat
- Test-ShpCiReadiness
- Unregister-ShpMcpServer
- Unregister-ShpTool