Skip to content

Responses ​

Responses is suitable for text generation, multi-modular input and tool call style access using the Responses format. OpenAI-compatible SDK is available to continue using Base URL and Bearer authentication.

API Path ​

MethodologyPathReturns by
POST/v1/responsessynchronous JSON or SSE streaming returned.
POST/v1/responses/compactCompress the context of the long conversation and return the results of the compressions.

Example request ​

bash
curl https://moonnexai.com/v1/responses \
  -H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.6-terra",
    "input": "请把这句话改写得更适合开发者文档:接入以后就可以用了。"
  }'

Common field ​

fieldAnnotations
modelModel name.
inputtext or structured input.
instructionsAdditional constraints on output objectives and style.
max_output_tokensLimits the output length.
streamUse streaming to return when setting true.

Context compression ​

Long conversations require a condensed context, which allows POST /v1/responses/compact to be called. This API is suitable for keeping key context and reducing subsequent request lengths on the client or service side.

bash
curl https://moonnexai.com/v1/responses/compact \
  -H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.6-terra-openai-compact",
    "input": "请压缩目前对话,保留用户目标、关键约束和下一步动作。"
  }'
fieldAnnotations
modelA model name that supports the context compression.
inputYou need to compress the text or message array.
instructionsOptional. Specifies the compression style, retention focus or output format.
previous_response_idOptional. Continue with the RSPons processes.

Apply scene ​

sceneRecommendations
New AccessResons FormatUse /v1/responses.
Long ConsoleUse /v1/responses/compact.
Traditional Chat ClientUse Chat Completions.
Claude Compatible ClientUse Messages.

response Processing ​

sceneTreatment
Normal ReturnReads the final output text from an response object.
streaming returnsMerges the incremental content by SSE events.
Multi-modular InputSaves input media assets URL, request body and final output for reset.

Relevant Pages ​