Skip to main content
When you use an official OpenAI SDK like openai-python or openai-node) with Neosantara AI’s base_url, the library maps its methods to our API endpoints. While both v1/responses and v1/chat/completions can hold a conversation, how you interact with them through the SDK is fundamentally different. For new projects, we strongly recommend using the client.responses.create() method.
If you want use Function Calling please use the v1/chat/completions instead for working with functionwe will fixed in v1/response soon for supported function calling

Key SDK Differences

1. The Method You Call

The most direct difference is the method you invoke on the client object.
  • Chat Completions uses the nested chat.completions.create() method.
  • Responses uses the top-level responses.create() method, reflecting its status as a primary, modern API.
Diff Comparison:

2. Accessing the AI’s Reply

This is a critical difference. The structure of the returned object in the SDK reflects the underlying API response.
  • Chat Completions: The response is always nested inside a choices array. To get the text, you must access response.choices[0].message.content.
  • Responses: The SDK provides a convenient helper property called output_text that directly gives you the concatenated text. However, the most reliable way is to access the output array and get the .text from the first element, as output can also contain other types of content like function calls.
Diff Comparison:

3. Managing Conversation History

The Responses API was built to make multi-turn conversations easier, and this is reflected in the SDK usage.
  • Chat Completions: You are fully responsible for managing the conversation. You must manually create a list, append the assistant’s response, append the next user message, and send the entire list back every time.
  • Responses: You can let the API manage the state. After the first turn, you simply pass the previous_response_id to continue the conversation. The SDK and your backend handle the rest.
Diff Comparison - Conversation Management:

Complete Migration Example

Here’s how you would migrate from Chat Completions to Responses:

Recommendation

Last modified on November 11, 2025