Overview
OpenAI is the API platform behind ChatGPT – GPT-4o, GPT-4, GPT-3.5, DALL-E, Whisper, embeddings, Assistants API. The Automize OpenAI connector covers chat completions, embeddings, image generation, Assistants management, and file uploads.
- Regions: OpenAI's API is global – api.openai.com. For enterprise data residency, use Azure OpenAI (separate connector) instead.
- Plans: Pay-as-you-go per token. Tier 1-5 usage tiers unlock higher rate limits + model access automatically as monthly spend grows.
Setting up the connection
Auth type: Bearer Token.
- Sign in to platform.openai.com → API keys → Create new secret key.
- Pick a project (recommended) and assign scopes.
- Copy the key (sk-proj-... or sk-...) – only shown once.
- In Automize, open Settings → Connectors → OpenAI → Add connection. Paste the key. Optional: Organization ID (org-...) for multi-org accounts.
Find your credentials at https://platform.openai.com/api-keys.
Rate limits
Per-model rate limits + token-per-minute (TPM) caps that scale by usage tier. Connector retries 429 with the Retry-After header. For very high volume, use the Batch API (24h SLA, 50% discount) instead of real-time.
Data model
OpenAI primitives:
Models – gpt-4o, gpt-4o-mini, gpt-3.5-turbo, dall-e-3, etc.
Chat – Completions (request-response, streaming optional)
Embeddings – text-embedding-3-large, text-embedding-3-small
Images – DALL-E generation
Files – uploaded artefacts for fine-tuning / Assistants
Assistants – stateful agents with tools + threadsAvailable operations
8 operations available. Click any row to jump to its detail.
| Operation | Category | What it does |
|---|---|---|
| Chat Completion | General | Generate a chat completion |
| Create Assistant | General | Create an assistant |
| Create Embedding | General | Generate text embeddings |
| Generate Image | General | Generate an image from a prompt (DALL-E) |
| List Assistants | General | List assistants |
| List Files | General | List uploaded files |
| List Models | General | List available models |
| Upload File | General | Upload a file (for fine-tuning or assistants) |
Operations
Chat Completion
Generate a chat completion
| Parameter | Required | Type | Description |
|---|---|---|---|
Model model | Yes | text | |
Messages messages | Yes | textarea | |
Temperature temperature | Yes | number | |
Max Tokens max_tokens | Yes | number | |
Tools tools | Yes | text |
Tips
- model: 'gpt-4o' (flagship), 'gpt-4o-mini' (cheap), 'gpt-3.5-turbo' (legacy).
- messages: [{role: 'system'|'user'|'assistant'|'tool', content: ...}].
- tools: function-calling schemas; the model emits tool_calls that you handle + return as tool messages.
- temperature 0-2. response_format={type: 'json_object'} forces JSON output.
Errors
insufficient_quota– Account balance exhausted. Top up at platform.openai.com/account/billing.rate_limit_exceeded– Tier-based limit. Lower TPM, wait, or upgrade tier.
Create Assistant
Create an assistant
| Parameter | Required | Type | Description |
|---|---|---|---|
Model model | Yes | text | |
Name name | Yes | text | |
Instructions instructions | Yes | text | |
Tools tools | Yes | text |
Tips
- Assistants are stateful – they remember threads. Pass model + instructions + tools (code_interpreter, file_search, function).
- Returns assistant_id – reuse across multiple threads.
Create Embedding
Generate text embeddings
| Parameter | Required | Type | Description |
|---|---|---|---|
Model model | Yes | text | |
Input input | Yes | text |
Tips
- model: 'text-embedding-3-large' (3072d) or 'text-embedding-3-small' (1536d) – small is usually fine.
- input: string or array of strings. Batch up to ~2048 inputs per call.
- dimensions param truncates to a smaller vector size (saves storage).
Generate Image
Generate an image from a prompt (DALL-E)
| Parameter | Required | Type | Description |
|---|---|---|---|
Model model | Yes | text | |
Prompt prompt | Yes | text | |
Size size | Yes | text | |
N n | Yes | text |
Tips
- model: 'dall-e-3' or 'dall-e-2'. dall-e-3 better quality, n=1 only.
- size: '1024x1024', '1792x1024', '1024x1792' (dall-e-3). '256x256', '512x512', '1024x1024' (dall-e-2).
List Assistants
List assistants
No input parameters.
Tips
- Your assistants. Page via after cursor.
List Files
List uploaded files
No input parameters.
Tips
- All uploaded files. Filter by purpose.
List Models
List available models
No input parameters.
Tips
- Returns models available to your API key + their capabilities.
Upload File
Upload a file (for fine-tuning or assistants)
No input parameters.
Tips
- purpose: 'fine-tune', 'assistants', 'batch', 'vision', 'user_data'.
- Max 512 MB per file. Returns file_id used by Assistants / fine-tune.
FAQ
- OpenAI vs Azure OpenAI – when?
- Azure for enterprise (data residency, no training, region-pinned). OpenAI for fastest access to newest models + simpler signup. For prod-scale + compliance, prefer Azure.
- Streaming responses?
- Pass stream=true on Chat. Connector currently returns synchronous (full response). For streaming, use the OpenAI SDK directly via HTTP connector.
- Cost optimisation?
- Use gpt-4o-mini for most tasks (10× cheaper than gpt-4o, similar quality on many). Use embeddings + RAG to avoid loading full context every call. Batch API for non-real-time = 50% off.
- Function calling – how?
- Pass tools:[{type:'function', function:{name, parameters}}]. Model returns tool_calls in the response. Run them, then send role:'tool' messages with results back to get the final answer.