SpyBara
Go Premium

Documentation 2026-08-18 04:58 UTC to 2026-08-19 18:02 UTC

3 files changed +417 −12. View all changes and history on the product overview
2026
Wed 19 18:02 Tue 18 04:58 Mon 17 22:57 Sat 15 01:01 Fri 14 20:01 Thu 13 22:00 Wed 12 02:57 Tue 11 19:59 Mon 10 19:00 Fri 7 00:58 Thu 6 21:58 Wed 5 18:01 Tue 4 22:59 Mon 3 18:01
Details

551 551 

552If you are using [the Responses API WebSocket mode](https://developers.openai.com/api/docs/guides/websocket-mode), continuation uses the same `previous_response_id` semantics as HTTP mode, but over a persistent socket with repeated `response.create` events.552If you are using [the Responses API WebSocket mode](https://developers.openai.com/api/docs/guides/websocket-mode), continuation uses the same `previous_response_id` semantics as HTTP mode, but over a persistent socket with repeated `response.create` events.

553 553 

554The connection-local cache currently keeps the most recent previous response in memory for low-latency continuation. If an uncached ID cannot be resolved, send a new turn with `previous_response_id` set to `null` and pass full input context.554The connection-local cache keeps recent previous responses in memory for low-latency continuation. When you use `stream_id`, each lane can retain its latest response; `previous_response_id` still controls lineage, so a new lane can fork from a response on another lane while that response remains available. If an uncached ID cannot be resolved, send a new turn with `previous_response_id` set to `null` and pass full input context.

555 555 

556 556 

557 557 

guides/csam-guidance.md +233 −0 created

Details

1# CSAM guidance

2 

3> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.

4 

5{/* This guide necessarily discusses sexual abuse, so these profanity heuristics don't apply. */}

6{/* vale alex.ProfanityMaybe = NO */}

7{/* vale alex.ProfanityUnlikely = NO */}

8{/* "Potentially" preserves uncertainty in classifier and policy language. */}

9{/* vale Microsoft.Adverbs = NO */}

10 

11 

12 

13 {"OpenAI developed this resource with expert input from the "}

14 {", "}

15 {", the "}

16 {", and the "}

17 {"."}

18

19 

20 

21## Build with child safety in mind

22 

23OpenAI has clear child safety expectations for developers:

24You are responsible for ensuring that your users use OpenAI services in

25compliance with applicable laws, including laws that criminalize child sexual

26abuse and exploitation. Never use OpenAI services to exploit, endanger, or

27sexualize anyone under the age of 18. See the OpenAI .

28 

29Online child sexual exploitation and abuse affects a range of products and

30services, including those that don't target children. OpenAI wants to help

31developers understand what actions to consider taking to address this abuse.

32 

33From the earliest possible stage, consider how people could misuse your product.

34Start early so child safety safeguards can scale with you, rather than becoming

35something you try to retrofit into an already complex product or system.

36Developer teams and organizations of all sizes should assess how people could

37misuse their products for a range of harms, including child sexual abuse material

38(CSAM), grooming, sexual extortion, the sexualization of children, livestreamed

39abuse, and trafficking—especially if their products support messaging, content

40uploads, image editing, livestreaming, discovery, or payments.

41 

42This resource focuses on CSAM and offers developers practical guidance for

43protecting children.

44 

45## Where to start

46 

47It can be difficult to know where to start. The right solutions and

48implementation paths depend on your organization's size, maturity, and available

49resources.

50 

51The following checklist is a good starting point for addressing CSAM. The

52important thing is to begin addressing the risk: Don't wait until you have every

53tool or step complete before taking action.

54 

55## Prevent

56 

57Set clear rules for your product or service, and establish mechanisms for

58hearing from your users about their experiences.

59 

60- **Set clear rules.** Prohibit child sexual exploitation and abuse in your terms

61 of service, acceptable use policy, or community guidelines. Learn more from

62 or the Tech Coalition's free

63 for expert guidance and practical tools, including a resource on external

64 standards that prohibit online child sexual exploitation and abuse.

65- **Make reporting available to your users.** Give users a visible way to flag

66 potentially harmful content or behavior, and route those concerns to a monitored queue

67 or location with enough information to make policy decisions. For more

68 guidance, see the Australian .

69- **Track uploads and users through safety identifiers.** In your product or service,

70 associate every upload with a user. Sending

71 [safety identifiers with supported OpenAI

72 requests](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers)

73 can help OpenAI monitor and detect abuse. This can help OpenAI provide your team with more

74 actionable feedback if OpenAI detects policy violations in your

75 product or service. Safety identifiers can also help your team respond to abuse

76 faster. They create a stable way to trace activity back to an individual end

77 user and reduce the chance that one user's misuse disrupts access for your

78 broader organization. Use a unique string to represent each user. To protect

79 privacy, hash email addresses or usernames before sending them to avoid

80 disclosing personally identifiable information. The direct Images API uses a

81 different parameter for this purpose: Send the same stable identifier as

82 `user` for [image

83 generation](https://developers.openai.com/api/reference/resources/images/methods/generate) and [image

84 edits](https://developers.openai.com/api/reference/resources/images/methods/edit).

85 

86When you are ready to do more, consider other prevention measures:

87 

88- Add prevention-focused blocking or refusals for CSAM-related keywords

89 or URLs. Learn more from the .

90- Provide warnings or messages to users who are attempting to engage in

91 CSAM-related behavior. Learn more from .

92- If your service is available to children and a user tells you that sexual

93 images or videos of them are on your platform, direct them to support services

94 such as the IWF and NSPCC's program, which

95 enables children in the UK to report images and videos for removal or

96 blocking, or NCMEC's service.

97- If you become aware that a child is facing immediate or imminent harm:

98 - Refer the case to emergency services, such as local law enforcement.

99 - Give the child information on how to contact emergency services.

100 

101## Detect

102 

103Identify potentially violative content or conduct for review and action.

104 

105Use accessible CSAM detection tools:

106 

107- **Perceptual hash matching.** If your product supports uploading, storing, or

108 processing visual media, consider implementing perceptual hash matching. This

109 technology creates a digital fingerprint of an image or video and compares it

110 with fingerprints of known CSAM, helping to identify known

111 material even after someone resizes, compresses, or otherwise modifies a file.

112 You need access to both hash-matching technology, such as PhotoDNA, and CSAM

113 hash lists, which are repositories of known CSAM hashes. Not all services

114 provide both.

115 - **Recommended hash-matching technologies:**

116 - offers purpose-built detection for known CSAM in images and videos.

117 - The Tech Coalition offers eligible companies sublicenses to through its free

118 .

119 - .

120 - YouTube's technology

121 provides hash matching to identify known CSAM in videos.

122 - **Recommended CSAM hash lists:**

123 - NCMEC offers lists of known CSAM, exploitative content, and generative AI

124 CSAM. Contact its [Electronic Service Provider team](mailto:espteam@ncmec.org).

125 - IWF offers , a

126 hash-matching service for eligible small businesses and startups that

127 requires minimal technical expertise to integrate.

128- **Novel CSAM detection classifiers.** These tools can detect unknown or unseen

129 CSAM.

130 - offers

131 classifiers intended to identify potentially novel CSAM in images and

132 videos, as well as relevant text-based exploitation signals.

133 - Google's uses AI to

134 classify images and videos and assign their review priority. The higher the

135 priority assigned by the classifier, the more likely the media contains

136 CSAM.

137- **Bad actor detection and enforcement.** Using available identifiers and

138 information—such as usernames, email addresses, and device IDs—consider

139 permanently banning or otherwise disrupting accounts that people have used to

140 violate, or attempt to violate, CSAM policies. Watch for repeat offenders who

141 attempt to circumvent enforcement.

142 

143## Respond and report

144 

145Make sure your product and team can take appropriate action when you become

146aware of CSAM on your service.

147 

148- **Register and prepare to report CSAM to the authorities.** or your . Consider what makes a report to NCMEC

149 actionable and how it can support child safeguarding. Include as much

150 information as possible to help route the report to the appropriate

151 jurisdiction and identify the suspect. NCMEC's includes IP addresses, device IDs, and other data.

152 

153Local laws and reporting obligations may vary by jurisdiction.

154 

155- **Keep usable records and identifiers.** When you make a report, maintain

156 documentation of the incident and any associated data that could help identify

157 violative actors, so you can respond to requests from law enforcement.

158- **Write a response playbook.** Define who reviews reports, how to escalate

159 urgent cases internally and externally, what actions to take against users

160 responsible for violations, and who can make those decisions. This can help you establish enforcement operations.

161- Consider establishing a network of trusted expert reporters, including

162 organizations such as IWF and other hotlines, that can use their expertise to

163 flag CSAM cases for you.

164- **Train and support the people involved.** It's important for humans to be in

165 the loop. Make sure reviewers, support teams, and on-call staff understand your

166 policy, escalation path, and the limits of any automated system.

167- **Use the tools you need to moderate content or respond to abuse.** Other

168 tools can help you address child safety risks and harms:

169 - The [Moderation API](https://developers.openai.com/api/docs/guides/moderation) detects potentially harmful

170 content in text and images. Learn more about the

171 [`omni-moderation-latest`](https://developers.openai.com/api/docs/models/omni-moderation-latest) model.

172 This isn't a substitute for dedicated CSAM detection. It still includes a

173 `sexual/minors` category covering sexual content involving people

174 under 18; this category is text-only. Use results to:

175 - Block or filter content.

176 - Send content for human review.

177 - Intervene on an account.

178 - Add friction to repeated misuse and apply product- or service-specific

179 enforcement.

180 - Consider other moderation tools that could help. For example, is an open-source review console for

181 triaging potential policy violations in text, multimedia, and profiles. It

182 supports human and automated review, takes a wellness-oriented approach for

183 reviewers, and enables end-to-end moderation workflows, including

184 NCMEC CyberTipline reporting.

185 

186When you are ready to do more, consider other response and reporting

187measures:

188 

189- **Support the people involved in tackling CSAM.** Organizations should invest

190 in training, support, and a well-being program for CSAM reviewers. Read

191 .

192- **Get specialist support.** You don't need a large trust and safety team to

193 start. The Tech Coalition offers ways for companies to build stronger child

194 safety systems:

195 - is a free capacity-building program designed especially for startups and

196 small and midsize platforms, while remaining open to companies of all sizes.

197 It provides practical resources, guidance, and support to help companies

198 establish strong child safety foundations. Eligible companies can also apply

199 for a PhotoDNA sublicense through Pathways.

200 - provides tailored consulting and implementation support for companies

201 seeking more hands-on help to strengthen their child safety programs and

202 respond to specific risks.

203 - enables companies to take part in the industry's global collaborative

204 response to online child sexual exploitation and abuse, engage with peers,

205 share expertise, and contribute to collective action. Contact the [Tech

206 Coalition team](mailto:md@technologycoalition.org) for an initial

207 consultation.

208 - Developers can use the Tech Coalition's for further guidance.

209 

210### Scale safeguards

211 

212The right controls and safeguards depend on the product, its development stage

213and maturity, its users and features, the regions in which it operates, and its

214available resources.

215 

216Products with greater risk exposure—for example, those that support

217livestreaming, image generation or editing, file storage, or private

218connections—should consider implementing and strengthening safeguards such as:

219 

220- Product risk assessments before launch and whenever high-risk features change.

221 See .

222- Layered detection appropriate to the service, which may include hash matching,

223 image or video classifiers, text signals, keyword detection, and URL blocking.

224- Human review of high-confidence or high-severity signals, using tools that

225 protect reviewer well-being and limit unnecessary exposure to harmful

226 material.

227- Rate limits, account controls, and abuse monitoring that make repeat misuse

228 harder.

229- Regular testing and measurement so you can find gaps, track outcomes, and

230 improve your controls.

231 

232These recommendations are a starting point, not legal advice or a universal

233standard of care. Adapt them to your service, risk profile, and applicable law.

Details

2 2 

3> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.3> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.

4 4 

5The Responses API supports a WebSocket mode for long-running, tool-call-heavy workflows. In this mode, you keep a persistent connection to `/v1/responses` and continue each turn by sending only new input items plus `previous_response_id`.5The Responses API supports a WebSocket mode for long-running, tool-call-heavy workflows. Beyond lowering latency, `stream_id` lets one persistent connection to `/v1/responses` run parallel conversations and fork an existing conversation onto a new stream. Continue each turn by sending only new input items plus `previous_response_id`.

6 

7This pattern is WebSocket multiplexing: multiple logical response lanes over one persistent connection.

6 8 

7WebSocket mode is compatible with both Zero Data Retention (ZDR) and `store=false`.9WebSocket mode is compatible with both Zero Data Retention (ZDR) and `store=false`.

8 10 


12 14 

13Because the connection stays open and each turn sends only incremental input, WebSocket mode reduces per-turn continuation overhead and improves end-to-end latency across long chains. For rollouts with 20+ tool calls, we have seen up to roughly 40% faster end-to-end execution.15Because the connection stays open and each turn sends only incremental input, WebSocket mode reduces per-turn continuation overhead and improves end-to-end latency across long chains. For rollouts with 20+ tool calls, we have seen up to roughly 40% faster end-to-end execution.

14 16 

17## What `stream_id` unlocks

18 

19A `stream_id` names an ordered lane on one WebSocket connection. Keep `stream_id` and `previous_response_id` separate:

20 

21- `stream_id` controls where events go and which requests run in first-in, first-out order.

22- `previous_response_id` controls conversation lineage.

23 

24That separation unlocks two useful patterns.

25 

26### Run conversations in parallel

27 

28Send independent `response.create` events back-to-back with different `stream_id` values. The server can run them concurrently on one connection. Their events can interleave, so keep one reader loop and route each event by `stream_id`.

29 

30```text

31one WebSocket connection

32├─ stream_id="planner" draft a deployment plan

33└─ stream_id="research" list deployment risks

34```

35 

36Requests with the same `stream_id` stay first-in, first-out and do not overlap. Requests with different `stream_id` values can run concurrently.

37 

38#### Limits per connection

39 

40- A connection can have up to 16 active, in-flight responses across named and default lanes. The connection accepts more `response.create` events and queues them until an active response finishes.

41- A connection accepts up to 32 distinct named `stream_id` values. The implicit default lane does not count toward this named-stream limit. Reuse an existing `stream_id` or open a new connection after reaching the limit.

42 

43### Fork a conversation onto a new stream

44 

45To branch from a completed response, send its ID as `previous_response_id` with a new `stream_id`. While that response remains available, the new stream inherits its context, and the original stream can keep going. After the fork starts, both branches can run concurrently because they use different stream IDs.

46 

47With `store=false` (including ZDR), a cross-lane fork depends on the parent remaining in the connection-local cache. If the fork queues while the source lane advances or fails, the parent can be evicted before the fork starts, and the fork returns `previous_response_not_found`. Wait for the fork lane to emit `response.in_progress` before advancing the source lane, or retry with `previous_response_id` set to `null` and replay full input context.

48 

49```text

50main: resp_1 ──▶ resp_2 ──▶ resp_3

51

52critic: resp_4 ──▶ resp_5

53```

54 

55Reusing a `stream_id` without `previous_response_id` starts a new response; it does not continue the conversation.

56 

57The key calls look like this:

58 

59```text

60# One socket, two independent conversations.

61send_create("planner", "Draft a deployment plan.")

62send_create("research", "List deployment risks.")

63 

64# Fork the planner response, then continue the original branch in parallel.

65send_create(

66 "critic",

67 "Find gaps in this plan.",

68 previous_response_id=planner_response_id,

69)

70send_create(

71 "planner",

72 "Add rollback steps.",

73 previous_response_id=planner_response_id,

74)

75```

76 

77### Complete example

78 

79Run parallel conversations, then fork one

80 

81```python

82import json

83import os

84 

85from websocket import create_connection

86 

87ws = create_connection(

88 "wss://api.openai.com/v1/responses",

89 header=[f"Authorization: Bearer {os.environ['OPENAI_API_KEY']}"],

90)

91 

92latest_response_id_by_lane = {}

93 

94 

95def send_create(stream_id, text, previous_response_id=None):

96 payload = {

97 "type": "response.create",

98 "stream_id": stream_id,

99 "model": "gpt-5.6",

100 "store": False,

101 "input": [

102 {

103 "type": "message",

104 "role": "user",

105 "content": [{"type": "input_text", "text": text}],

106 }

107 ],

108 }

109 if previous_response_id is None:

110 previous_response_id = latest_response_id_by_lane.get(stream_id)

111 if previous_response_id:

112 payload["previous_response_id"] = previous_response_id

113 ws.send(json.dumps(payload))

114 

115 

116def drain_until_complete(expected_stream_ids):

117 completed = set()

118 while completed != expected_stream_ids:

119 event = json.loads(ws.recv())

120 stream_id = event.get("stream_id")

121 event_type = event.get("type")

122 

123 if event_type == "error" and stream_id is None:

124 raise RuntimeError(f"connection error: {event}")

125 if stream_id not in expected_stream_ids:

126 continue

127 

128 if event_type == "response.completed":

129 latest_response_id_by_lane[stream_id] = event["response"]["id"]

130 completed.add(stream_id)

131 elif event_type in {"response.failed", "response.incomplete", "error"}:

132 raise RuntimeError(f"lane {stream_id} failed: {event}")

133 

134 

135# 1. Run two independent conversations in parallel.

136send_create("planner", "Draft a deployment plan for a stateless API service.")

137send_create("research", "List common deployment risks for a stateless API service.")

138drain_until_complete({"planner", "research"})

139 

140# 2. Fork the planner conversation and continue the original branch in parallel.

141planner_response_id = latest_response_id_by_lane["planner"]

142send_create(

143 "critic",

144 "Find gaps in this deployment plan.",

145 previous_response_id=planner_response_id,

146)

147send_create(

148 "planner",

149 "Add rollback and monitoring steps to the plan.",

150 previous_response_id=planner_response_id,

151)

152drain_until_complete({"critic", "planner"})

153 

154ws.close()

155```

156 

157 

158A `stream_id` must be 1–256 characters and can contain only letters, numbers, underscores (`_`), hyphens (`-`), and periods (`.`). Use it only in WebSocket `response.create` events; do not include it in HTTP `POST /v1/responses`.

159 

160For named streams, server events include the matching `stream_id`, including terminal events and request-scoped errors.

161 

162If you omit `stream_id`, the request uses an implicit default lane, and its events do not include `stream_id`. The default lane otherwise follows the same ordering and concurrency rules as named streams. An empty string is not a valid `stream_id`; omit the field to select the default lane.

163 

15## Connect and create responses164## Connect and create responses

16 165 

17In WebSocket mode, start each turn by sending a `response.create` event from the client. The payload mirrors the normal [Responses create body](https://developers.openai.com/api/reference/resources/responses/methods/create), except that transport-specific fields like `stream` and `background` are not used.166In WebSocket mode, start each turn by sending a `response.create` event from the client. The payload mirrors the normal [Responses create body](https://developers.openai.com/api/reference/resources/responses/methods/create), except that transport-specific fields like `stream` and `background` are not used.


32 json.dumps(181 json.dumps(

33 {182 {

34 "type": "response.create",183 "type": "response.create",

184 "stream_id": "main",

35 "model": "gpt-5.6",185 "model": "gpt-5.6",

36 "store": False,186 "store": False,

37 "input": [187 "input": [


62 json.dumps(212 json.dumps(

63 {213 {

64 "type": "response.create",214 "type": "response.create",

215 "stream_id": "main",

65 "model": "gpt-5.6",216 "model": "gpt-5.6",

66 "store": False,217 "store": False,

67 "previous_response_id": "resp_123",218 "previous_response_id": "resp_123",


88 239 

89WebSocket mode uses the same `previous_response_id` chaining semantics as HTTP mode, but it adds a lower-latency continuation path on the active socket.240WebSocket mode uses the same `previous_response_id` chaining semantics as HTTP mode, but it adds a lower-latency continuation path on the active socket.

90 241 

91On an active WebSocket connection, the service keeps one previous-response state in a connection-local in-memory cache (the most recent response). Continuing from that most recent response is fast because the service can reuse connection-local state. Because the previous-response state is retained only in memory and is not written to disk, you can use WebSocket mode in a way that is compatible with `store=false` and Zero Data Retention (ZDR).242On an active WebSocket connection, the service keeps recent previous-response state in a connection-local in-memory cache. When you use `stream_id`, each lane keeps its latest cached response, so continuing from the latest response in that lane is fast because the service can reuse connection-local state. Because the service retains previous-response state only in memory and does not write it to disk, you can use WebSocket mode in a way that is compatible with `store=false` and Zero Data Retention (ZDR).

92 243 

93If a `previous_response_id` is not in the in-memory cache, behavior depends on whether you store responses:244If a `previous_response_id` is not in the in-memory cache, behavior depends on whether you store responses:

94 245 

95- With `store=true`, the service may hydrate older response IDs from persisted state when available. Continuation can still work, but it usually loses the in-memory latency benefit.246- With `store=true`, the service may hydrate older response IDs from persisted state when available. Continuation can still work, but it loses the in-memory latency benefit.

96- With `store=false` (including ZDR), there is no persisted fallback. If the ID is uncached, the request returns `previous_response_not_found`.247- With `store=false` (including ZDR), there is no persisted fallback. If the ID is uncached, the request returns `previous_response_not_found`.

97 248 

98If a turn fails (`4xx` or `5xx`), the service evicts the referenced `previous_response_id` from the connection-local cache. This prevents reusing stale cached state for that failed continuation.249If a same-lane continuation returns a `4xx` or `5xx`, the service evicts the referenced `previous_response_id` from the connection-local cache. A cross-lane fork that returns an error preserves the shared parent so the source lane can continue.

99 250 

100## Compaction and creating new responses251## Compaction and creating new responses

101 252 


123 json.dumps(274 json.dumps(

124 {275 {

125 "type": "response.create",276 "type": "response.create",

277 "stream_id": "main",

126 "model": "gpt-5.6",278 "model": "gpt-5.6",

127 "store": False,279 "store": False,

128 "input": [280 "input": [


142 294 

143## Connection behavior and limits295## Connection behavior and limits

144 296 

145- Server events and ordering match the existing Responses streaming event model.297- Events within each response follow the existing Responses streaming event model. Events from different lanes can interleave.

146- A single WebSocket connection can receive multiple `response.create` messages, but it runs them sequentially (one in-flight response at a time).298- Requests with the same `stream_id` run in first-in, first-out order and don't overlap. Requests on different lanes can run concurrently.

147- No multiplexing support today. Use multiple connections if you need parallel runs.299- Connections last up to 60 minutes. Reconnect at the limit.

148- Connection duration is limited to 60 minutes. Reconnect when the limit is reached.

149 300 

150## Reconnect and recover301## Reconnect and recover

151 302 

152When a connection closes (or hits the 60-minute limit), open a new WebSocket connection and continue with one of these patterns:303When a connection closes (or hits the 60-minute limit), its connection-local cache disappears for every lane. Open a new WebSocket connection and recover each lane with one of these patterns:

153 304 

1541. If your prior response is persisted (`store=true`) and you have a valid response ID, continue with `previous_response_id` and new input items.3051. If you stored a prior response (`store=true`) and have a valid response ID, continue that lane with `previous_response_id` and new input items.

1552. If you cannot continue the chain (for example, `store=false`/ZDR or `previous_response_not_found`), start a new response by setting `previous_response_id` to `null` (or omitting it) and send the full input context for the next turn.3062. If you cannot continue a lane (for example, `store=false`/ZDR or `previous_response_not_found`), start a new response by setting `previous_response_id` to `null` (or omitting it) and send the full input context for that lane's next turn.

1563. If you compacted context with `/responses/compact`, use the returned compacted window as the base `input` for that new response, then append the latest user/tool items.3073. If you compacted context with `/responses/compact`, use the returned compacted window as the base `input` for that new response, then append the latest user/tool items.

157 308 

158## Errors to handle309## Errors to handle

159 310 

311When the server can associate an error with a named lane, the error event includes `stream_id`. Other lanes can continue after a request-scoped error.

312 

160`previous_response_not_found`313`previous_response_not_found`

161 314 

162```json315```json

163{316{

164 "type": "error",317 "type": "error",

165 "status": 400,318 "status": 400,

319 "stream_id": "main",

166 "error": {320 "error": {

321 "type": "invalid_request_error",

167 "code": "previous_response_not_found",322 "code": "previous_response_not_found",

168 "message": "Previous response with id 'resp_abc' not found.",323 "message": "Previous response with id 'resp_abc' not found.",

169 "param": "previous_response_id"324 "param": "previous_response_id"


171}326}

172```327```

173 328 

329`websocket_stream_limit_reached`

330 

331```json

332{

333 "type": "error",

334 "status": 400,

335 "stream_id": "agent_33",

336 "error": {

337 "type": "invalid_request_error",

338 "code": "websocket_stream_limit_reached",

339 "message": "This WebSocket connection has reached its maximum number of distinct stream IDs (32). Reuse an existing stream_id or open a new WebSocket connection.",

340 "param": "stream_id"

341 }

342}

343```

344 

174`websocket_connection_limit_reached`345`websocket_connection_limit_reached`

175 346 

176```json347```json


190- [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state)361- [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state)

191- [Streaming API responses](https://developers.openai.com/api/docs/guides/streaming-responses)362- [Streaming API responses](https://developers.openai.com/api/docs/guides/streaming-responses)

192- [Responses streaming events reference](https://developers.openai.com/api/reference/resources/responses)363- [Responses streaming events reference](https://developers.openai.com/api/reference/resources/responses)

364- [Responses WebSocket events reference](https://developers.openai.com/api/reference/resources/responses/websocket-events)