[ ABORT TO HUD ]
SEQ. 1

Persistent Multi-Turn State

💬 Conversations API 15 min 250 BASE XP

What Is the Conversations API?

The Conversations API is OpenAI's dedicated endpoint for managing persistent, server-side conversation state. It replaces the manual pattern of tracking message arrays client-side or using the legacy Assistants API Threads.

Why It Exists

With Chat Completions, developers had to store and re-send the entire message history on every request — leading to token waste, context truncation bugs, and complex client-side state management. The Conversations API eliminates this by letting OpenAI manage the conversation server-side.

Relationship to the Responses API

The Conversations API works hand-in-hand with the Responses API. When you set store: true and use previous_response_id in a Responses API call, you are implicitly creating a Conversation. The Conversations API gives you explicit CRUD control over these stored conversations — list, retrieve, and delete them programmatically.

API Usage Patterns

import OpenAI from "openai";
const openai = new OpenAI();

// Start a new conversation via the Responses API
const r1 = await openai.responses.create({
  model: "gpt-5.4",
  store: true,
  input: "I need help planning a product launch."
});

// Continue the conversation — server remembers context
const r2 = await openai.responses.create({
  model: "gpt-5.4",
  store: true,
  previous_response_id: r1.id,
  input: "What marketing channels should I prioritize?"
});

// List all stored conversations
const conversations = await openai.responses.list();

// Delete a conversation when no longer needed
await openai.responses.del(r1.id);

Key Benefits

  • Zero client-side state: No message arrays, no truncation logic, no local databases.
  • Automatic prompt caching: Stored conversations get automatic prefix caching for up to 90% input token savings.
  • Seamless migration: Replaces Assistants API Threads — use Conversations API + Responses API instead.
  • Full audit trail: Every response is stored with metadata for compliance and debugging.
🚨 Migration Note: If you are using Assistants API Threads, migrate to the Conversations API before the August 26, 2026 shutdown. The pattern is simpler: store: true + previous_response_id replaces Threads + Runs entirely.
SYNAPSE VERIFICATION
QUERY 1 // 3
What does the Conversations API replace?
The Embeddings API
Manual client-side message history management and Assistants API Threads
The Batch API
Function calling
Watch: 139x Rust Speedup
Persistent Multi-Turn State | Conversations API — OpenAI Academy