OpenAI integration

AI: chat completions, embeddings, image generation, assistants, files, fine-tuning

Help CentreConnectors

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.

  1. Sign in to platform.openai.com → API keys → Create new secret key.
  2. Pick a project (recommended) and assign scopes.
  3. Copy the key (sk-proj-... or sk-...) – only shown once.
  4. 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 + threads

Available operations

8 operations available. Click any row to jump to its detail.

OperationCategoryWhat it does
Chat CompletionGeneralGenerate a chat completion
Create AssistantGeneralCreate an assistant
Create EmbeddingGeneralGenerate text embeddings
Generate ImageGeneralGenerate an image from a prompt (DALL-E)
List AssistantsGeneralList assistants
List FilesGeneralList uploaded files
List ModelsGeneralList available models
Upload FileGeneralUpload a file (for fine-tuning or assistants)

Operations

Chat Completion

Generate a chat completion

ParameterRequiredTypeDescription
Model modelYestext
Messages messagesYestextarea
Temperature temperatureYesnumber
Max Tokens max_tokensYesnumber
Tools toolsYestext

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

ParameterRequiredTypeDescription
Model modelYestext
Name nameYestext
Instructions instructionsYestext
Tools toolsYestext

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

ParameterRequiredTypeDescription
Model modelYestext
Input inputYestext

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)

ParameterRequiredTypeDescription
Model modelYestext
Prompt promptYestext
Size sizeYestext
N nYestext

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.

Related connectors

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.