OpenAI Usage API
The Usage API from OpenAI — 9 operation(s) for usage.
Operations 11
Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay
Ask an LLM
“How much has my organization spent on the API since the start of the month?”
“Can I break my costs down by project or line item?”
Tell an agent
Show our API costs since {start_time}.
Break down costs from {start_time} to {end_time} grouped by {group_by}.
Ask an LLM
“How many characters of text-to-speech did we generate this month?”
“Which models are driving our speech generation usage?”
Tell an agent
Show text-to-speech usage since {start_time}.
Break down audio speech usage since {start_time} by {group_by}.
GET
/organization/usage/audio_transcriptions
Report speech-to-text transcription usage · Audio transcriptions
#
Ask an LLM
“How many seconds of audio have we transcribed recently?”
“Can I see transcription usage for just one API key?”
Tell an agent
Show audio transcription usage since {start_time}.
Show transcription usage for API keys {api_key_ids} since {start_time}.
GET
/organization/usage/code_interpreter_sessions
Report code interpreter session usage · Code interpreter sessions
#
Ask an LLM
“How many code interpreter sessions has our organization opened?”
“Which projects are using the most code interpreter sessions?”
Tell an agent
Show code interpreter session counts since {start_time}.
Count code interpreter sessions for projects {project_ids} since {start_time}.
Ask an LLM
“How many input and output tokens did we use on chat and completions this week?”
“Can I separate batch token usage from regular requests?”
Tell an agent
Show completions token usage since {start_time}.
Show completion tokens for models {models} since {start_time} in {bucket_width} buckets.
Ask an LLM
“How many tokens have we sent to embedding models lately?”
“Can I see embedding usage broken down per user?”
Tell an agent
Show embeddings usage since {start_time}.
Show embedding tokens for users {user_ids} since {start_time}.
Ask an LLM
“How many images did we generate or edit this month?”
“Can I filter image usage by image size or by whether it was a generation or an edit?”
Tell an agent
Show image usage since {start_time}.
Show {sizes} image usage from {sources} since {start_time}.
Ask an LLM
“How much have we used the moderation endpoint recently?”
“Which projects send the most content through moderation checks?”
Tell an agent
Show moderation usage since {start_time}.
Group moderation usage since {start_time} by {group_by}.
Ask an LLM
“How many bytes are we storing across our vector stores?”
“Can I track vector store storage per project over time?”
Tell an agent
Show vector store usage since {start_time}.
Show vector store storage for projects {project_ids} since {start_time}.
Documentation
Documentation
https://platform.openai.com/docs/assistants/overview
Documentation
https://platform.openai.com/docs/api-reference/assistants
Documentation
https://platform.openai.com/docs/guides/text-to-speech
Documentation
https://platform.openai.com/docs/api-reference/audio
Documentation
https://platform.openai.com/docs/guides/speech-to-text
Documentation
https://developers.openai.com/api/docs/guides/audio/
Documentation
https://developers.openai.com/api/docs/guides/voice-agents/
Documentation
https://platform.openai.com/docs/api-reference/chat
Documentation
https://platform.openai.com/docs/guides/embeddings
Documentation
https://platform.openai.com/docs/api-reference/embeddings
Documentation
https://platform.openai.com/docs/api-reference/files
Documentation
https://platform.openai.com/docs/guides/fine-tuning
Documentation
https://platform.openai.com/docs/api-reference/fine-tuning
Documentation
https://platform.openai.com/docs/guides/images
Documentation
https://platform.openai.com/docs/api-reference/images
Documentation
https://platform.openai.com/docs/guides/image-generation
Documentation
https://platform.openai.com/docs/guides/images-vision
Documentation
https://platform.openai.com/docs/models
Documentation
https://platform.openai.com/docs/api-reference/models
Documentation
https://platform.openai.com/docs/assistants/how-it-works/managing-threads-and-messages
Documentation
https://platform.openai.com/docs/api-reference/threads
Documentation
https://platform.openai.com/docs/api-reference/completions
Specifications
Schemas & Data
JSONSchema
https://artifacts.apis.io/openai/json-schema/openai-chat-completion-schema.json
JSONSchema
https://artifacts.apis.io/openai/json-schema/openai-embedding-schema.json