Skip to content

Responses API

POST /v1/responses for text, tool calls, multimodal input, and Codex clients.

http
POST https://api.webway.sh/v1/responses

Use Responses for Codex and newer OpenAI SDK integrations.

Request

bash
curl https://api.webway.sh/v1/responses \
  -H "Authorization: Bearer $WEBWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-5.6-terra",
    "input": "Write a three-line release note.",
    "max_output_tokens": 200
  }'
Field Type Notes
model string Required provider-qualified model ID
input string or array Required text or structured input items
instructions string System-level guidance
max_output_tokens integer Maximum generated tokens
tools array Tools available to the model
stream boolean Streams response events when true

Response

json
{
  "id": "resp_01…",
  "object": "response",
  "model": "openai/gpt-5.6-terra",
  "output": [
    {
      "type": "message",
      "role": "assistant",
      "content": [{"type": "output_text", "text": "Added…"}]
    }
  ],
  "usage": {"input_tokens": 12, "output_tokens": 24, "total_tokens": 36}
}

Official OpenAI SDKs expose the combined text as response.output_text.