cost_usd client-side using a built-in pricing table. This page lists all models currently in that table. If you use a model not listed here, cost_usd will be 0 — see Unsupported models for how to handle this.
Pricing in this table reflects public list prices as of the documentation date. Provider prices change regularly. Zespan updates the SDK pricing table with each release. To get the latest rates, update to the newest SDK version.
OpenAI
Anthropic
Google Gemini
Text generation
Image generation (span_kind: image_gen)
Image models return image bytes rather than text tokens. Cost is per image generated and is recorded as input_tokens = image_count with output_tokens = 0.
Text-to-speech
Video generation — Veo (span_kind: video_gen)
Veo models use per-second output pricing. Zespan records cost_usd: 0 and tracks latency of the initiation call. Compute the actual cost from your Google Cloud billing.
Embeddings (span_kind: embedding)
AWS Bedrock
Mistral
Groq (hosted models)
Unsupported models
If your model is not in the table, the SDK setscost_usd: 0 and logs a warning at debug level. Your traces will still appear in the dashboard — only the cost column will be blank.
To add cost tracking for an unsupported model, you have two options:
Option 1 — Compute and pass cost manually:
Cached token pricing
Cached tokens are billed at a reduced rate when the model provider serves them from its prompt cache. Zespan extracts cached token counts automatically:- OpenAI:
response.usage.prompt_tokens_details.cached_tokens - Anthropic:
response.usage.cache_read_input_tokens - Google:
response.usageMetadata.cachedContentTokenCount

