# Responses API and streaming

## Endpoint

```text
POST https://api.aoxtoken.com/v1/responses
```

Use Bearer authentication and provide content through `input`. Compatibility must be verified for the selected model and key group.

## Inspect a stream
Set `AOXTOKEN_API_KEY` and `AOXTOKEN_MODEL`, then use this candidate example in a macOS/Linux shell or configured WSL environment:

```bash
curl -N --fail-with-body https://api.aoxtoken.com/v1/responses \
  -H "Authorization: Bearer $AOXTOKEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"model\":\"$AOXTOKEN_MODEL\",\"input\":\"Reply with OK\",\"stream\":true}"
```

`-N` disables curl's output buffering; `stream: true` requests streaming. Do not parse multiple SSE events as one JSON object.

## Completion and failure
Application code must distinguish disconnection, successful completion and errors. A closed HTTP connection does not necessarily mean successful generation. Record event names, ordering, error structure and completion markers from AoxToken rather than borrowing them from Chat Completions or upstream documentation.

## Verification scope
Unauthenticated public requests returned 401 / API_KEY_REQUIRED. Authenticated non-streaming output, successful SSE completion and mid-stream errors have not been verified, these examples have not completed end-to-end verification.
