Airflow Summit 2026 is coming August 31 - September 2 in Austin, TX. Register now to secure your spot!

apache-airflow-providers-openai

The openai provider gives Dags direct access to OpenAI’s own APIs — this page compares that choice against common.ai.

When to use this provider

Use openai when a Dag needs OpenAI’s native API surface — thin wrappers over OpenAI-specific endpoints and options, built on OpenAIHook, the underlying client the operators below share:

  • OpenAIEmbeddingOperator — call the Embeddings API directly, e.g. to feed a vector store.

  • OpenAIResponseOperator — call the Responses API with OpenAI-specific parameters.

  • OpenAITriggerBatchOperator — submit a Batch API job for asynchronous bulk processing and wait for it to complete; OpenAI prices Batch API calls at roughly half the cost of the equivalent synchronous call, in exchange for a turnaround of up to ~24 hours.

Use apache-airflow-providers-common-ai instead when the AI step should be run by Airflow itself and stay vendor-neutral:

  • Generation, classification, or structured extraction with LLMOperator — it works with OpenAI models via a connection, and switching to another model provider later is a connection change, not a Dag rewrite.

  • Agents whose loop runs in the Airflow worker with AgentOperator — Airflow-defined toolsets (SQL, hooks, MCP servers), human-in-the-loop review, and durable step replay.

  • Document-to-vector-store pipelines with its document loader, embedding, and retrieval operators, which are not tied to OpenAI’s embedding models.

In short: pick openai to reach an OpenAI-only endpoint; pick common.ai to keep the Dag portable across model providers.

For example, calling the Responses API directly:

tests/system/openai/example_openai.py[source]

    OpenAIResponseOperator(
        task_id="openai_response",
        conn_id="openai_default",
        input_text="Write a haiku about data pipelines.",
        response_kwargs={"instructions": "You are a helpful assistant."},
    )

apache-airflow-providers-openai package

OpenAI provider for Apache Airflow. Enables interaction with OpenAI APIs for text generation, embeddings, and other AI-powered workflows directly from Airflow Dags.

Release: 1.8.0

Provider package

This package is for the openai provider. All classes for this package are included in the airflow.providers.openai python package.

Installation

You can install this package on top of an existing Airflow installation via pip install apache-airflow-providers-openai. For the minimum Airflow version supported, see Requirements below.

Requirements

The minimum Apache Airflow version supported by this provider distribution is 2.11.0.

PIP package

Version required

apache-airflow

>=2.11.0

apache-airflow-providers-common-compat

>=1.12.0

openai

>=2.37.0

Downloading official packages

You can download officially released packages and verify their checksums and signatures from the Official Apache Download site

Was this entry helpful?