OpenAI.Responses.Pricing (OpenAI.Responses v0.5.0)

View Source

Pricing information for OpenAI models.

Prices are in USD per million tokens, stored as Decimal values for precision. Source: https://platform.openai.com/docs/pricing, last updated on 2025-06-03.

Summary

Functions

Get pricing information for a specific model.

List all available models with pricing.

Functions

get_pricing(model)

Get pricing information for a specific model.

Returns a map with :input, :cached_input, and :output prices per million tokens as Decimal values, or nil if the model is not found.

list_models()

List all available models with pricing.