Migrating from OpenAI
OpenAI's Assistants API is being shut down — here it continues: swap the base URL and key.
Updated on Aug 10, 2026
OpenAI has marked the Assistants API for permanent shutdown. If your application depends on assistants, threads, and runs, you don't need to rewrite it for another paradigm: HINOW maintains the same surface, actively. The migration is three changes — base URL, key, and model.
from openai import OpenAI
import os
client = OpenAI(
api_key=os.environ["HINOW_API_KEY"], # hi_...
base_url="https://api.hinow.ai/v1",
)
assistant = client.beta.assistants.create(
model="hinow/himax",
name="Analista",
instructions="Você é um analista objetivo.",
)
run = client.beta.threads.create_and_run_poll(
assistant_id=assistant.id,
thread={"messages": [{"role": "user", "content": "Qual a capital da França?"}]},
)
print(run.status) # completedimport OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env.HINOW_API_KEY, // hi_...
baseURL: 'https://api.hinow.ai/v1',
});
const assistant = await client.beta.assistants.create({
model: 'hinow/himax',
name: 'Analista',
instructions: 'Você é um analista objetivo.',
});
const run = await client.beta.threads.createAndRunPoll({
assistant_id: assistant.id,
thread: { messages: [{ role: 'user', content: 'Qual a capital da França?' }] },
});
console.log(run.status); // completed- Objects and fields —
assistant,thread,thread.message,thread.run,thread.run.step,file,vector_store, with the same field names and list envelopes (first_id,last_id,has_more). - Run states —
queued→in_progress→requires_action→completed/incomplete/failed/cancelled/expired. - Streaming events —
thread.run.*,thread.run.step.*,thread.message.*,done/[DONE]. - Errors —
{"error": {"message", "type", "param", "code"}}. - Tools —
file_search,function(withrequires_action/submit_tool_outputs) and thecode_interpreterformat. - Pagination —
limit,order,after,before.
| Theme | Here |
|---|---|
| Model | Use the HINOW catalog — hinow/himax is the recommendation. Model names used in old code are accepted as aliases and mapped to the catalog. |
OpenAI-Beta header | Unnecessary; if the SDK sends it, it is ignored. |
| Concurrent run | Second run on the same thread → 400 invalid_request_error (at OpenAI the code varied between versions — handle by type). |
| Run timeout | 10 minutes, including wait in requires_action. |
| Upload | Up to 25 MB per file. |
| List threads | GET /v1/threads exists here (extension) — OpenAI never offered it. |
code_interpreter | Accepted for compatibility; execution in development — see the Code Interpreter page. |
Transparent billing
Each run charges only for the model calls it makes, on the same table as chat/completions — the run's usage (prompt, completion, and total tokens) shows exactly what was consumed.
Was this page helpful?

