One provider, three protocols: choosing between Chat Completions, Responses and Messages
More model services now offer OpenAI-compatible Chat Completions and Responses plus Anthropic-compatible Messages. The wrong choice rarely fails immediately but leaves traps in tool calls, streaming and billing. Pick the protocol by client ecosystem, match base_url to the protocol, then run a minimal comparison test.
Bottom line
Take Kimi API as an example: its official docs offer three call styles, OpenAI-compatible Chat Completions, OpenAI-compatible Responses and Anthropic-compatible Messages, and say you can connect directly with the OpenAI SDK or Anthropic SDK.1 Gateways commonly do the same.
There is one rule: the protocol follows the client, not the model. Whatever protocol your tool (SDK, IDE plugin, coding agent) speaks natively is the one to use, with the matching base_url and key. Mixing protocols is behind many "it connects but keeps acting strange" problems.
How the three differ
Chat Completions
The most widespread OpenAI-compatible format: a messages array plus model, the default for most third-party tools and scripts. Its strength is ecosystem reach; the downside is that newer capabilities, such as some built-in tools or new structured-output fields, may appear in other protocols first.
Responses
OpenAI's newer interface. Kimi's docs describe it as a compatible format for generating text or JSON output and calling function tools.1 Its request and response structures differ from Chat Completions, so you cannot move old code over by changing only the path; tool-call input and output must be rewritten for the new structure.
Messages
The Anthropic-compatible format, which Kimi's docs say suits the Anthropic SDK, Claude Code and similar tools.1 The placement of system, the content-block structure and streaming event names all differ from the OpenAI family.
The three most common traps
- base_url does not match the protocol. The OpenAI SDK appends paths such as
/chat/completionstobase_url; the official SDK docs say it can be set via thebase_urlargument or theOPENAI_BASE_URLenvironment variable.2 The Anthropic SDK joins paths differently. Giving one SDK's address to the other usually produces a 404 or a duplicated path.
- Environment variables leak across tools. With
OPENAI_BASE_URLand another tool's address variable both set on one machine, a tool may quietly read the wrong one. When debugging, print the address actually in effect.
- Assuming "compatible" means "identical". A compatible format guarantees basic requests work, not that every parameter, tool-call form and streaming event matches. Test each feature you actually use before going live.
Selection checklist
- List the clients you will connect: scripts on the OpenAI SDK, a coding agent on the Anthropic protocol, and so on.
- Configure exactly one protocol per client, written in a config file rather than relying on defaults.
- Record the correct
base_urlform for each protocol in one shared team document.
- Run a minimal request per protocol: one plain chat, one streamed, one tool call.
- Check billing: run the same task through both protocols and compare usage records to confirm token accounting matches.
On SalpX
SalpX docs publish the OpenAI-compatible Base URL https://www.salpx.com/v1, with Authorization: Bearer <Key> authentication.3 With the OpenAI SDK, put that address in base_url (or OPENAI_BASE_URL) and call models by the names shown in the model marketplace. For Anthropic-family tools, configure them separately following that tool's integration guide rather than reusing the OpenAI address variable.
In one line
The protocol is the client's native language. Decide which language each tool speaks, give it the matching address and key, and verify with a plain, a streamed and a tool-call request. That is far cheaper than guessing later why you see the occasional 400.
Sources & attribution
This article references the public materials listed below. Analysis and wording are SalpX's own; quoted material remains the property of its original authors and publishers.
- 快速开始 - Kimi API 开放平台 — Moonshot AI (Kimi) · accessed 2026-11-28Note:Official docs: Kimi API offers Chat Completions, Responses (OpenAI-compatible) and Messages (Anthropic-compatible); the sample base_url is https://api.moonshot.cn/v1.
- openai-python README — OpenAI (GitHub) · accessed 2026-11-28Note:Official SDK docs: default timeout 10 minutes, 2 retries with short exponential backoff; connection errors, 408, 409, 429 and >=500 are retried; errors while consuming a stream are not; OPENAI_BASE_URL can replace base_url.
- SalpX API Reference — SalpX · accessed 2026-11-28Note:SalpX official docs: Base URL, Bearer auth, image size tiers, 4K model names, the clamp response header, and integration notes such as a 300s+ timeout, a 10 MB response budget and publicly downloadable reference images.
One key for Claude, GPT and 50+ models
The SalpX gateway is OpenAI-SDK compatible. Point base_url at https://www.salpx.com/v1 and you are done.