Responses API

Built for agent scenarios, the Responses endpoint accepts text, images, and more through a single input field. It is compatible with the OpenAI Responses protocol.

Basics

MethodPOST Endpointhttps://koprouter.kopglobal.com/v1/responses AuthenticationAuthorization: Bearer sk-...

Request Parameters

Parameter Type Required Description
model string Yes Model ID
input string/array Yes Input content — a string or an array of message/content blocks
instructions string No System instructions
temperature number No Sampling temperature
max_output_tokens number No Maximum output tokens
stream boolean No Stream the response
tools array No Tool definitions
tool_choice string/object No Tool calling strategy

Example Request

curl https://koprouter.kopglobal.com/v1/responses \
  -H "Authorization: Bearer sk-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MODEL_ID",
    "instructions": "You are a helpful assistant.",
    "input": "Summarize this for me."
  }'

Example Response

{
  "id": "resp_abc123",
  "object": "response",
  "created_at": 1720000000,
  "model": "MODEL_ID",
  "output": [
    {
      "type": "message",
      "role": "assistant",
      "content": [
        { "type": "output_text", "text": "Here is the summary.", "annotations": [] }
      ]
    }
  ],
  "usage": {
    "input_tokens": 20,
    "output_tokens": 15,
    "total_tokens": 35
  }
}
The Responses API natively supports multimodal input — the `input` array can hold text and image content blocks together.