---
id: "openai-api"
type: "component"
kind: "ai-service"
provider: "default"
category: "compute"
docs: "https://developers.openai.com/api/docs/guides/your-data"
url: "https://localhost:3000/catalogue/components/openai-api"
---

# OpenAI API

Hosted OpenAI model endpoints for text, vision, audio and embeddings.

| | |
|---|---|
| Provider | [default](https://localhost:3000/catalogue?provider=default) |
| Kind | [AI service](https://localhost:3000/catalogue/kinds/ai-service) |
| Category | Compute |
| Official docs | [https://developers.openai.com/api/docs/guides/your-data](https://developers.openai.com/api/docs/guides/your-data) |

## Properties

| property | type | values | required | kind default | this component |
|---|---|---|---|---|---|
| `audio` | boolean | — | no | false | inherited |
| `auth` | enum | `api-key`, `oauth`, `iam`, `none` | no | — | **"api-key"** |
| `batchApi` | boolean | — | no | false | inherited |
| `contentFiltering` | boolean | — | no | — | **false** |
| `customerManagedKeys` | boolean | — | no | — | inherited |
| `dataResidency` (advanced) | enum | `us`, `eu`, `asia`, `global` | no | — | inherited |
| `dataRetentionDays` | integer | — | no | — | **30** |
| `keyStore` | boolean | — | no | false | inherited |
| `managed` | boolean | — | no | false | **true** |
| `modality` | enum | `text`, `vision`, `speech`, `multimodal`, `structured`, `image`, `video`, `audio`, `embedding`, `rerank` | no | — | **"multimodal"** |
| `moderation` | boolean | — | no | false | inherited |
| `publicEndpoint` | boolean | — | no | — | **true** |
| `quotaUnitsPerMinute` | integer | — | no | — | inherited |
| `rateLimitRpm` (advanced) | integer | — | no | — | inherited |
| `rateLimitTpm` (advanced) | integer | — | no | — | inherited |
| `realtime` | boolean | — | no | false | inherited |
| `trainingOptIn` | boolean | — | no | false | inherited |
| `usageTier` | enum | `free`, `tier-1`, `tier-2`, `tier-3`, `tier-4`, `tier-5` | no | "tier-1" | inherited |
| `viaGateway` | boolean | — | no | false | inherited |
| `zeroDataRetention` | boolean | — | no | false | inherited |

Bold values are the ones this component pins.

## Rules that apply · 2

### AI API key not managed `ai-api-key-unmanaged` (warning)

- Page: https://localhost:3000/catalogue/rules/ai-api-key-unmanaged.md
- Why: This AI vendor is reached with an API key, and nothing in the design holds or rotates that key. It ends up in environment files or code, every caller shares it, and a single leak runs up the vendor bill until someone notices. Put the key in a key-management component, or say it is held there with keyStore.
- Applies to: every node of kind ai-service
- Message: AI service '{{node.id}}' is called with an API key, the key is not held in a key-management component, and the design has none.

It fires when:

- all of these hold:
  - the node's `auth` is "api-key"
  - the node's `keyStore` is false
  - the node has at least one incoming edge from an app-server, worker or client
  - this does not hold:
    - the design contains a node of kind key-management

### Stateful node without zone redundancy `stateful-node-without-zone-redundancy` (error)

- Page: https://localhost:3000/catalogue/rules/stateful-node-without-zone-redundancy.md
- Why: A stateful compute node pinned to exactly one availability zone disappears with that zone, and its state goes with it. Nodes inside a cell are exempt, because there the cell is deliberately single-zone and redundancy comes from the other cells.
- Applies to: every node in category compute
- Message: Stateful node '{{node.id}}' lives in exactly one availability zone. A zone outage takes its state with it.

It fires when:

- all of these hold:
  - the node's `stateless` is false
  - the node sits inside exactly 1 availability-zone group
  - this does not hold:
    - the node sits inside at least one cell group

## Other products of the same kind · 125

- [Content Moderation](https://localhost:3000/catalogue/components/alibaba-content-moderation.md) `alibaba-content-moderation` — alibabacloud
- [Fraud Detection](https://localhost:3000/catalogue/components/alibaba-fraud-detection.md) `alibaba-fraud-detection` — alibabacloud
- [ID Verification](https://localhost:3000/catalogue/components/alibaba-id-verification.md) `alibaba-id-verification` — alibabacloud
- [Intelligent Robot](https://localhost:3000/catalogue/components/alibaba-intelligent-robot.md) `alibaba-intelligent-robot` — alibabacloud
- [Model Studio](https://localhost:3000/catalogue/components/alibaba-model-studio.md) `alibaba-model-studio` — alibabacloud
- [Smart Conversation Analysis](https://localhost:3000/catalogue/components/alibaba-smart-conversation-analysis.md) `alibaba-smart-conversation-analysis` — alibabacloud
- [Amazon Bedrock](https://localhost:3000/catalogue/components/aws-bedrock.md) `aws-bedrock` — aws
- [Amazon Bedrock AgentCore](https://localhost:3000/catalogue/components/aws-bedrock-agentcore.md) `aws-bedrock-agentcore` — aws
- [Amazon Bedrock Data Automation](https://localhost:3000/catalogue/components/aws-bedrock-data-automation.md) `aws-bedrock-data-automation` — aws
- [Amazon Bedrock Guardrails](https://localhost:3000/catalogue/components/aws-bedrock-guardrails.md) `aws-bedrock-guardrails` — aws
- [Amazon Comprehend](https://localhost:3000/catalogue/components/aws-comprehend.md) `aws-comprehend` — aws
- [Amazon Comprehend Medical](https://localhost:3000/catalogue/components/aws-comprehend-medical.md) `aws-comprehend-medical` — aws
- [AWS Elemental Inference](https://localhost:3000/catalogue/components/aws-elemental-inference.md) `aws-elemental-inference` — aws
- [Amazon Forecast](https://localhost:3000/catalogue/components/aws-forecast.md) `aws-forecast` — aws
- [Amazon Fraud Detector](https://localhost:3000/catalogue/components/aws-fraud-detector.md) `aws-fraud-detector` — aws
- [AWS HealthScribe](https://localhost:3000/catalogue/components/aws-healthscribe.md) `aws-healthscribe` — aws
- [Amazon Lex bot](https://localhost:3000/catalogue/components/aws-lex.md) `aws-lex` — aws
- [Amazon Lookout for Equipment](https://localhost:3000/catalogue/components/aws-lookout-for-equipment.md) `aws-lookout-for-equipment` — aws
- [Amazon Lookout for Metrics](https://localhost:3000/catalogue/components/aws-lookout-for-metrics.md) `aws-lookout-for-metrics` — aws
- [Amazon Lookout for Vision](https://localhost:3000/catalogue/components/aws-lookout-for-vision.md) `aws-lookout-for-vision` — aws
- [Amazon Personalize](https://localhost:3000/catalogue/components/aws-personalize.md) `aws-personalize` — aws
- [Amazon Polly](https://localhost:3000/catalogue/components/aws-polly.md) `aws-polly` — aws
- [Amazon Q Business](https://localhost:3000/catalogue/components/aws-q-business.md) `aws-q-business` — aws
- [Amazon Rekognition](https://localhost:3000/catalogue/components/aws-rekognition.md) `aws-rekognition` — aws
- [Amazon Textract](https://localhost:3000/catalogue/components/aws-textract.md) `aws-textract` — aws
- [Amazon Transcribe](https://localhost:3000/catalogue/components/aws-transcribe.md) `aws-transcribe` — aws
- [Amazon Translate](https://localhost:3000/catalogue/components/aws-translate.md) `aws-translate` — aws
- [Content Safety](https://localhost:3000/catalogue/components/azure-ai-content-safety.md) `azure-ai-content-safety` — azure
- [Azure AI Custom Vision](https://localhost:3000/catalogue/components/azure-ai-custom-vision.md) `azure-ai-custom-vision` — azure
- [Azure AI Face](https://localhost:3000/catalogue/components/azure-ai-face.md) `azure-ai-face` — azure
- [Azure Language](https://localhost:3000/catalogue/components/azure-ai-language.md) `azure-ai-language` — azure
- [Azure Speech](https://localhost:3000/catalogue/components/azure-ai-speech.md) `azure-ai-speech` — azure
- [Azure Translator](https://localhost:3000/catalogue/components/azure-ai-translator.md) `azure-ai-translator` — azure
- [Azure Vision](https://localhost:3000/catalogue/components/azure-ai-vision.md) `azure-ai-vision` — azure
- [Azure Content Understanding](https://localhost:3000/catalogue/components/azure-content-understanding.md) `azure-content-understanding` — azure
- [Microsoft Discovery](https://localhost:3000/catalogue/components/azure-discovery.md) `azure-discovery` — azure
- [Azure Document Intelligence](https://localhost:3000/catalogue/components/azure-document-intelligence.md) `azure-document-intelligence` — azure
- [Foundry Agent Service](https://localhost:3000/catalogue/components/azure-foundry-agent-service.md) `azure-foundry-agent-service` — azure
- [Foundry Models](https://localhost:3000/catalogue/components/azure-foundry-models.md) `azure-foundry-models` — azure
- [Azure AI Immersive Reader](https://localhost:3000/catalogue/components/azure-immersive-reader.md) `azure-immersive-reader` — azure
- and 85 more: https://localhost:3000/catalogue/kinds/ai-service.md

## Use it in a design

```yaml
nodes:
  - { id: "openai-api", component: "openai-api" }
```

## Source (`component` YAML, verbatim)

```yaml
# yaml-language-server: $schema=../../schema/component.schema.json
# OpenAI API: hosted multimodal model endpoints (text, image, audio, embeddings) over a public HTTPS endpoint.
# Per "Data controls in the OpenAI platform", API inputs and outputs are retained 30 days for abuse monitoring
# and are not used to train models unless the organization opts in; Zero Data Retention needs prior approval.
# Per "Rate limits", limits are per model in RPM/TPM and a new paying organization starts on Tier 1.
# realtime (Realtime API over WebRTC or WebSocket), audio (speech to text and text to speech, Whisper) and
# moderation (the separate moderation endpoint) are each a call the app has to make, so all start off.
schemaVersion: "1"
type: "component"
id: "openai-api"
kind: "ai-service"
provider: "default"
docs: "https://developers.openai.com/api/docs/guides/your-data"
defaults:
  auth: "api-key"
  managed: true
  modality: "multimodal"
  publicEndpoint: true
  dataRetentionDays: 30
  contentFiltering: false
properties:
  usageTier:
    type: "enum"
    values: ["free", "tier-1", "tier-2", "tier-3", "tier-4", "tier-5"]
    default: "tier-1"
  zeroDataRetention:
    type: "boolean"
    default: false
  trainingOptIn:
    type: "boolean"
    default: false
  batchApi:
    type: "boolean"
    default: false
  realtime:
    type: "boolean"
    default: false
  audio:
    type: "boolean"
    default: false
  moderation:
    type: "boolean"
    default: false
```

Human page: https://localhost:3000/catalogue/components/openai-api
