Skip to content

Responses

POST https://api.zonetoken.net/v1/responses

Generate a model response using the OpenAI Responses API. This is a newer, unified interface that accepts a single input and returns structured output.

Authentication

Authorization: Bearer <apiKey>

Request body

FieldTypeDescription
modelstringThe model id, e.g. gpt-5.5.
inputstring | arrayThe prompt text or a list of input items.
streambooleanOptional. Stream output as server-sent events.

Request

bash
curl https://api.zonetoken.net/v1/responses \
  -H "Authorization: Bearer $ZONETOKEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.5",
    "input": "Write a haiku about APIs."
  }'
json
{
  "model": "gpt-5.5",
  "input": "Write a haiku about APIs."
}

Response

json
{
  "id": "resp_abc123",
  "object": "response",
  "created_at": 1730000000,
  "model": "gpt-5.5",
  "status": "completed",
  "output": [
    {
      "id": "msg_abc123",
      "type": "message",
      "role": "assistant",
      "content": [
        {
          "type": "output_text",
          "text": "Endpoints align,\nTokens flow through open gates—\nQuiet calls return."
        }
      ]
    }
  ],
  "usage": {
    "input_tokens": 8,
    "output_tokens": 19,
    "total_tokens": 27
  }
}