> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mavera.io/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenAI

> 5 production-ready jobs — Whisper transcription to meeting analysis, GPT vision video pre-processing, TTS audio content library, embeddings knowledge base gap filling, and Sora video generation with quality assessment loops

OpenAI's model suite — GPT-5, GPT-4.1, o3/o4-mini for reasoning, Whisper for speech-to-text, TTS for text-to-speech, DALL-E and Sora for visual generation, and embedding models for vector search — pairs with Mavera to create multi-modal content pipelines. These five jobs chain OpenAI endpoints with Mavera surfaces to transcribe meetings into structured action plans, pre-process video with vision models, convert generated copy into audio libraries, find and fill content gaps via embeddings, and run video generation-analysis feedback loops.

***

## API Reference Card

| Detail          | Value                                                                                                                                    |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| **Base URL**    | `https://api.openai.com/v1`                                                                                                              |
| **Auth**        | Bearer Token — `Authorization: Bearer sk-...`                                                                                            |
| **Key models**  | GPT-5, GPT-4.1, o3/o4-mini, Whisper, TTS, DALL-E 3, text-embedding-3-large, Sora                                                         |
| **Rate limits** | Vary by model tier — TPM and RPM limits per organization (see [OpenAI rate limits](https://platform.openai.com/docs/guides/rate-limits)) |
| **Mavera base** | `https://app.mavera.io/api/v1`                                                                                                           |
| **Mavera auth** | `Authorization: Bearer mvra_live_...`                                                                                                    |

<Info>
  All examples use two environment variables: `OPENAI_API_KEY` (your OpenAI platform key starting with `sk-`) and `MAVERA_API_KEY` (your Mavera key starting with `mvra_live_`). Never commit either key to version control. Use a `.env` file or your platform's secret manager.
</Info>

***

## Prerequisites

<Steps>
  <Step title="OpenAI API key">Sign up at [platform.openai.com](https://platform.openai.com). Navigate to API keys and create a new secret key. Ensure your organization has billing enabled and sufficient credits.</Step>
  <Step title="Mavera API key">Get your key from [Mavera dashboard](https://app.mavera.io/settings/api-keys).</Step>

  <Step title="Install SDKs">
    ```bash theme={"dark"}
    # Python
    pip install openai requests

    # JavaScript
    npm install openai
    ```
  </Step>

  <Step title="Set environment variables">
    ```bash theme={"dark"}
    export OPENAI_API_KEY="sk-your-openai-key"
    export MAVERA_API_KEY="mvra_live_xxxxx"
    ```
  </Step>
</Steps>

***

## Jobs

| # | Job                                                                                           | OpenAI Endpoint                 | Mavera Surface    | Output                               |
| - | --------------------------------------------------------------------------------------------- | ------------------------------- | ----------------- | ------------------------------------ |
| 1 | [Whisper Transcription → Meetings Pipeline](/integrations/openai/whisper-meetings-pipeline)   | POST /audio/transcriptions      | Mave Agent (Chat) | Structured meeting analysis          |
| 2 | [GPT Vision → Video Analysis Pre-Processing](/integrations/openai/vision-video-preprocessing) | Responses (vision)              | Mave Agent (Chat) | Marketing analysis of visual content |
| 3 | [TTS → Audio Content Library](/integrations/openai/tts-audio-content)                         | POST /audio/speech              | Generate          | Audio files from generated content   |
| 4 | [Embeddings → Knowledge Base Gap Filling](/integrations/openai/embeddings-knowledge-base)     | POST /embeddings                | Generate          | Gap-filling content                  |
| 5 | [Sora Video Generation → Analysis Loop](/integrations/openai/sora-analysis-loop)              | POST /images/generations (Sora) | Mave Agent (Chat) | Iterated video with quality scores   |

***

## Rate Limits & Production Notes

| OpenAI Endpoint                   | Rate Limit                      | Strategy                                           |
| --------------------------------- | ------------------------------- | -------------------------------------------------- |
| `/audio/transcriptions` (Whisper) | 50 RPM                          | Queue audio files; 2s delay between calls          |
| Responses (GPT-4.1 vision)        | 500–10,000 RPM (tier-dependent) | Batch frames; use `detail: "low"` to reduce tokens |
| `/audio/speech` (TTS)             | 50 RPM                          | Sequential with 1s delay                           |
| `/embeddings`                     | 3,000 RPM / 1M TPM              | Batch up to 2,048 inputs per request               |
| `/images/generations` (Sora)      | Tier-dependent                  | Single request with retry; expect 30-120s          |

<Tip>
  Use OpenAI's [usage dashboard](https://platform.openai.com/usage) to monitor token and credit consumption in real time. Set monthly spend limits under Organization → Billing → Usage limits to prevent unexpected charges.
</Tip>

<Warning>
  Rate limits vary by organization tier. New accounts start with lower limits that increase with usage history. For 429 errors, use exponential backoff: wait 1s, 2s, 4s, 8s between retries, capped at 60s. Whisper files over 25 MB must be split. TTS inputs over 4,096 characters must be chunked at sentence boundaries. Monitor Mavera credits at [Dashboard](https://app.mavera.io/settings/usage).
</Warning>

***

<CardGroup cols={3}>
  <Card title="All Integrations" icon="plug" href="/integrations" />

  <Card title="OpenAI API Docs" icon="microchip-ai" href="https://platform.openai.com/docs" />

  <Card title="Mave Agent" icon="brain" href="/features/mave-agent" />

  <Card title="Generate" icon="pen" href="/features/generate" />

  <Card title="Brand Voice" icon="microphone" href="/features/brand-voice" />

  <Card title="Focus Groups" icon="users" href="/features/focus-groups" />
</CardGroup>
