OpenResponsesCreatedEvent - TypeScript SDK

OpenResponsesCreatedEvent type definition

The TypeScript SDK and docs are currently in beta. Report issues on GitHub.

Event emitted when a response is created

Example Usage

1import { OpenResponsesCreatedEvent } from "@openrouter/sdk/models";
2
3let value: OpenResponsesCreatedEvent = {
4 response: {
5 completedAt: null,
6 createdAt: 1704067200,
7 error: null,
8 frequencyPenalty: 2702.39,
9 id: "resp-abc123",
10 incompleteDetails: null,
11 instructions: null,
12 metadata: null,
13 model: "gpt-4",
14 object: "response",
15 output: [],
16 parallelToolCalls: true,
17 presencePenalty: 134.06,
18 status: "in_progress",
19 temperature: null,
20 toolChoice: "auto",
21 tools: [],
22 topP: null,
23 },
24 sequenceNumber: 0,
25 type: "response.created",
26};

Fields

FieldTypeRequiredDescriptionExample
responsemodels.OpenResponsesResult✔️Complete non-streaming response from the Responses API{"created_at": 1704067200,"error": null,"id": "resp-abc123","incomplete_details": null,"instructions": null,"max_output_tokens": null,"metadata": null,"model": "gpt-4","object": "response","output": [{"content": [{"annotations": [],"text": "Hello! How can I help you today?","type": "output_text"}
],
“id”: “msg-abc123”,
“role”: “assistant”,
“status”: “completed”,
“type”: “message”
}
],
“parallel_tool_calls”: true,
“status”: “completed”,
“temperature”: null,
“tool_choice”: “auto”,
“tools”: [],
“top_p”: null,
“usage”: {"input_tokens": 10,"input_tokens_details": {"cached_tokens": 0},
“output_tokens”: 25,
“output_tokens_details”: {"reasoning_tokens": 0},
“total_tokens”: 35<br />}
}
sequenceNumbernumber✔️N/A
type”response.created”✔️N/A