Skip to content

Migrate from OpenAI

Keep the SDK on Chat Completions or adapt an integration based on the Responses API.

Updated on Aug 09, 2026

If the application uses Chat Completions, the migration is usually small: keep the openai package, swap the key, configure the HINOW base URL and choose a HINOW model. If it uses the Responses API, adapt the call to Chat Completions, because the input and output formats are different.

What changes in Chat Completions

Base URL, key and model identifier. Parameters and features should be limited to those that appear in the HINOW documentation and validated with your tests.

Python: before and after

from openai import OpenAI

client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])
resposta = client.chat.completions.create(
    model="SEU_MODELO_OPENAI",
    messages=[{"role": "user", "content": "Resuma este texto."}],
)
print(resposta.choices[0].message.content)

JavaScript: before and after

import OpenAI from 'openai';

const client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
const resposta = await client.chat.completions.create({
  model: 'SEU_MODELO_OPENAI',
  messages: [{ role: 'user', content: 'Resuma este texto.' }],
});
console.log(resposta.choices[0].message.content);

If you use the Responses API

Responses APIChat Completions on HINOW
client.responses.create(...)client.chat.completions.create(...)
input: "..."messages: [{role: "user", content: "..."}]
instructions: "..."Message with role: "system"
response.output_textresponse.choices[0].message.content
Responses API streaming eventsChat Completions chunks in choices[0].delta
OpenAI built-in toolsFunctions declared by the application in tools

Do not assume every feature is compatible

The Responses API, hosted tools, files, conversation state and structured formats may require a different implementation. Use only endpoints and fields documented by HINOW.

Test directly with cURL

curl https://api.hinow.ai/v1/chat/completions \
  -H "Authorization: Bearer $HINOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "hinow/hinova",
    "messages": [{"role": "user", "content": "Responda apenas: migração concluída"}]
  }'

Checklist

  • Replace OPENAI_API_KEY with HINOW_API_KEY.
  • Set https://api.hinow.ai/v1 as the base URL in the SDK.
  • Replace the model identifier.
  • Confirm the parameters, JSON, tools, images and streaming used by the application.
  • Update how the response is read if you are leaving the Responses API.
  • Compare results against your evaluation set before the final cutover.

Source format references: OpenAI Chat Completions and OpenAI quickstart.

Choose the target model

Compare capabilities and pricing before running the evaluation.