openai · OpenAI Platform Docs
Managing costs
Explains the billing mechanics of the Realtime API and provides specific optimization strategies including caching, truncation, model selection, and conversation editing to manage token and duration-based costs.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Managing costs
Explains the billing mechanics of the Realtime API and provides specific optimization strategies including caching, truncation, model selection, and conversation editing to manage token and duration-based costs.
When To Use
Use when you need to implement cost-optimization strategies for Realtime API sessions such as managing conversation history length, selecting appropriate models, or calculating audio-to-token conversion rates.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/managing-costs-workflow-guide.md | A guide detailing billing structures for the Realtime API, including token usage across text, audio, and image modalities and cost optimization strategies. | Questions about a guide detailing billing structures for the Realtime API, including token usage across text, audio, and image modali... |
examples/managing-costs-openai-realtime-api-usage-response.json | A JSON object representing a realtime API response containing detailed token usage metrics for input and output. | Exact payloads, commands, or snippets shown in A JSON object representing a realtime API response containing detailed token usage metrics for input and output. |
examples/managing-costs-openai-realtime-api-usage-event.json | A JSON object representing a realtime API conversation item event containing audio transcription and token usage details. | Exact payloads, commands, or snippets shown in A JSON object representing a realtime API conversation item event containing audio transcription and token usage deta... |
examples/managing-costs-openai-realtime-api-session-update-cost-management.json | A JSON object demonstrating a session update configuration for managing token truncation and retention ratios in the OpenAI Realtime API. | Exact payloads, commands, or snippets shown in A JSON object demonstrating a session update configuration for managing token truncation and retention ratios in the... |
examples/managing-costs-openai-realtime-api-session-update-cost-management-2.json | A JSON object demonstrating a session update event to disable truncation for managing realtime API costs. | Exact payloads, commands, or snippets shown in A JSON object demonstrating a session update event to disable truncation for managing realtime API costs. |
examples/managing-costs-openai-realtime-api-conversation-item-delete.json | A JSON object demonstrating the structure for a conversation item deletion event within the OpenAI Realtime API. | Exact payloads, commands, or snippets shown in A JSON object demonstrating the structure for a conversation item deletion event within the OpenAI Realtime API. |
What This Skill Covers
- This document describes how Realtime API billing works and offers strategies for optimizing costs. Voice-agent sessions accrue input and output tokens across...
- Main sections:
Per-Response costs,Example,Input transcription costs,Caching,Truncation.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.openai.com/api/docs/guides/realtime-costs.md
