> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/ably/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenAI integration

Integrate Ably AI Transport with OpenAI's API to build reliable, resumable AI experiences.

## Overview

OpenAI provides powerful language models through their Chat Completions API. By combining OpenAI with Ably AI Transport, you can:

* Stream GPT responses reliably to users across devices
* Enable users to resume conversations after disconnections
* Support multi-user collaborative AI sessions
* Implement human-in-the-loop workflows for sensitive operations

## Getting started guides

Explore the following guides to integrate OpenAI with AI Transport:

<Tiles>
  {[
    {
      title: 'Message-per-response',
      description: 'Stream OpenAI responses using message appends',
      image: 'icon-tech-javascript',
      link: '/docs/guides/ai-transport/openai/openai-message-per-response',
    },
    {
      title: 'Message-per-token',
      description: 'Stream OpenAI responses using individual token messages',
      image: 'icon-tech-javascript',
      link: '/docs/guides/ai-transport/openai/openai-message-per-token',
    },
    {
      title: 'Human-in-the-loop',
      description: 'Implement human-in-the-loop approval workflows with OpenAI',
      image: 'icon-tech-javascript',
      link: '/docs/guides/ai-transport/openai/openai-human-in-the-loop',
    },
    ]}
</Tiles>

## Key features

### Streaming responses

Stream OpenAI's responses in realtime using either the [message-per-response](/docs/ai-transport/token-streaming/message-per-response) or [message-per-token](/docs/ai-transport/token-streaming/message-per-token) pattern.

### Function calling

OpenAI supports function calling for tool use. Stream function calls and results to clients for transparency and generative UI experiences. Learn more about [streaming tool calls](/docs/ai-transport/messaging/tool-calls).

### Session management

Maintain conversation context across devices and sessions using Ably's [session management](/docs/ai-transport/sessions/overview) features.

## Next steps

* Follow the [message-per-response guide](/docs/guides/ai-transport/openai/openai-message-per-response) to get started
* Learn about [token streaming patterns](/docs/ai-transport/token-streaming/overview)
* Explore [sessions and identity](/docs/ai-transport/sessions/overview) management
