Updated 2026-10-17

Articles

Responses API vs. Chat Completions: Choosing Third-Party OpenAI-Compatible APIs

Learn how Responses API and Chat Completions differ, verify base_url with minimal requests, and troubleshoot 404s, 400s, empty responses, and tool errors.

Here is the bottom line: Responses API and Chat Completions are two different APIs, and you cannot mix their request bodies by changing only the path. When using the platform’s OpenAI-compatible entry point, send requests to the endpoints supported by the platform. The currently available compatible endpoints include /chat/completions, /embeddings, /models, /messages, and /messages/count_tokens.

If your SDK sends requests to /responses while you have configured a compatible API address, the common results are 404, 400, or response fields that do not match what your code expects. Confirm the final request path generated by the SDK first, then use a minimal Chat Completions request without tools or complex parameters to verify the connection. This is usually faster than modifying your application code immediately.

OpenAI’s official documentation defines Chat Completions as an API that generates responses from messages, while Responses API uses POST /responses and supports text, images, built-in tools, function calling, and other capabilities. Build requests according to the documentation for the API you are using. See the OpenAI-compatible API integration guide and API and endpoint reference.

1. Identify which API you are actually calling

  1. Check the final request URL. The Chat Completions path is typically /v1/chat/completions; the Responses API path is /v1/responses. If the SDK automatically adds /v1, do not repeat it in base_url.
  2. Check the top-level request fields. Chat Completions uses messages; Responses API uses input and can configure Responses-specific tools and session capabilities.
  3. Check which response fields your code reads. Chat Completions commonly reads text from choices[0].message.content. Responses API uses its own response object and cannot be parsed directly through choices.
  4. Confirm that the model and endpoint match. Use the model marketplace as the source of truth for available models. Support for images, tools, reasoning parameters, and output formats may differ between models.
Comparison Chat Completions Responses API
Typical path /v1/chat/completions /v1/responses
Primary input field messages input
Common text extraction method choices[0].message.content Read the output content from the Responses response object
Best suited for Existing OpenAI SDKs, chat messages, standard tool calls, and legacy-compatible code Responses-specific capabilities, built-in tools, or newer state-management workflows
Platform integration Use the platform’s published OpenAI-compatible endpoints Confirm that the target service explicitly supports this endpoint; do not infer support from the SDK name alone

Official documentation still provides a Chat Completions reference, while also recommending that new projects understand the capabilities and differences of Responses API. Always follow the relevant official documentation and the actual response from the service: Chat Completions Overview and Responses Overview.

2. Verify the compatible API with a minimal request

The diagnostic requests below use only a model name and one user message. They do not include tools, structured output, images, or complex parameters. Replace YOUR_API_KEY with your platform key and MODEL_NAME with a model available in the model marketplace.

PowerShell

$uri = "https://api.xisu.ai/v1/chat/completions"
$apiKey = "YOUR_API_KEY"
$model = "MODEL_NAME"
$body = @{
  model = $model
  messages = @(
    @{ role = "user"; content = "Reply only: ok" }
  )
} | ConvertTo-Json -Depth 6

try {
  $response = Invoke-WebRequest `
    -Uri $uri `
    -Method Post `
    -Headers @{ Authorization = "Bearer $apiKey" } `
    -ContentType "application/json; charset=utf-8" `
    -Body ([System.Text.Encoding]::UTF8.GetBytes($body)) `
    -UseBasicParsing

  "HTTP: $($response.StatusCode)"
  $response.Headers | Format-List
  $response.Content
} catch {
  if ($_.Exception.Response) {
    $httpResponse = $_.Exception.Response
    "HTTP: $([int]$httpResponse.StatusCode)"
    $httpResponse.Headers | Format-List
    if ($_.ErrorDetails.Message) {
      $_.ErrorDetails.Message
    } else {
      $_.Exception.Message
    }
  } else {
    $_.Exception.Message
  }
}

How to read the output: HTTP 200 with choices in the response means the basic Chat Completions call succeeded. For a 404, first check whether you accidentally used /responses or added /v1 twice. For a 400, read the field path in the error body first, then restore your application parameters one at a time.

macOS/Linux

export XISU_API_KEY='YOUR_API_KEY'
export XISU_MODEL='MODEL_NAME'

curl -i https://api.xisu.ai/v1/chat/completions \
  -H "Authorization: Bearer ${XISU_API_KEY}" \
  -H "Content-Type: application/json" \
  -d "{\"model\":\"${XISU_MODEL}\",\"messages\":[{\"role\":\"user\",\"content\":\"Reply only: ok\"}]}"

curl -i displays both the response headers and the response body. Pay particular attention to the HTTP status code on the first line, request-id, x-request-id, or request_id in the body. The exact field depends on the response. Successful responses usually contain choices. To verify token usage and charges, also check usage in the response and the platform request logs.

3. Locate the API mix-up based on the symptoms

Symptom Common cause What to do
Request returns 404 /responses was sent to an address configured only for compatible Chat Completions, or /v1 was appended twice Print the final URL and confirm that you are using /v1/chat/completions or an endpoint explicitly supported by the service.
400 error says input is missing The current service endpoint is Responses API, but the request body uses messages Follow the target service’s Responses documentation and use input. If you are using the platform’s compatible entry point, switch back to a Chat Completions request.
400 error says messages are missing A Responses API request body was sent to Chat Completions Use a messages array and confirm that every message contains the correct role and content.
HTTP 200 but the code cannot read the text The request succeeded, but the parser is still reading the other API’s response structure Print the non-sensitive portions of the complete response first, then adapt the parser to choices or the Responses response object. Do not change only the model name.
Minimal request succeeds, but adding tools fails The tool schema, tool-call fields, or model capabilities do not match Add one tool at a time and check name, description, parameters, and JSON Schema types. See the troubleshooting guide for rejected tool schemas.
Command line succeeds, but the SDK fails The SDK automatically appends a path, overrides base_url, or reads the platform key from a different environment variable Output the SDK’s final URL, HTTP method, status code, and response body, while masking the Authorization value.

4. Configure an OpenAI-compatible SDK correctly

  1. Point base_url to the version root. When using the platform’s compatible API, set base_url to https://api.xisu.ai/v1. Do not set it directly to https://api.xisu.ai/v1/chat/completions unless the SDK explicitly requires a complete endpoint.
  2. Let the SDK append the resource path. When choosing a Chat Completions method, confirm that the final request goes to /chat/completions rather than being automatically changed to /responses.
  3. Disable nonessential features initially. Temporarily remove tools, images, structured output, and vendor-specific fields. Verify a normal text request first.
  4. Do not mix fields from the two APIs. For example, do not put input or Responses-specific tool configuration into a Chat Completions request, and do not use choices-based parsing for a Responses response.
  5. Restore parameters according to the model’s capabilities. After the minimal request succeeds, add system or developer instructions, conversation history, tools, and output formats one at a time. When an error occurs, record the request_id so you can verify the actual model, token usage, and charges in the request logs.

If you are using the Anthropic Messages API, use its corresponding /messages request structure rather than treating OpenAI’s messages array as an identical protocol. The Messages API places system instructions in the top-level system field, and its official documentation explicitly states that the API does not have a system role. See the Anthropic Messages integration guide.

5. Evaluate region support, status pages, and platform calls separately

If the request is sent to the platform API address, first check the platform key, base_url, endpoint, model name, and request body. The regional availability page for the official direct service cannot replace platform request logs and should not be the primary basis for diagnosing a failed platform call.

If you are using the official direct endpoint, OpenAI’s supported countries page lists the countries and territories currently able to access the API. Regional availability and service conditions may change, so follow the current page content: Countries and territories supported by the OpenAI API. When using the platform entry point, complete the endpoint and request-body checks in this article first.

If several minimal requests simultaneously return 5xx errors or connection failures, check the relevant official status page. The OpenAI status page shows overall status by component, including API, Chat Completions, and Responses. It reflects the overall condition of the official service and does not represent the result of every request for every model, account, or platform entry point: OpenAI Status.

6. Run an API self-check before going live

  1. Record the SDK version, final base_url, request path, and model name.
  2. Use minimal requests to verify plain text, conversation history, and tool calls separately. Do not add every feature at once.
  3. Confirm that the code handles HTTP errors, empty content, tool calls, and interrupted streams.
  4. Store the request_id, model name, token usage, and charges in logs, but never store the complete API key.
  5. Before switching models, recheck the available endpoints and capabilities in the model marketplace. Do not assume that all models support the same parameters.

FAQ

I am using the OpenAI SDK. Why does it automatically request /responses?

Some SDKs or newer wrappers prioritize Responses API methods. Check the method you are calling and the SDK request logs. If the target is the platform’s OpenAI-compatible API, use the Chat Completions method and confirm that the final request path is /v1/chat/completions.

Should base_url end with /v1 or /chat/completions?

For common OpenAI SDKs, base_url should usually be set to https://api.xisu.ai/v1, with the SDK appending the resource path automatically. If you see a duplicated /v1 or a repeated path, print the final URL and adjust the configuration according to the SDK documentation.

Can Chat Completions use the Responses input field directly?

Do not assume that it can. Chat Completions centers on messages, while Responses API uses its own input field and response structure. Build the two request types separately according to the target endpoint.

Why does the response return 200 but my program show no content?

The most common causes are mismatched parsing fields or a tool call instead of ordinary text. First print choices, message, tool_calls, and finish_reason from the response, then handle the actual structure.

Does the platform support Responses API?

The known compatible endpoints include /chat/completions, /embeddings, /models, /messages, and /messages/count_tokens. Available endpoints and models are determined by the platform API reference and model marketplace. Do not infer that the platform entry point supports /responses solely from the method names in an official SDK.

How can I verify that the request actually used the target model?

Read the model field in the response, then use the request_id to verify the model name, token usage, and charges in the platform request logs. The platform bills according to actual token usage, with billing precision to 10 decimal places, and purchased credits do not expire.

References

If you have confirmed that your application should use an OpenAI-compatible API, start with the quick-start guide to complete the minimal integration. Then visit the plans and rates page to review available models and billing methods, and compare the results with your request logs to verify actual usage.

Disclaimer: This article is intended for technical troubleshooting only. API capabilities, model lists, and officially supported regions may change as services are updated. Always follow the relevant official pages and the actual response.