API reference

Create a response (OpenAI Responses API)

POST/v1/responses

Responses text and tool-call endpoint; optional fields and tool types depend on the model. stream=true returns typed SSE events; previous_response_id does not guarantee persistent storage or recovery.

Authentication and permissions

Use your current GloopAPI key. Available models, capabilities and permissions depend on its catalog and the endpoint documentation.

Authorization: Bearer $GLOOP_API_KEY

Authentication schemes: BearerAuth

Request

Request body · application/json

Type
object
Required fields
modelinput

Request body required

  • modelstringRequired
  • inputunionRequired

    Input content, as a string or message array

    oneOf branch 1

    Type: string

    oneOf branch 2

    Type: array

    • []objectOptional
  • instructionsstringOptional
  • max_output_tokensintegerOptional
  • temperaturenumberOptional

    Sampling temperature. Specific support and limits depend on the selected model; no uniform defaults are guaranteed.

  • top_pnumberOptional

    Nucleus sampling parameter. Specific support and limits depend on the selected model; no uniform defaults are guaranteed.

  • streambooleanOptional
  • toolsarrayOptional
    tools child fields (1)
    • []objectOptional
  • tool_choiceunionOptional
    oneOf branch 1

    Type: string

    oneOf branch 2

    Type: object

  • reasoningobjectOptional
    reasoning child fields (2)
    • effortstringOptional
      Enum
      ["low","medium","high"]
    • summarystringOptional
  • previous_response_idstringOptional
  • truncationstringOptional
    Enum
    ["auto","disabled"]
  • parallel_tool_callsbooleanOptional

    Whether parallel tool calls are allowed depends on the selected model. Chat accepts a boolean; Responses accepts compatible protocol JSON values.

  • storebooleanOptional

    Whether requests and responses may be stored depends on the selected model and supported service capabilities. This does not provide a general conversation storage API.

  • prompt_cache_keystringOptional

    prompt cache correlation identifier; model dependent, with no guarantee of a cache hit or support. Chat accepts a string; Responses accepts compatible protocol JSON values.

  • prompt_cache_retentionunknownOptional

    prompt cache retention control as a JSON value; model dependent. The platform provides no uniform enum, default, or cache retention guarantee.

  • service_tierstringOptional

    Requested service tier, which may affect charges. Ignored by default and effective only when supported. Accepted values depend on the selected model.

  • textobjectOptional

    Text output configuration, including format for structured output; support and limits depend on the selected model.

    text child fields (1)
    • formatobjectOptional

      Text and structured output format configuration, depending on the model.

      format child fields (4)
      • typestringOptional

        Output format identifiers supported by the selected model.

      • namestringOptional

        Structured output name.

      • schemaobjectOptional

        JSON Schema for structured output; must satisfy the selected model requirements.

        Additional properties
        true
      • strictbooleanOptional

        Whether to require strict structured output, depending on the model.

  • context_managementunknownOptional

    Context management configuration; model dependent, with no promise of automatic summarization or persistent memory.

  • stream_optionsobjectOptional

    Responses streaming parameters; use with stream=true. Only supported fields take effect.

    stream_options child fields (2)
    • include_usagebooleanOptional

      Request streaming usage; availability depends on the model.

    • include_obfuscationbooleanOptional

      Responses stream obfuscation control; ignored by default, effective only when supported.

Responses and errors

HTTP 200

Response created successfully

application/json

Type
object
Additional properties
false

text/event-stream

Type
string
Description
SSE event stream. Protocol events, usage, and terminators depend on the current endpoint; errors may occur inside the stream.
{
  "type": "string",
  "description": "SSE 事件流,协议事件/用量/结束符取当前接口,错误可能在流内。"
}

HTTP 401

The key is missing, invalid, expired, or revoked.

application/json

Type
object
Required fields
error

HTTP 403

Insufficient IP, account, model, or tool permissions.

application/json

Type
object
Required fields
error

HTTP 429

Request/queue rate limit.

application/json

Type
object
Required fields
error

HTTP 500

Internal authentication or data storage failure.

application/json

Type
object
Required fields
error