OpenAI Assistants API v2 for stateful chatbots with Code Interpreter, File Search, RAG. Use for threads, vector stores, or encountering active run errors, indexing delays. ⚠️ Sunset August 26, 2026.
View on GitHubsecondsky/claude-skills
openai-assistants
January 24, 2026
Select agents to install to:
npx add-skill https://github.com/secondsky/claude-skills/blob/main/plugins/openai-assistants/skills/openai-assistants/SKILL.md -a claude-code --skill openai-assistantsInstallation paths:
.claude/skills/openai-assistants/# OpenAI Assistants API v2
**Status**: Production Ready (Deprecated H1 2026) | **Package**: openai@6.9.1
**Last Updated**: 2025-11-21 | **v2 Sunset**: H1 2026
---
## ⚠️ Important: Deprecation Notice
**OpenAI announced that the Assistants API will be deprecated in favor of the Responses API.**
**Timeline:**
- ✅ **Dec 18, 2024**: Assistants API v1 deprecated
- ⏳ **H1 2026**: Planned sunset of Assistants API v2
- ✅ **Now**: Responses API available (recommended for new projects)
**Should you still use this skill?**
- ✅ **Yes, if**: You have existing Assistants API code (12-18 month migration window)
- ✅ **Yes, if**: You need to maintain legacy applications
- ✅ **Yes, if**: Planning migration from Assistants → Responses
- ❌ **No, if**: Starting a new project (use openai-responses skill instead)
**Migration Path:** See `references/migration-to-responses.md` for complete migration guide.
---
## Quick Start (5 Minutes)
### 1. Installation
```bash
bun add openai@6.7.0 # preferred
# or: npm install openai@6.7.0
```
### 2. Environment Setup
```bash
export OPENAI_API_KEY="sk-..."
```
### 3. Basic Assistant
```typescript
import OpenAI from 'openai'
const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY })
// 1. Create an assistant
const assistant = await openai.beta.assistants.create({
name: "Math Tutor",
instructions: "You are a helpful math tutor. Answer math questions clearly.",
model: "gpt-4-1106-preview",
})
// 2. Create a thread (conversation)
const thread = await openai.beta.threads.create()
// 3. Add a message
await openai.beta.threads.messages.create(thread.id, {
role: "user",
content: "What is 12 * 34?",
})
// 4. Create and poll run
const run = await openai.beta.threads.runs.createAndPoll(thread.id, {
assistant_id: assistant.id,
})
// 5. Get messages
if (run.status === 'completed') {
const messages = await openai.beta.threads.messages.list(thread.id)
console.log(messages.data[0].content[0].text.value)
}
```
**CRITICAL:**
-