Pricing - Go SDK
Pricing - Go SDK
Pricing type definition
The Go SDK and docs are currently in beta. Report issues on GitHub.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
Audio | *string | ➖ | Price in USD per audio input token |
AudioOutput | *string | ➖ | Price in USD per audio output token |
Completion | string | ✔️ | Price in USD per token for completion (output) generation |
Discount | *float64 | ➖ | Fractional discount applied to this endpoint’s pricing; the price is multiplied by (1 - discount) (0 = no discount, 1 = free) |
Image | *string | ➖ | Price in USD per input image |
ImageOutput | *string | ➖ | Price in USD per output image |
ImageToken | *string | ➖ | Price in USD per image token |
InputAudioCache | *string | ➖ | Price in USD per cached audio input token |
InputCacheRead | *string | ➖ | Price in USD per cached input token (read) |
InputCacheWrite | *string | ➖ | Price per cache-write token, in USD per token. For providers with multiple cache TTLs (e.g. Anthropic), this is the default (5-minute) cache-write rate. |
InputCacheWrite1h | *string | ➖ | Price per 1-hour cache-write token, in USD per token. Only present for providers that price an extended (1-hour) cache TTL separately, such as Anthropic. |
InternalReasoning | *string | ➖ | Price in USD per internal reasoning token |
Prompt | string | ✔️ | Price in USD per token for prompt (input) processing |
Request | *string | ➖ | Price in USD per request |
WebSearch | *string | ➖ | Price in USD per web search |