Prompt Buddy logoPrompt Buddy

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.

Import to Prompt Buddy

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

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/managing-costs-workflow-guide.mdA 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.jsonA 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.jsonA 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.jsonA 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.jsonA 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.jsonA 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

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. 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