Skip to content
Main Site News Console

Native Invocation (Responses API)

In addition to the classic Chat Completions, 4ALL API also supports OpenAI’s new native interface Responses API (/v1/responses). Some new tools and clients (such as Codex CLI) use this protocol by default.

Basic Invocation

Terminal window
curl https://api.4allapi.com/v1/responses \
-H "Authorization: Bearer $AIPROXY_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.5",
"input": "Explain what an API gateway is in one sentence"
}'

input can be either a string or an array of messages with roles:

{
"model": "gpt-5.5",
"input": [
{ "role": "system", "content": "You are a concise Chinese assistant" },
{ "role": "user", "content": "What is an API gateway?" }
]
}

Differences from Chat Completions

PointChat CompletionsResponses
Input fieldmessagesinput
Output locationchoices[0].message.contentmessage items in the output array
Suitable forMost clients and SDKsOpenAI’s new toolchain

Recommendations

  • For existing services, Chat Completions is sufficient, no migration needed;
  • When a client strictly requires the Responses protocol (such as Codex CLI), point it directly to https://api.4allapi.com/v1, and the protocol will be available automatically;
  • Capabilities such as streaming and function calling are supported by both protocols, and the billing rules are the same.