Base URL and SDK MigrationNovember 6, 2026Flatkey Team

Open AI Assistant API in 2026: What Replaced It and How to Migrate

The OpenAI Assistants API has been sunset. Map old assistants, threads, and runs to current workflows, then choose the right API contract for your application.

Open AI Assistant API in 2026: What Replaced It and How to Migrate

If you searched for the Open AI Assistant API to build a new assistant, the old endpoint is no longer the right starting point. OpenAI says the Assistants API was sunset on August 26, 2026 and is no longer available. Its current migration path is the Responses API, with Conversations when the application needs server-side conversation state. A tutorial that still creates beta.assistants, threads, and runs describes a historical integration, not a new production setup.

Quick answer: use OpenAI’s Responses API for new applications that need its tools and state model. If your application only needs text generation and manages its own history and tools, an OpenAI-compatible chat-completions endpoint can be an alternative integration pattern. Flatkey offers that latter route across models; it does not claim to host or emulate the retired Assistants API or OpenAI’s Responses API.

What changed after the Assistants API sunset?

The old Assistants API combined several objects. An assistant stored instructions and tool settings; a thread held messages; a run executed work against that thread. OpenAI’s migration guide maps those concerns to its newer APIs. The mapping is conceptual: it is not a promise that every field, tool call, or stored object moves unchanged.

Earlier concept Current design question Migration action
Assistant instructions and tools Where does reusable behavior live? Move the instructions and tool configuration to the current OpenAI-supported pattern; confirm its lifecycle in the latest docs before creating long-lived objects.
Thread messages Who stores the conversation? Use Conversations if OpenAI should manage items, or store and send the history your application needs.
Run How is one model interaction executed? Create a Response and handle its typed output and tool events.
Old hosted tools Which built-in tools are required? Recheck each tool’s present Responses support and permissions individually.

The change matters most when an application depends on file search, code execution, or multi-step tool use. Switching only the URL and leaving the old thread/run orchestration untouched is not a migration. Design a small test around the exact features the application uses, including tool output parsing, failures, and stored state.

A minimal Responses API request

The current OpenAI API documentation shows a request to /v1/responses with model and input. In Python, a minimal smoke test looks like this:

import os
from openai import OpenAI

client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])
response = client.responses.create(
    model=os.environ["OPENAI_MODEL"],
    input="Explain one reason to use an API in a web application.",
)
print(response.output_text)

Set OPENAI_MODEL to a model currently enabled for your OpenAI project. Keep the key on the server. This example tests basic text generation only; it does not migrate a hosted tool, a stored conversation, or your authorization rules. Validate the returned text and inspect usage and errors before moving real traffic.

For a stateful application, choose explicitly how you carry context. The Responses API can work with Conversations, and the response object contains typed output items rather than the choices[0].message shape used by Chat Completions. Your parser, persistence schema, and telemetry need tests for the new shape. Do not assume an old thread can still be read on demand: OpenAI’s migration guide says the retired Assistants endpoint is unavailable, so historical messages must come from data you already retained.

When a multi-model chat API is enough

Some teams searched for “Open AI Assistant API” because they wanted a conversational interface, not OpenAI-hosted assistant objects. If the application manages prompts, conversation history, tool execution, and retrieval itself, a chat-completions request may be the simpler contract. That is a different architecture from using the Responses API with OpenAI-hosted tools.

Flatkey’s documented OpenAI-compatible route accepts chat completions through an OpenAI SDK with a different base URL and a Flatkey-issued API key. A small test can look like this:

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://router.flatkey.ai/v1",
    api_key=os.environ["FLATKEY_API_KEY"],
)
completion = client.chat.completions.create(
    model=os.environ["FLATKEY_MODEL"],
    messages=[
        {"role": "system", "content": "Answer briefly and cite uncertainty."},
        {"role": "user", "content": "What is an API gateway?"},
    ],
)
print(completion.choices[0].message.content)

Use a current model alias from the Flatkey catalog. The Flatkey key is not an OpenAI key, and this endpoint is not a drop-in substitute for Assistants threads, runs, OpenAI file search, or the Responses output schema. Before adopting a gateway, test the model, token limits, streaming, tool-call format, error codes, latency, privacy requirements, and billing for the features your application actually invokes.

Migration checklist for an existing application

  1. Inventory old dependencies. Search your code and jobs for beta.assistants, threads, runs, assistant IDs, tool resources, and thread IDs. Include background workers and cleanup jobs, not just the request handler.
  2. Recover your data model. Identify which instructions, conversation messages, files, and business metadata you retained in your own storage. Do not plan a migration around a retired read endpoint.
  3. Choose the target contract. If you need OpenAI-hosted tools or its conversation service, follow the current Responses and Conversations documentation. If you own state and tools, evaluate chat completions separately.
  4. Map one representative workflow. Run a safe test with one user turn, one tool call if applicable, a follow-up turn, a malformed input, and a timeout. Compare outputs rather than only checking HTTP 200.
  5. Update parsers and storage. Responses output items and Chat Completions choices are different. Preserve request IDs and a sanitized trace; do not log credentials or sensitive prompts.
  6. Set limits. Configure spending alerts, request deadlines, bounded retries, and a circuit breaker. Verify what can be retried without duplicating a business action.
  7. Roll out gradually. Route a small percentage of traffic to the new path, compare quality and cost per completed task, then expand. Keep a rollback to your own previous application version, not to the unavailable Assistants endpoint.

Access and pricing questions

There is no current price to quote for a new Assistants API integration because that API has been sunset. For an OpenAI Responses integration, check the official current pricing page for the selected model and any billed tools. For a Flatkey chat-completions integration, check Flatkey’s live prices and the chosen model. Do not combine the two bills in one “per assistant” rate.

A useful budget is based on actual workload: prompt tokens, output tokens, tool charges, retries, and how often history is resent. Sample real tasks, calculate cost per successful user outcome, and compare the p50 and p95 latency. A cheaper per-token model can cost more per task if it repeatedly fails and triggers retries.

Common migration mistakes

  • Following an old tutorial literally. A snippet that creates beta.assistants cannot be assumed to work after the sunset. Check its publish date and the current OpenAI migration guide.
  • Treating a chat endpoint as a hosted agent. Chat completions produce model responses. Your application still owns memory, authorization, retrieval, tool execution, and audit controls unless another documented service provides them.
  • Assuming all providers share every OpenAI feature. “OpenAI-compatible” describes a supported API surface, not every newer OpenAI endpoint. Verify the exact route and model.
  • Testing only a happy path. A first response can succeed while a follow-up turn loses context or a tool result is parsed incorrectly. Include multi-turn and failure tests.
  • Hard-coding cost claims. Model prices, rate limits, and availability can change. Link to live vendor sources and date any comparison.

FAQ

Can I create a new OpenAI Assistant in 2026?

Not through the retired Assistants API. OpenAI’s migration documentation says it sunset on August 26, 2026. Build new OpenAI integrations with the documented Responses path and choose a supported state pattern.

Is the Responses API the same as Chat Completions?

No. Both can generate text, but their request and output structures differ, and the Responses API supports additional OpenAI workflows. If you use Chat Completions instead, make sure your own application supplies any state or tools it needs.

Can I point an Assistants API SDK call at Flatkey?

No supported Flatkey documentation establishes Assistants API compatibility. Use Flatkey’s documented chat-completions route only for workloads that fit that contract; keep OpenAI Responses calls on OpenAI’s current API.

Next step: inventory the old calls and choose one representative task to migrate. Use the official Assistants migration guide for OpenAI-hosted features, or test Flatkey’s chat-completions route when a multi-model, application-managed conversation is the goal.