OpenAI
Admin API OpenAI отдаёт два вида отчётности на уровне всей организации: отчёты об использовании, по одному на каждую возможность API, и ежедневный отчёт о затратах с суммами в долларах США. Отчёты об использовании покрывают completions, embeddings, images, audio, moderations, vector stores и code interpreter sessions.
Renta синхронизирует и те и другие в хранилище данных в виде статистики по временным бакетам с разбивкой по проектам, пользователям, API-ключам и моделям.
Аутентификация
Renta аутентифицируется организационным ключом Admin API key. Создайте его на platform.openai.com в разделе Organization settings > Admin keys: ключ начинается с sk-admin. Обычные проектные API-ключи не подойдут: отчётные эндпоинты Admin API их отклоняют.
При сохранени и подключения Renta проверяет ключ через Admin API OpenAI, поэтому недействительный или неадминистративный ключ вернёт ошибку сразу, а не на первом запуске пайплайна.
Подключение источника OpenAI
- Перейдите в раздел Connections > Catalog в левом меню.
- Откройте категорию AI и нажмите на карточку OpenAI.

Заполните форму подключения:
- Source name.
Укажите название источника данных. Оно используется только в интерфейсе Renta. - Admin API key.
Вставьте ваш Admin API key OpenAI (начинается сsk-admin).
Нажмите Save, чтобы завершить.

Новый источник появится в списке Sources со статусом Active. Теперь его можно использовать в пайплайнах.

Создание пайплайна OpenAI
После подключения источника создайте пайплайн, чтобы синхронизировать данные OpenAI с назначением.
В левом меню нажмите New pipeline. На шаге Source выберите OpenAI в списке Already connected и нажмите Next step.

Выберите созданное ранее подключение OpenAI и нажмите Next step.

На шаге Destination выберите ваше назначение (например, Google BigQuery) и нажмите Next step.

Выберите подключение назначения, в которое нужно загружать данные, и нажмите Next step.

Настройка пайплайна
На последнем шаге выберите, какой отчёт OpenAI выгружать и как Renta будет его загружать.
Тип отчёта и гранулярность
Выберите отчёт и размер его временных бакетов.

-
Report Types Выберите один из девяти отчётов. Каждый пайплайн выгружает один отчёт в одну таблицу назначения.
Тип отчёта Данные Completions Usage Количество входных и выходных токенов completions, включая разбивку на кэшированные, текстовые, аудио- и графические токены, а также количество запросов. Embeddings Usage Количество входных токенов и запросов для эмбеддингов. Images Usage Количество сгенерированных изображений и запросов с разбивкой по размеру и источнику изображения. Audio Speeches Usage Символы, обработанные синтезом речи (text-to-speech), и количество запросов. Audio Transcriptions Usage Секунды распознанного аудио и количество запросов. Moderations Usage Количество входных токенов и запросов для модерации. Vector Stores Usage Объём хранилища векторных данных в байтах. Code Interpreter Sessions Usage Количество сессий code interpreter. Cost Report Ежедневные затраты в долларах США с разбивкой по проектам, пользователям, API-ключам и статьям расходов. -
Granularity Выберите размер временного бакета: Minute, Hour или Day. Каждая строка таблицы назначения соответствует одному бакету для одной комбинации значений измерений. Для
Cost Reportдоступен только вариант Day: эндпоинт затрат OpenAI поддерживает только дневные бакеты.
В сутках 1 440 минутных бакетов, поэтому гранулярность Minute на длинном диапазоне дат даёт большую таблицу и заметно более долгую первую загрузку. Для исторического анализа обычно достаточно Day.
Параметры
Выберите поля, которые попадут в таблицу назначения. Доступный набор зависит от типа отчёта: каждый отчёт сочетает колонки измерений, собственные метрики и поля временного бакета.

| Название | Имя в API | Описание |
|---|---|---|
Project ID text | project_id | Identifier of the project the usage is attributed to. Null when not grouped or not attributable. |
User ID text | user_id | Identifier of the organization user the usage is attributed to. Null when not attributable to a specific user. |
API Key ID text | api_key_id | Identifier of the API key that generated the usage. Null when not attributable to a specific key. |
Model text | model | OpenAI model that produced the usage. For example: gpt-4.1-2025-04-14. |
Batch bool | batch | True when the usage was generated via the Batch API, false otherwise. Null when not grouped by batch. |
Service Tier text | service_tier | Service tier of the requests. For example: default, flex, batch, priority. |
Input Tokens int | input_tokens | The aggregated number of input tokens used, including cached and cache-write tokens (text, audio and image). |
Input Cached Tokens int | input_cached_tokens | The aggregated number of input tokens read from the prompt cache. |
Input Uncached Tokens int | input_uncached_tokens | The aggregated number of input tokens that were not read from the cache. |
Input Cache Write Tokens int | input_cache_write_tokens | The aggregated number of input tokens written to the prompt cache. |
Input Text Tokens int | input_text_tokens | The aggregated number of text input tokens used. |
Input Cached Text Tokens int | input_cached_text_tokens | The aggregated number of text input tokens read from the prompt cache. |
Input Audio Tokens int | input_audio_tokens | The aggregated number of audio input tokens used. |
Input Cached Audio Tokens int | input_cached_audio_tokens | The aggregated number of audio input tokens read from the prompt cache. |
Input Image Tokens int | input_image_tokens | The aggregated number of image input tokens used. |
Input Cached Image Tokens int | input_cached_image_tokens | The aggregated number of image input tokens read from the prompt cache. |
Output Tokens int | output_tokens | The aggregated number of output tokens generated. |
Output Text Tokens int | output_text_tokens | The aggregated number of text output tokens generated. |
Output Audio Tokens int | output_audio_tokens | The aggregated number of audio output tokens generated. |
Output Image Tokens int | output_image_tokens | The aggregated number of image output tokens generated. |
Model Requests int | num_model_requests | The count of requests made to the model. |
Bucket Starting At datetime | bucket_starting_at | Start of the time bucket (UTC, RFC 3339). Bucket size depends on the selected granularity: 1 minute, 1 hour or 1 day. |
Bucket Ending At datetime | bucket_ending_at | End of the time bucket (UTC, RFC 3339, exclusive). |
Bucket Starting Date · Обязательный date | bucket_starting_date | Day-granularity partition key derived from bucket_starting_at. Required — destination tables partition by this column. |
| Название | Имя в API | Описание |
|---|---|---|
Project ID text | project_id | Identifier of the project the usage is attributed to. Null when not grouped or not attributable. |
User ID text | user_id | Identifier of the organization user the usage is attributed to. Null when not attributable to a specific user. |
API Key ID text | api_key_id | Identifier of the API key that generated the usage. Null when not attributable to a specific key. |
Model text | model | OpenAI model that produced the usage. For example: gpt-4.1-2025-04-14. |
Input Tokens int | input_tokens | The aggregated number of input tokens used. |
Model Requests int | num_model_requests | The count of requests made to the model. |
Bucket Starting At datetime | bucket_starting_at | Start of the time bucket (UTC, RFC 3339). Bucket size depends on the selected granularity: 1 minute, 1 hour or 1 day. |
Bucket Ending At datetime | bucket_ending_at | End of the time bucket (UTC, RFC 3339, exclusive). |
Bucket Starting Date · Обязательный date | bucket_starting_date | Day-granularity partition key derived from bucket_starting_at. Required — destination tables partition by this column. |
| Название | Имя в API | Описание |
|---|---|---|
Project ID text | project_id | Identifier of the project the usage is attributed to. Null when not grouped or not attributable. |
User ID text | user_id | Identifier of the organization user the usage is attributed to. Null when not attributable to a specific user. |
API Key ID text | api_key_id | Identifier of the API key that generated the usage. Null when not attributable to a specific key. |
Model text | model | OpenAI model that produced the usage. For example: gpt-4.1-2025-04-14. |
Size text | size | Image size of the grouped usage result. For example: 1024x1024. Null when not grouped by size. |
Source text | source | Source of the grouped usage result: image.generation, image.edit or image.variation. Null when not grouped by source. |
Images int | images | The number of images processed. |
Model Requests int | num_model_requests | The count of requests made to the model. |
Bucket Starting At datetime | bucket_starting_at | Start of the time bucket (UTC, RFC 3339). Bucket size depends on the selected granularity: 1 minute, 1 hour or 1 day. |
Bucket Ending At datetime | bucket_ending_at | End of the time bucket (UTC, RFC 3339, exclusive). |
Bucket Starting Date · Обязательный date | bucket_starting_date | Day-granularity partition key derived from bucket_starting_at. Required — destination tables partition by this column. |
| Название | Имя в API | Описание |
|---|---|---|
Project ID text | project_id | Identifier of the project the usage is attributed to. Null when not grouped or not attributable. |
User ID text | user_id | Identifier of the organization user the usage is attributed to. Null when not attributable to a specific user. |
API Key ID text | api_key_id | Identifier of the API key that generated the usage. Null when not attributable to a specific key. |
Model text | model | OpenAI model that produced the usage. For example: gpt-4.1-2025-04-14. |
Characters int | characters | The number of characters processed. |
Model Requests int | num_model_requests | The count of requests made to the model. |
Bucket Starting At datetime | bucket_starting_at | Start of the time bucket (UTC, RFC 3339). Bucket size depends on the selected granularity: 1 minute, 1 hour or 1 day. |
Bucket Ending At datetime | bucket_ending_at | End of the time bucket (UTC, RFC 3339, exclusive). |
Bucket Starting Date · Обязательный date | bucket_starting_date | Day-granularity partition key derived from bucket_starting_at. Required — destination tables partition by this column. |
| Название | Имя в API | Описание |
|---|---|---|
Project ID text | project_id | Identifier of the project the usage is attributed to. Null when not grouped or not attributable. |
User ID text | user_id | Identifier of the organization user the usage is attributed to. Null when not attributable to a specific user. |
API Key ID text | api_key_id | Identifier of the API key that generated the usage. Null when not attributable to a specific key. |
Model text | model | OpenAI model that produced the usage. For example: gpt-4.1-2025-04-14. |
Seconds int | seconds | The number of audio seconds processed. |
Model Requests int | num_model_requests | The count of requests made to the model. |
Bucket Starting At datetime | bucket_starting_at | Start of the time bucket (UTC, RFC 3339). Bucket size depends on the selected granularity: 1 minute, 1 hour or 1 day. |
Bucket Ending At datetime | bucket_ending_at | End of the time bucket (UTC, RFC 3339, exclusive). |
Bucket Starting Date · Обязательный date | bucket_starting_date | Day-granularity partition key derived from bucket_starting_at. Required — destination tables partition by this column. |
| Название | Имя в API | Описание |
|---|---|---|
Project ID text | project_id | Identifier of the project the usage is attributed to. Null when not grouped or not attributable. |
User ID text | user_id | Identifier of the organization user the usage is attributed to. Null when not attributable to a specific user. |
API Key ID text | api_key_id | Identifier of the API key that generated the usage. Null when not attributable to a specific key. |
Model text | model | OpenAI model that produced the usage. For example: gpt-4.1-2025-04-14. |
Input Tokens int | input_tokens | The aggregated number of input tokens used. |
Model Requests int | num_model_requests | The count of requests made to the model. |
Bucket Starting At datetime | bucket_starting_at | Start of the time bucket (UTC, RFC 3339). Bucket size depends on the selected granularity: 1 minute, 1 hour or 1 day. |
Bucket Ending At datetime | bucket_ending_at | End of the time bucket (UTC, RFC 3339, exclusive). |
Bucket Starting Date · Обязательный date | bucket_starting_date | Day-granularity partition key derived from bucket_starting_at. Required — destination tables partition by this column. |
| Название | Имя в API | Описание |
|---|---|---|
Project ID text | project_id | Identifier of the project the usage is attributed to. Null when not grouped or not attributable. |
Usage Bytes int | usage_bytes | The vector stores usage in bytes. |
Bucket Starting At datetime | bucket_starting_at | Start of the time bucket (UTC, RFC 3339). Bucket size depends on the selected granularity: 1 minute, 1 hour or 1 day. |
Bucket Ending At datetime | bucket_ending_at | End of the time bucket (UTC, RFC 3339, exclusive). |
Bucket Starting Date · Обязательный date | bucket_starting_date | Day-granularity partition key derived from bucket_starting_at. Required — destination tables partition by this column. |
| Название | Имя в API | Описание |
|---|---|---|
Project ID text | project_id | Identifier of the project the usage is attributed to. Null when not grouped or not attributable. |
API Key ID text | api_key_id | Identifier of the API key that generated the usage. Null when not attributable to a specific key. |
Sessions int | num_sessions | The number of code interpreter sessions. |
Bucket Starting At datetime | bucket_starting_at | Start of the time bucket (UTC, RFC 3339). Bucket size depends on the selected granularity: 1 minute, 1 hour or 1 day. |
Bucket Ending At datetime | bucket_ending_at | End of the time bucket (UTC, RFC 3339, exclusive). |
Bucket Starting Date · Обязательный date | bucket_starting_date | Day-granularity partition key derived from bucket_starting_at. Required — destination tables partition by this column. |
| Название | Имя в API | Описание |
|---|---|---|
Project ID text | project_id | Identifier of the project the cost is attributed to. Null when not attributable to a specific project. |
Project Name text | project_name | Human-readable name of the project. Null when project_id is null. |
Organization ID text | organization_id | Identifier of the OpenAI organization. |
Organization Name text | organization_name | Human-readable name of the OpenAI organization. |
User ID text | user_id | Identifier of the organization user the cost is attributed to. Null when not attributable to a specific user. |
User Email text | user_email | Email of the organization user the cost is attributed to. Null when user_id is null. |
API Key ID text | api_key_id | Identifier of the API key the cost is attributed to. Null when not attributable to a specific key. |
Line Item text | line_item | Human-readable description of the cost line item. For example: gpt-4.1-2025-04-14, input. |
Amount Value decimal | amount_value | Cost amount as a decimal value. Flattened from amount.value. |
Amount Currency text | amount_currency | Currency of the amount. Lowercase ISO code, always usd. Flattened from amount.currency. |
Quantity decimal | quantity | Number of priced units the line item covers (e.g. tokens). May be 0 for zero-cost lines. |
Bucket Starting At datetime | bucket_starting_at | Start of the daily time bucket (UTC, RFC 3339). |
Bucket Ending At datetime | bucket_ending_at | End of the daily time bucket (UTC, RFC 3339, exclusive). |
Bucket Starting Date · Обязательный date | bucket_starting_date | Day-granularity partition key derived from bucket_starting_at. Required — destination tables partition by this column. |
Выберите нужные поля или нажмите Select All. Колонки в таблице назначения называются API-именами из подписи под полем: Project ID превращается в project_id.
В каждом отчёте есть также три временных поля: Bucket Starting At и Bucket Ending At (границы бакета в UTC) и Bucket Starting Date, дата с точностью до дня, по которой партиционируется таблица назначения. Поле Bucket Starting Date отмечено заранее, убрать его нельзя.
Колонки измерений могут быть null: API OpenAI не указывает привязку, когда использование нельзя отнести к конкретному проекту, пользователю или API-ключу. Итоговые значения в таких строках корректны.
Имя таблицы и диапазон дат
Назовите пайплайн и задайте исторический период загрузки.

- Integration name.
Название пайплайна. Используется только в интерфейсе Renta. - Table name.
Имя таблицы назначения. Можно оставить сгенерированное имя или указат ь своё.

- Date start.
Первая дата периода выгрузки. - Date end.
Последняя дата периода выгрузки. Оставьте значение Today, чтобы продолжать собирать новые данные при каждом запуске.
Период перезаписи
Период перезаписи определяет, сколько последних дней Renta перезагружает при каждом запуске.

При каждом запуске Renta заново запрашивает отчёт начиная с даты последнего успешного запуска минус период перезаписи. Затронутые дни удаляются из таблицы назначения и вставляются заново, более старые данные не меняются. Значение по умолчанию: Last 1 day.
Расписание
Выберите, как часто запускается пайплайн.

| Тип расписания | Описание |
|---|---|
| Manual | Пайплайн запускается только вручную через интерфейс или по API. |
| Daily | Пайплайн запускается раз в день в указанное время обновления. |
| Interval | Пайплайн запускается через заданные интервалы времени. |
| Cron Expression | Пайплайн запускается по расписанию, заданному cron-выражением. |
Для расписания Daily укажите Update time (точное время запуска), затем нажмите Create pipeline.

Renta также поддерживает запуск по API и интеграцию с внешними оркестраторами: Apache Airflow, Dagster, Prefect. Подробности в документации по расписаниям.
Новый пайплайн появится в разделе Pipelines на вкладке ETL, где можно отслеживать запуски, прогресс и имя таблицы назначения.

Стратегия синхронизации
Все отчёты OpenAI представляют собой статистику по временным бакетам, поэтому у них одна стратегия синхронизации.
| Стратегия | Поддерживаемые типы отчётов | Описание |
|---|---|---|
| Инкрементальное обновление | Completions Usage, Embeddings Usage, Images Usage, Audio Speeches Usage, Audio Transcriptions Usage, Moderations Usage, Vector Stores Usage, Code Interpreter Sessions Usage, Cost Report | Каждая таблица назначения партиционируется по колонке bucket_starting_date. При каждом запуске Renta перезагружает окно от последнего успешного запуска минус период перезаписи до конца диапазона дат: эти дневные партиции удаляются и вставляются заново, более старые партиции не меняются. |
Изменение выбранных параметров обновляет схему таблицы, поэтому следующий запуск после изменения перезагружает весь диапазон дат.
Ready to get started?
Build your data pipeline today or get a personalized demo. Start free!
Need help?
Get expert support to ensure your project succeeds. We're here to help!
Feature requests?
Help shape our product! Share your ideas for new features and integrations.