Automation & AI Platforms

Building AI automations with the OpenAI API

The short answer

The OpenAI API gives programmatic access to OpenAI's GPT models through the Responses API, with function calling, structured outputs, hosted tools such as web search and file search, the Realtime API for speech-to-speech voice agents, embeddings, and a discounted Batch API. API data is not used for training by default. It is a strong default for voice agents, document extraction and general-purpose automation steps, and the Agents SDK adds handoffs, guardrails and tracing for multi-step agents.

What you can automate with OpenAI API

Voice agent for phone support

Answer calls with a speech-to-speech agent that looks up orders, books appointments and hands off to a person when needed.

Read the build guide
Document data extraction

Read invoices, forms and PDFs and return fields that match a strict JSON schema, with validation in code.

Read the build guide
Customer support agent

Answer customer questions from your help center and order data, with tools for lookups and a clear escalation path.

Read the build guide
RAG knowledge assistant

Embed internal documents and answer staff questions with citations, using hosted file search or your own vector store.

Read the build guide
Ticket triage and routing

Classify incoming tickets by topic, urgency and sentiment and route them to the right queue.

Read the build guide
Meeting summaries and action items

Transcribe recordings and turn them into a summary, decisions and owners sent to attendees.

Read the build guide

What the OpenAI API is good for

The OpenAI API is a general-purpose model service with a broad set of building blocks. The Responses API is the main entry point: one call can include instructions, conversation state, your function tools and hosted tools such as web search, file search over hosted vector stores, a code interpreter and remote MCP servers. Structured outputs make the model return JSON that matches a schema you supply, which is the single most useful feature for automation.

Around that core, the API offers:

  • Realtime voice. The Realtime API handles speech-to-speech conversations with low latency, which is why many phone agents start here.
  • Batch processing. Large jobs, such as classifying a year of tickets or describing a full product catalog, run asynchronously at a discount.
  • Embeddings. Text embeddings for search, deduplication and retrieval.
  • The Agents SDK. A lightweight Python and TypeScript library for agents with handoffs, guardrails and tracing.

OpenAI’s GPT models range from small, fast models for high-volume classification to large reasoning models for harder problems. Pick the smallest model that passes your test set.

How Lumeor uses it

In automations, we call the OpenAI API from n8n or a small service with a strict output schema, validate the result in code and log every call. For voice agents, phone calls arrive through Twilio and a model handles the conversation with tools for lookups and bookings, the same Twilio-plus-LLM pattern behind our AI calling platform. Our n8n automations suite used OpenAI’s GPT models for messaging and intelligence workflows on Telegram and WhatsApp.

We keep model calls behind one wrapper per project, so switching a step to the Claude API or a different OpenAI model is a configuration change, not a rewrite.

Limits to plan around

  • Rate limits by tier. Limits on requests and tokens per minute depend on the model and your usage tier. New accounts start low, so plan load tests and request increases before launch.
  • Model churn. Models are updated and retired on a schedule. Pin model versions in production and re-run your tests before switching.
  • Retired APIs. The Assistants API is gone, and reusable prompts shut down on November 30, 2026. Keep prompts in your own code and build on the Responses API.
  • Hosted tool lock-in. Hosted file search and vector stores are convenient but tie your retrieval to OpenAI. Use your own vector store if you may switch providers.
  • Output still needs checks. Structured outputs guarantee shape, not truth. Validate amounts, IDs and dates against your systems.
  • Data handling. API data is not used for training by default, but regulated data still needs a review of retention settings and agreements with OpenAI.

When to pick something else

  • Claude API for long documents, careful writing and long-running agents. See OpenAI API vs Claude API for agents.
  • Cloud-hosted access when your company requires everything inside its own cloud account. OpenAI’s GPT models are offered through Azure and, as of 2026, Amazon Bedrock, though feature availability can differ from OpenAI’s own API.
  • Open-source models when data cannot leave your infrastructure at all, accepting more hosting work.

Frequently asked questions

Is the OpenAI API the same as ChatGPT?

No. ChatGPT is a subscription app for people. The API is a developer service billed per token that you call from your own software or from tools like n8n. Business data sent to the API is not used to train models by default.

What happened to the Assistants API?

OpenAI deprecated the Assistants API in 2025 and shut it down on August 26, 2026. The replacement is the Responses API with the Conversations API, where threads map to conversations and runs to responses. Assistants were mapped to reusable prompts, but OpenAI has since deprecated those too, with a November 30, 2026 shutdown, and now suggests keeping prompt content in your own code. Any integration still on the Assistants API has stopped working and needs rebuilding.

Should we use the OpenAI API or the Claude API?

Both are solid choices. We often reach for OpenAI for real-time voice and hosted file search, and for Claude on long documents, careful writing and long-running agent work. Many systems use both and pick a model per task, which is easy when your workflow wraps the call in one place.

How do we keep OpenAI API costs predictable?

Set project-level spend limits, choose smaller models for classification and extraction, use the Batch API for work that can wait, and keep prompts stable so cached input is reused. Log tokens per workflow run so you know which step drives cost.

Next steps